5.22. Forwarding Root's Mail

The system sends email to root's mailbox /var/mail/root for the periodic cron jobs. If the mail is not read and deleted then the size of file will grow and perhaps fill the file system. Additionally, it may contain useful information regarding the system.

It is possible to forward root's mail to a users' inbox by making the following entry in aliases:

# Pretty much everything else in this file points to "root", so
# you would do well in either reading root's mailbox or forwarding
# root's email from here.

# root: me@my.domain
root: your_username

After making any changes to /etc/aliases sendmail must made aware of the changes by running:

# newaliases

Any mail sent to root will now be sent to the specified user's mail inbox. This can be tested using mail as shown below. After specifying a subject, type a message. To send the mail, press CTRL+D at the beginning of a blank line.

# mail root
Subject: Test of forwarding
this is a test.
EOT

Appropriate filters can be set up in most mail clients so that root's mail is easily distinguishable from other mail.