I am having trouble with a newly installed server that we have just migrated to. I am running sendmail and cannot send mail to a specific domain. Mail everywhere else appears to work. Logs say:
DSN: Service unavailable
Weirdly, I get a Message accepted for delivery and then a following entry to say DSN: Service Unavailable.
Why would this be? I do not have it relaying through a smart host. The server that I am sending from does not have a public IP and is purely for sending mail from a PHP application.
Any advice appreciated as Google hasn't been a big help.
It might have mx record setup issue. Run the following command:
dig site.com mx
where site.com is your domain name.
In the output you will see Question section it is question to find the MX. In answer section you will find the mx entries configured for the domain. Check the mx records if they are correct.
Sample output is given below: where there 3 mx record entries like ASPMX.L.GOOGLE.com., ALT1.ASPMX.L.GOOGLE.com. etc
;; QUESTION SECTION: ;thestarworks.com. IN MX
;; ANSWER SECTION: thestarworks.com. 3600 IN MX 10 ASPMX.L.GOOGLE.com.
thestarworks.com. 3600 IN MX 20 ALT1.ASPMX.L.GOOGLE.com.
thestarworks.com. 3600 IN MX 30 ALT2.ASPMX.L.GOOGLE.com.