June 19, 2009

Fix the Domain of System Mail

If your system sends you reports via email with the sender root@localhost.localdomain, there is a quick fix. add the following lines to /etc/mail/submit.mc substituting your own hostname:
define(`confDOMAIN_NAME',`yourhost.yourdomain.net')dnl
define(`always_add_domain')dnl

then reload the config and sendmail daemon:
# cd /etc/mail
# m4 submit.mc > submit.cf
# service sendmail reload


Thanks, Dareus.

0 comments: