Occasionally, certain system daemons and utilities will send local Unix mail to root's local email inbox, /var/mail/root . Well, it doesn't do you much good there!

If you want to read these system messages, you can always do sudo mutt -f /var/mail/root if you are familiar with mutt. However, an easier and more efficient way to check this mail would be to have it forwarded to your user's local inbox, and then read it with your favorite email reader.

Throughout this HOWTO, replace username with your account name.

First, you need a mailbox, preferably with all of root's old mail already in it.

Code:
cd /var/mail
sudo cp root username
sudo chown username username
sudo chgrp username mail
That creates a mailbox for your username with the appropriate user and group permissions. The contents of the mailbox are a copy of root's mailbox.

Now, it's time to forward all of root's incoming mail to your inbox.

Code:
sudo gedit /root/.forward
Put this line in the file:
Code:
username@localhost
Now, you will receive any mail sent to root. To make things more convenient, let's set up Evolution to read the mail.

(Note: I use Thunderbird as my email client, and it required me to change the permissions of the /var/mail directory. I don't know if Evolution also requires this. If you get some sort of permission errors, you may need to sudo chmod 777 /var/mail , which is what Thunderbird wanted me to do.)

Open up Evolution. In Tools -> Settings -> Mail Accounts, click Add. Enter your Full Name if you wish, and your local mail address username@localhost, then click Forward.

For server type, select "Standard Unix mbox spool or directory." For Path, enter /var/mail/username , then click Forward.

The options on the next screen are optional. Moving right along!

On the next screen, select Sendmail for the Server Type, then click Forward. Name the account however you wish. I would recommend username@localhost, Local Mail, or something similar. Now you're finished!

To test, compose a mail to root@localhost and send it. Then click Send/Receive. You should see the new mail pop up in your inbox.


I am quite new to this, so if there are any errors in here, please feel free to tell me so I can edit this post for accuracy!