Reading email as root is a security hazard; a malicious email message can exploit an email client and cause it to execute arbitrary code as the user running the client. To avoid this danger, you can forward all of root's mail to another account and read it from there. You can choose one of two ways for doing this.
You can add an entry to the /etc/aliases file that sends root's mail to a different account. For example, root: foobar would forward all mail intended for root to the account foobar.
The other way is to create a file named .forward in root's home directory that contains the address that the mail should forward to.
Anytime you make a change to the /etc/aliases file, you will need to rebuild the aliases database before that change will take effect. This is done with the following:
$ sudo newaliases
Was this article helpful?