Many system services and automated jobs (cron) are setup to send notifications the root email account for the server by default. If you need a way to quickly capture the root email and redirect them to another account, the quick steps below will get this taken care of.

First step is to edit your aliases file located at /etc/aliases using a text editor on your server. Personally I like to use pico/nano. You will need to add the following line to this file:

root: me@myotheremail.com  (replace me@myotheremail.com with your real email address) 

Next step after saving the aliases file is to let the server know you have new aliases. This can be done by simply running the newaliases command.

You can test to see if your change is working by running the following command which will send a test email.

echo test | mail -s “test message” root

With that your root email will now go to the email account you defined in the aliases file. These same steps can be performed for any accounts on the server.

Never Miss An Article

Be one of the first to get notified when a new article is posted. No more having to mess around with the site or looking on Facebook. Get Kevin's blog posts delivered directly to your inbox!

 

Plus you will get subscriber only bonuses

You have Successfully Subscribed!