Linux: How to forward system emails

By default, most Linux systems deliver system emails — cron output, monitoring alerts, security notices — to the local root mailbox. If you never check it, those messages pile up and you might miss something important.

The simplest way to deal with this is to forward them to an external address. The most common method is the /etc/aliases file. Add a line like:

root: you@example.com

Then run newaliases to rebuild the alias database. Local mail will be forwarded to the external address via your MTA.

For per-user forwarding, create a .forward file in the user’s home directory with your email address in it. This doesn’t need an alias rebuild and works even if you don’t have sudo access.

Enjoy!

Leave a Reply

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