Skip to content

Redirecting root’s Email on Red Hat

red-hat-logo-bigIf you are a conscientious system administrator, you like to keep tabs on your server by checking root’s email at least once a day, correct?  If you manage more than one server, or get tired of having to log in to check your mail, you can redirect where email for the root user gets sent.

I ran into problems on Red Hat Enterprise 5.2 doing this, so I thought I’d post the resolution here.

When I changed “who receives root’s mail” in the /etc/aliases file to an address on another server, I stopped getting any email at all, and the system didn’t know where to store the bounced messages, so they were going to /var/spool/clientmqueue/

I was unable to send mail from the command line using sendmail, so I knew something was amiss.  /var/log/maillog was full of errors suchs as “DSN: Service unavailable” and “stat=’Service unavailable'”.

If you have similar issues, here is how tofix them:

First, make sure your system’s hostname is in /etc/mail/local-host-names/

Next, in your /etc/hosts.allow file, add this:

ALL: 127.0.0.1 : allow

Next, add your email address to /etc/aliases under the “who receives root’s email” section.

Last, but not least, run:

#> newaliases

That should take care of it!

Published inEmailLinuxRedHatTweaks

One Comment

  1. HG HG

    Hi there,

    Highly appreciated thsi post. Although, I am not using this feature but I am sure it will help a lot, specially if implementing in production environment.

    Good work !!!

Leave a Reply to HG Cancel reply

Your email address will not be published. Required fields are marked *