Problem
I'm getting "Local configuration error" messages when using sendmail, such as:
553 mailhost.domain.com config error: mail loops back to myself 554 <user@domain.com>... Local configuration error
or554 MX list for domain.com points back to mailhost.domain.com
554 <user@domain.com>... Local configuration errorwhere 'mailhost.domain.com' and 'domain.com' are your mailserver and your domain name.
Cause
Mail is configured so that mail to the domain (domain.com) is to be forwarded to a specific mailhost (mailhost.domain.com) using an MX record in domain name service, but the mail server doesn't recognize itself as that domain (domain.com).
Solution
Sendmail can be modified to accept mail for a specific domain by editing the sendmail.cf in the following manner:
As root, edit the file /usr/lib/sendmail.cf.In the definitions section of the file (after the initial
copyright comments) you should have an entry for "Cw" (if you
don't have a "Cw" entry you can add one). The entry should
look similar to the following:##################
# local info #
################### Our local (e.g. LAN) domain name
DDdomain.com# all the names this host is known by
Cwmailhost.domain.com mailhostAdd "domain.com" to the "Cw" line so that it looks similar to this:
##################
# local info #
################### Our local (e.g. LAN) domain name
DDdomain.com# all the names this host is known by
Cwmailhost.domain.com mailhost domain.comYou must kill and restart the sendmail daemon after you change the configuration file (sendmail.cf) for these changes to take effect.
See also
sendmail.cf(SFF), sendmail(ADMN), sendmail(ADMF)