piątek, 4 maja 2012

Forwarding all root mails to local user and receiving them using Thunderbird

Yesterday I checked my root local mailbox on my laptop running Ubuntu 12.04 LTS and found out 1500 hanging mails regarding problems with anacron daemon, That is quite a lot. It seems that I forgot to check the mailbox for quite long time so I decided to make it more visible to a standard user that I am using on my laptop and use the Thunderbird mail client (that I am daily using) to get them. You will need to replace the username with your username.


1. Create mailbox

If you want to create a new one:
root@localhost# touch /var/spool/mail/

If you want to create one with root:

root@localhost# cp /var/spool/mail/root /var/spool/mail/

Next create proper access permissions:
root@localhost# chown :mail /var/spool/mail/
root@localhost# chmod 640 /var/spool/mail/

2. Forward mails from root account to local users

You need to add the following line to the .forward file in the root home directory (if it does not exists you need to create it e.g. using vim utility):


root@localhost# cat /root/.forward
@localhost

Now the mails coming to root user should be forwarded to the user indicated via

3. Configure Thunderbird

On my Ubuntu 12.04 LTS I am using Thunderbird version 11.0.1.

In order to manage your local mailbox account you need to configure a 'Unix Mailspool (Movemail)' account. You will find it when creating an other account (File -> New -> Other Accounts...):

Figure 1 The Account wizard for creating the Movemail account

Then just follow next steps (acoount name, mail etc.). As soon as you finish, you should have your local mailbox visible in the Thunderbird main window.


Now I hope to get more visibility especially with respect to anacron jobs running on my laptop. 





Brak komentarzy:

Prześlij komentarz