Forward System’s Mails to a Mail Box!

76
Article Source About GNU/Linux
June 24, 2009, 1:40 pm

With a basic configuration, all system’s mails, or almost are forwarded to the user “root”. To read them, type “mail” is sufficient, as root. And to know where softwares send their mail(s), take a look at /etc/alias.

I think the reading of mails is not very practical with the “mail” command, I looked for a solution, to know how to forward mails that root should get to an email of monitoring.

The tip is simple, it’s necessary to change in /etc/alias this :

   root:user # (user can be something else)

To :

   root:
 This e-mail address is being protected from spambots. You need JavaScript enabled to view it
 

Then, you need to do “newaliases” to update the aliases.db file.

Tip so practical because from now you will be able to look out to the existing problems on your system (since mails are sent to the system when there is a problem on the system ) !