When working with SendMail for intranet environments, you may run into the following type of 553 5.1.8 error. This is an example from my own email system but with the domain name changed.
—– The following addresses had permanent fatal errors —–
<email@example.com> (reason: 553 5.1.8 <firstname.lastname@example.org>… Domain of sender address email@example.com does not exist)
—– Transcript of session follows —–
… while talking to bunkerhill.example.org.:
<<< 553 5.1.8 <firstname.lastname@example.org>… Domain of sender address email@example.com does not exist 550 5.1.1 <firstname.lastname@example.org>…
User unknown <<< 503 5.0.0 Need RCPT (recipient)
Reporting-MTA: dns; alice1.example.org Received-From-MTA: DNS;
localhost Arrival-Date: Tue, 25 Dec 2012 04:06:48 -0500
Final-Recipient: RFC822; email@example.com
Action: failed Status: 5.1.8
Remote-MTA: DNS; bunkerhill.example.org
553 5.1.8 <firstname.lastname@example.org>… Domain of sender address email@example.com does not exist
Last-Attempt-Date: Tue, 25 Dec 2012 04:07:07 -0500
This type of error can occur when email is sent by cron jobs or other internal tasks running on hosts inside your network, and you have your own sendmail based email server. It happens because email sent from Linux hosts by cron jobs is sent as firstname.lastname@example.org and the hostname is causing the email server to read it as a non-existent domain.
Adding these hostnames to your DNS does not resolve the problem.
You must add your own domain’s equivalent of the following lines to the /etc/mail/domaintable database file.
Then run make (with /etc/mail as the PWD) and restart sendmail.
That entry in the domaintable database converts all domain names that have the form host.example.org to the true domain name of example.org thus allowing sendmail to recognize the domain.