cancel
Showing results for 
Search instead for 
Did you mean: 

No mail for root user

 
Highlighted
Regular Advisor

No mail for root user

I have a server running RHEL ES 4. I can't send mail to the root user on the server. I have sendmail running on the box.

root 7872 1 0 May22 ? 00:00:00 sendmail: accepting connections
smmsp 7881 1 0 May22 ? 00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
smmsp 11354 7166 0 16:02 ? 00:00:00 /usr/sbin/sendmail -FCronDaemon -i -odi -oem -oi -t
root 15119 27037 0 16:04 pts/1 00:00:00 grep sendmail

I sent a test email using mailx to myself (root)
but when I check mail. It says no mail. Please help.
Thanks.
Geetha
8 REPLIES 8
Highlighted
Honored Contributor

Re: No mail for root user

You should check:

- Your DNS configuration.
- The contents of the /etc/mail/local-host-names
- The message in /var/log/maillog
- If aliases are defined for root user in /etc/aliases
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Highlighted
Regular Advisor

Re: No mail for root user

Ivan,
I added the /etc/mail/local-host-names file. The /var/log/maillog does not show any errors. However, I do seem to have a problem with my DNS. I want it to resolve its name from the /etc/hosts file. But, it does not seem to go to files and then DNS. This is a test server and we may not be able to get an entry in the DNS.
Thanks.
Geetha
Highlighted
Honored Contributor

Re: No mail for root user

Hi Geetha,

The order of hostname lookups is usually defined in /etc/nsswitch.conf

You should have a line that starts hosts which will probably be followed by dns,files

If you want it just go to /etc/hosts then remove the dns bit...

Hope this helps,

Regards,

Rob
Highlighted
Regular Advisor

Re: No mail for root user

Rob,
I do have the line
files dns in /etc/resolv.conf.

The strange part is that I can send mail to say a gmail account from this server, but not to root account on the same server.
Thanks.
Geetha.
Highlighted
Honored Contributor

Re: No mail for root user

Hi,

Have you looked at the log files to see if there are any clues there...

I think they're in /var/log/mail although I haven't got a RH box around at the moment to check...

Cheers,

Rob
Highlighted
Regular Advisor

Re: No mail for root user

Yes, no errors in the log file.
Highlighted
Honored Contributor

Re: No mail for root user

do you see any messages when you restart sendmail?

what do you have into /etc/hosts?
Highlighted
Frequent Advisor

Re: No mail for root user

Hi Geetha

The Problem i think is pls check for /etc/aliases file and at the end u will have person who gets root mail.
check whether it is commented ie #root
if its is pls remove the hash and add the emailid of urs or some group mail id
for eg : root : emea_linux@hotmail.com
and run newlaises and restart sendmail and try sending mail to root


ALL the best hope this helps

Regards
Karthik