Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I used mail, its exit status is zero but the recepient is not receiving any mail. What could be the problem?

I used this code:

mylinsystem:/etc/mail # mail -v -s "test" test_user@receipient_domain.com </tmp/txt
test_user@receipient_domain.com... Connecting to [127.0.0.1] via relay...
220 mylinsystem.receipient_domain.com ESMTP Sendmail 8.13.6/8.13.6/SuSE Linux 0.8; Thu, 27 Nov 2014 00:25:47 +0530
>>> EHLO mylinsystem.receipient_domain.com
250-mylinsystem.receipient_domain.com Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<root@mylinsystem.receipient_domain.com> SIZE=228
250 2.1.0 <root@mylinsystem.receipient_domain.com>... Sender ok
>>> RCPT To:<test_user@receipient_domain.com>
>>> DATA
250 2.1.5 <test_user@receipient_domain.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 sAQItljm015768 Message accepted for delivery
test_user@receipient_domain.com... Sent (sAQItljm015768 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 mylinsystem.receipient_domain.com closing connection
mylinsystem

If run mailq then I see the following message:

sAPLEEcO028725    14849 Wed Nov 26 02:44 <usr@mylinsystem.domain.com>
                 (Deferred: Connection timed out with [163.181.51.401])
                                         <test_user@receipient_domain.com>
share|improve this question
    
Connection timed out with [163.181.51.401]) Is that a copy-paste error, or something more sinister? –  fkraiem Nov 27 at 11:25

1 Answer 1

mail's exit status refers to local processing only. It means: "This mail has been accepted bei the local MTA." It cannot say anything about the success of delivering the mail as that has not even been tried at this point.

share|improve this answer
    
Thanks. Why delivering is not yet attempted. Can you please point out something so that i can invetigate in that direction. Thanks for your help. –  user120969 Nov 27 at 9:16
1  
It's how mail works. mail is sent to one server, then another, and another, till it reaches the end. If you want to check that it's 'leaving' you end check /var/log/mail.log (or similar) en.kioskea.net/contents/116-how-email-works-mta-mda-mua has good info. –  coteyr Nov 27 at 9:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.