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@server.domain to root@domain. It's something in sendmail.mc from memory.
Thanks
On 10/30/06, Tony Wicks tony@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@server.domain to root@domain. It's something in sendmail.mc from memory.
edit /etc/aliases, then run newaliases
On 10/30/06, Jim Perrin jperrin@gmail.com wrote:
On 10/30/06, Tony Wicks tony@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@server.domain to root@domain. It's something in sendmail.mc from memory.
edit /etc/aliases, then run newaliases
wait, nevermind me. Didn't read the question clearly and answered a question that wasn't asked.
-- During times of universal deceit, telling the truth becomes a revolutionary act. George Orwell
On 30/10/06, Tony Wicks tony@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@server.domain to root@domain. It's something in sendmail.mc from memory.
From memory, Sendmail will default to user@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.
Will.
There is an "exposed user" setting in sendmail.cf whose behaviour can be adjusted by recompiling with sendmail.mc
The relevant settings are here in sendmail.cf
# class E: names that should be exposed as from this host, even if we masquerade C{E}root
So if you set the machine to masquerade a domain as "domain.com" for example, take out the class C{E}root
You may find this a useful link (note the site is not associated with me)
http://www.grok.org.uk/docs/smroot.html
P.
Will McDonald wrote:
On 30/10/06, Tony Wicks tony@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@server.domain to root@domain. It's something in sendmail.mc from memory.
From memory, Sendmail will default to user@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.
Will. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Will McDonald wrote:
On 30/10/06, Tony Wicks tony@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@server.domain to root@domain. It's something in sendmail.mc from memory.
From memory, Sendmail will default to user@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@blah.mydomain.com, it will be root@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,
On Tue, Oct 31, 2006 at 11:45:29AM +1300, Tony Wicks 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@server.domain to root@domain. It's something in sendmail.mc from memory.
If you are running sendmail, the pieces you want are:
MASQUERADE_AS(`xdroop.com')dnl dnl EXPOSED_USER(`root')dnl
Prefixing a line with 'dnl' effectively comments it out.
You might also be interested in:
FEATURE(masquerade_envelope)dnl FEATURE(masquerade_entire_domain)dnl
..depending on what you are doing.
Then restart sendmail. The init script will run make in /etc/mail before launching.
(oh, and change 'xdroop.com' to your domain of course. :)