Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
My clients are trying to send email to a domain such as example.com
example.com has 2 MXs (found by executing 'host -t mx example.com' in the email server):
Code:
50 mx2.example.com
10 mx1.example.com
mx1.example.com is up and connections can be established on port 25 to it from my server, but mx2.example.com is down.
Now, whenever my clients send email to example.com, it does not get delivered and when i run 'mailq', this is what I see:
Code:
m7R5jlEx028096 2987 Wed Aug 27 11:45 <me@mydomain.com>
(Deferred: Connection refused by mx2.example.com.)
<postmaster@example.com>
It looks like sendmail is trying to connect to mx2.example.com which is down. How do I force sendmail to send the emails to example.com using mx1.example.com?
Unless you control the MX's, or have permission, you should not try to override the MX's for the domain. Allow your server to retry which is normal operating behavior.
Attempting to bypass the normal MX precedence could get you perm rejected from the site.
I can telnet to port 25 of mx1.example.com from my server and can successfully send emails. Why is sendmail trying to use mx2.example.com instead of mx1.example.com?
Sendmail will try a secondary MX if there was a problem during the SMTP greeting. If Sendmail has never tried the primary MX, this would tend to indicate DNS problems not returning the primary MX record.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.