How to redirect local root mail to an email address with Postfix

After you install postfix, then you may wnat to have root’s email sent to a real email address. This will help to send cron jobs to you.

Edit the /etc/aliases file and add your username and external email address.


# root: youremailaddress@domain.com

Now run this command:-


# newaliases

Now restart Postfix:-


# service postfix restart

and to test, run the following command:-


# echo test | mail -s "test message" root

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.