April 19, 2016

Reading local mail in Thunderbird

If you are using cron jobs, with crontab, you'll get mail in your local spool mailbox when ever they're done. The way you see this is when you open a terminal, and the:

you have new mail

Appears. Then you stare at it in disbelief, cause you have no clue what, where and how, cause you just emptied your mail from a GUI application.  The mail your terminal is referring to is send internally on your system.

It's known as system mail, there's a nice tread on superuser explaining all this in incredible detail. To read this system mail in Thunderbird create a new mail account. Using your account username like this:

user@localhost

And setting POP3 as the type. Then just select the first option in the dropdown lists. Ensuring that automatic is not selected as the account will then not be created due to tests failing.

Now that you have an account close Thunderbird, and open the file prefs.js in you favorite editor. search for your newly created account, use the user name:

user_pref("mail.server.server7.name", "user@localhost");

You'll find an antry like the above. The server7 part, tells the internal account name for Thunderbird. Your's may be different than mine. Like server2 or some other number. Once you have the server name. Look for the server type entry:

user_pref("mail.server.server7.type", "pop3");

and change pop3 to movemail

user_pref("mail.server.server7.type", "movemail");

restart Firefox and read your local mail. Always remember to back up your shit before editing. Just to be safe. On Linux you may need to change the permissions on the mail spooler:

sudo chmod 01777 /var/spool/mail

No comments: