Reading system mail in Thunderbird
Unix systems sometimes send mail to local users; cron output, for example.
Although Thunderbird doesn't seem to have the functionality to read this mail (/var/mail/username on FreeBSD or /var/spool/mail/username on Linux), it actually does. Read on…
As usual, the below is all at your own risk.
One of the workarounds I found for this problem, is installing a POP or IMAP server at the workstation; to me this sounds a bit like 'using a pile driver to crack a nut': it works, but it's a bit overdone.
Another solution would be to send the mail to your regular mail address, for instance by editing /etc/mail/aliases or by creating a ~/.forward file; not only do I think this is not a pretty solution, I also don't feel like sending my 'Security run output' over the internet if I don't have to.
Let's be a bit more pragmatic:
- Start Thunderbird
- Rightclick
Local Foldersand selectNew folder; name the new folder 'Inbox' - Exit Thunderbird
- Open a konsole (or xterm or similar) and go to the 'Local Folders' directory in your Thunderbird profile directory
user01@workstation$ cd "~/.thunderbird/random.default/Mail/Local Folders"
(That folder isn't really calledrandom.default; the name is a random-string, followed by '.default'.) - Make
Inboxa link to your mail spooluser01@workstation$ rm ./Inbox user01@workstation$ ln -s /var/mail/user01 ./Inbox
(That's/var/spool/mail/user01in Linux.) - Start Thunderbird
- Done
The only 'problem' with this setup is that I can't seem to configure Thunderbird to automatically check the Local Folders/Inbox folder for new messages, so the name of the folder is not displayed in bold when there are new messages and I have to remember to check the folder each day.
If you are root on this machine, it's convenient to make root's mail end up in your mailbox (if you haven't done that, yet). Open /etc/mail/aliases (Linux: /etc/aliases), and add 1 line:
root: user01After saving the file, execute
newaliases to activate this new alias.
The easiest way to get root's old mail to your mailbox, is by appending root's mail spool to yours; be adviced that this is not a good idea if one of the mail spools is in use, so exit Thunderbird and do this at a time that no cronjobs are running (and even then I won't make any promises).
root@workstation# cat /var/mail/root >> /var/mail/user01 root@workstation# :> /var/mail/root(A better way would be to use
formail which is installed with procmail, but I don't feel like installing this on my workstation, so I'll take the risk.)
| Responses are welcomed: rob[at]nerdstock.org |
![]() http://creativecommons.org/licenses/by-nc-sa/3.0/nl/deed.en |







