August 18, 2008

Redirect root's email

The idea:

Say to want to redirect all mail bound for root to another chosen account. Lots of things send mail to root by default so a good way to catch this easily.
[user@somehost ~]# vi /etc/aliases
Then PgDn to the  bottom of the document to the lines
# Person who should get root's mail root:  someuser@somedomain.com
and edit the email address to whatever you want. Save the file and then run
[user@somehost ~]# newaliases
This will update the a aliases.db with your changes and all mail for root should be sent to the chosen account :)