Problem with mailx - Can execute but email not received


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Problem with mailx - Can execute but email not received
# 1  
Old 04-10-2007
Problem with mailx - Can execute but email not received

Hi,

I tried running mailx command like this:

Code:
sadm@bioinfo-z:~$ mailx foobar@gmail.com
Subject: testgmail
Some content.
.
EOT

As you can see although it is successfuly executed.
But still I can't receive email at my foobar@gmail.com
account.

What is the cause?
# 2  
Old 04-10-2007
check the return status $?

it could be in your send queue and yet to be delivered.

If you are on solaris, you could check the status of the delivery in /var/adm/messages
# 3  
Old 04-10-2007
Quote:
Originally Posted by monkfan
Hi,

I tried running mailx command like this:

Code:
sadm@bioinfo-z:~$ mailx foobar@gmail.com
Subject: testgmail
Some content.
.
EOT

As you can see although it is successfuly executed.
But still I can't receive email at my foobar@gmail.com
account.

What is the cause?
Im pretty sure its a dns issue (again) and if you type mailq, i bet all the mail you sent is in deferred state ...
If so, fix the dns issue if your box is using a dns or just take it out on /etc/nsswitch.conf (remove dns on the hosts entry) and you would want to check also if your mail gateway is set correctly in mail.cf (DS macro on sendmail system)
# 4  
Old 04-10-2007
Quote:
Originally Posted by matrixmadhan
If you are on solaris, you could check the status of the delivery in /var/adm/messages
A default Solaris syslog.conf configuration will log mail.debug (and above) to /var/log/syslog - not /var/adm/messages. Only mail.crit (and above) will be logged to /var/adm/messages.

Cheers
ZB
# 5  
Old 04-10-2007
try this

try checking the mail queue.

'mailq' and see if the email left the system.

someone already recommended checking the mailq. my bad. but here is an example output.

servername:/root# mailq
/var/spool/mqueue is empty
Total requests: 0

-Sowser
# 6  
Old 04-10-2007
After executing the mailx, I tried "mailq" it gives me this:

Code:
sadm@bioinfo-z:~$ mailq
Mail queue is empty

How can I fix this issue?

Last edited by monkfan; 04-10-2007 at 11:29 PM..
# 7  
Old 04-10-2007
After running the mailx, looking at syslog shows this:
Code:
root@bioinfo-z:/# tail -f var/log/syslog
Apr 11 10:53:53 bioinfo-z.comp.nus.edu.sg postfix/pickup[21761]: [ID 197553 mail.info] 6C8B8BA1E: uid=30 from=<sadm>
Apr 11 10:53:53 bioinfo-z.comp.nus.edu.sg postfix/cleanup[21847]: [ID 197553 mail.info] 6C8B8BA1E: message-id=<20070411025353.6C8B8BA1E@bioinfo-z.comp.nus.edu.sg>
Apr 11 10:53:53 bioinfo-z.comp.nus.edu.sg postfix/qmgr[20137]: [ID 197553 mail.info] 6C8B8BA1E: from=<sadm@bioinfo-z.comp.nus.edu.sg>, size=337, nrcpt=1 (queue active)
Apr 11 10:53:53 bioinfo-z.comp.nus.edu.sg postfix/smtp[21849]: [ID 197553 mail.info] 6C8B8BA1E: to=<ewijaya@gmail.com>, relay=post.comp.nus.edu.sg[137.132.80.42]:25, delay=0.2, delays=0.1/0.04/0.01/0.05, dsn=5.7.1, status=bounced (host post.comp.nus.edu.sg[137.132.80.42] said: 554 5.7.1 <ewijaya@gmail.com>: Relay access denied (in reply to RCPT TO command))
Apr 11 10:53:53 bioinfo-z.comp.nus.edu.sg postfix/cleanup[21847]: [ID 197553 mail.info] 916CCBA20: message-id=<20070411025353.916CCBA20@bioinfo-z.comp.nus.edu.sg>
Apr 11 10:53:53 bioinfo-z.comp.nus.edu.sg postfix/bounce[21850]: [ID 197553 mail.info] 6C8B8BA1E: sender non-delivery notification: 916CCBA20
Apr 11 10:53:53 bioinfo-z.comp.nus.edu.sg postfix/qmgr[20137]: [ID 197553 mail.info] 916CCBA20: from=<>, size=2298, nrcpt=1 (queue active)
Apr 11 10:53:53 bioinfo-z.comp.nus.edu.sg postfix/qmgr[20137]: [ID 197553 mail.info] 6C8B8BA1E: removed
Apr 11 10:53:53 bioinfo-z.comp.nus.edu.sg postfix/error[21851]: [ID 197553 mail.info] 916CCBA20: to=<sadm@bioinfo-z.comp.nus.edu.sg>, relay=none, delay=0.05, delays=0.01/0.04/0/0, dsn=5.0.0, status=bounced (local delivery is disabled)
Apr 11 10:53:53 bioinfo-z.comp.nus.edu.sg postfix/qmgr[20137]: [ID 197553 mail.info] 916CCBA20: removed

How can I solve the problem?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to check email with attachment received or not from UNIX shell script?

Hello Guys, Here is the requirement!! I want to check the mail with attachment received or not through unix scripting. And send an notification email when mail with attachment already received. Any thoughts on this is much appreciated!! Regards, Harry (0 Replies)
Discussion started by: dharry2017
0 Replies

2. Forum Support Area for Unregistered Users & Account Problems

No activation email received

I have tried to register today with the username BatterBits, but have not received the activation email I do not live in any of the restricted countries - unless the UK has suddenly become a threat! I'd be grateful if you would assist. many thanks Ian (2 Replies)
Discussion started by: unregistered
2 Replies

3. Shell Programming and Scripting

AT00003.bin attachment is received from mailx command.

Hi Team, I am sending a mail from Linux box as shown below. cat sample.log | mailx -s "Testing" abc.com But instead of receiving the content of sample.log in the mail i got an attachment with name AT00001.bin. After looking into the contents of log file i found that there are some... (1 Reply)
Discussion started by: Girish19
1 Replies

4. HP-UX

Mailx command running successfully but no mails received.

Hi, I am working on a HP-UX box. Mailx command running successfully but no mails received. Here is what I am doing rocfm@comhp73 - mailx -s "subject" abc@gmail.com < abc.txt Null message body; hope that's ok rocfm@comhp73 - echo $? 0 rocfm@comhp73 - echo "something" | mailx -v -s... (1 Reply)
Discussion started by: Sunayna
1 Replies

5. Solaris

Mail from mailx not received

Hi , I'm trying to send a mail from a sunOS machine that is within hp network to my email: eman.el-badawy@hp.com ,the user trying to send is 'project',,but seems the mail address can not be resolved checking /var/log/syslog i got the following: Dec 25 14:34:02 svddev15 sendmail: ... (1 Reply)
Discussion started by: Eman_in_forum
1 Replies

6. UNIX for Advanced & Expert Users

problem on email sent but not received

hi.. I have the porblem where the email was sent but not received by users.. The message as below:- Dec 16 11:42:04 isp postfix/smtp: A80042B4B: to=<user_name@example.com.my>, relay=smtp.example.com.my:25, delay=890, delays=0.17/0.02/31/859, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued... (1 Reply)
Discussion started by: bh_hensem
1 Replies

7. Linux

Run PHP script when new email received

I have been looking around for a solution to this, i have been developing for a wile though am very new to CGI, PHP and a lot of the web based tech. I have a web site hosted with a cPanel web host. I am looking to have a script(prefer PHP) to run everytime i get a new email to help@xxx.com.... (16 Replies)
Discussion started by: iKris
16 Replies

8. Forum Support Area for Unregistered Users & Account Problems

no email received

I have tried to register and got a message saying an email would be sent but no email has turned up. Could you try again please? (1 Reply)
Discussion started by: lookingfor help
1 Replies

9. Forum Support Area for Unregistered Users & Account Problems

Did not received any email for account activation

hi I did not received any such email for account activation nor i am able to see any status in my profile. Am i missing anything?? :confused: Please help Appreciated. (0 Replies)
Discussion started by: bhush782003
0 Replies

10. UNIX for Advanced & Expert Users

Unable to send eMail from a UNIX-Host ( using mailx ) to a Outlook-email-addres(Win)

Hi A) I am able to send eMail using mailx from a UNIX ( solaris 8 ) host to my Outlook-email-ID : FName.Surname@Citigroup.com ( This is NOT my actual -eMail-ID). But in Outlook the "From :" eMail address is displayed as " usr1@unix-host1.unregistered.email.citicorp.com " .i.e the words... (2 Replies)
Discussion started by: Vetrivela
2 Replies
Login or Register to Ask a Question