[CentOS] root email question
chrism at imntv.com
chrism at imntv.com
Mon Oct 30 23:29:49 UTC 2006
Will McDonald wrote:
> On 30/10/06, Tony Wicks <tony at prophecy.net.nz> wrote:
>> Hi all, Ive done this before but the solution alludes me now. Can
>> someone please remind me how to change the default Redhat behavior of
>> root email being sent from root at server.domain to root at domain. It's
>> something in sendmail.mc from memory.
>
>> From memory, Sendmail will default to user at host if there's no fully
> qualified domain name for either localhost or the system's 'base' IP
> address in /etc/hosts.
>
> There's probably a more correct Sendmail approach too. Checking
> /etc/mail/sendmail.mc
>
> LOCAL_DOMAIN(`localhost.localdomain')dnl
>
> Looks a likely candidate.
Or if you're running postfix...
in /etc/postfix/main.cf uncomment this line:
#myorigin = $myhostname
so it looks like this:
myorigin = $mydomain
Then restart postfix. That will affect all mail from the machine so
instead of getting mail from root at blah.mydomain.com, it will be
root at mydomain.com. It's been 7 or 8 years since I've fondled a sendmail
config so I don't recall off the top of my head how to translate that
into an m4-ism.
Hope that helps.
Cheers,
More information about the CentOS
mailing list