Root Aliases

Carlosinfl

Loves the juice
Joined
Sep 25, 2002
Messages
6,633
Guys - I have 4 servers on my LAN that were built by a previous Linux administrator and every morning when I come to work I have any and all emails that were mailed from logwatch or cron to [email protected] sent to my company email address and I have no idea how the servers are re-directing email from root to [email protected]. I have been looking everywhere!

I checked /etc/aliases
I ran the newaliases command in case the text file and .db file were not in sync
I checked /root to make sure there is no ".forward" file
I checked /etc/mail/sendmail.cf for the MAILTO = root
I checked crontab -l to make sure no crazy scripts are running

I don't think this is a cront or logwatch config parameter because when I run the "mail root" command and I send an email from root to root, it goes to my company email address and that has nothing to do with cron or logwatch so something in sendmail or in the Linux system is telling sendmail to translate root = [email protected].

Anyone have any possible clue how the previous admin could have set this up? I am so confused and have no idea at this point any more.

The system = RHEL 4.5 ES 32 bit
MTA = Sendmail
 
Edit: rhas 4.5 es. Didn't see it.

We have some boxes here. I will look around & see what I can find and post later.
 
There are no funny mx records are there?

"host -t mx whatever.domain.com"
 
i would look at what groups youre in, in your email directory. this ultimately the best way to do it, so that as IT admins come and go, you edit one place, instead of each server you have running.

who is the email addressed to? look for this address in any groups or aliases in your email directory.
 
I resolved this. In every machine running sendmail MTA by default, there is a file called /etc/mail/sendmail.mc (don't edit /etc/mail/sendmail.cf) and in there the previous admin had this option enabled...


Code:
dnl # Uncomment and edit the following line if your outgoing mail needs to
dnl # be sent out through an external mail server:
dnl #
define(`SMART_HOST',`mail.mydomain.org')
define(`LOCAL_RELAY', `mail.mydomain.org')

This then relays all mail to root on the local box to mail.mydomain.org and on mail.mydomain.org - I am set to receive all email for root. Dishes are done.

Thanks all.
 
Back
Top