PDA

View Full Version : HowTo: Read System Mail in ThunderBird


klineberger
January 7th, 2006, 07:38 AM
If you want to read Linux System Mail with a mail client like thunderbird, you can use the following trick that may work with the other GUI clients:

Create a subfolder in "Local Folders/Inbox" called "System", or whatever. Exit Thunderbird, move into ~/.mozilla-thunderbird/xxxx.default/Mail/Local\ Folders/Inbox.sbd/ and find a empty text file called System. Remove it and replace it with a symbolic link to /var/mail/your_user_name

cd /home/pepito/.mozilla-thunderbird/xxxx.default/Mail/Local\ Folders/Inbox.sbd/
rm System
ln -s /var/mail/pepito System

That's it

Gandalf
January 19th, 2006, 11:56 AM
Thats a cool trick
Thanks :D

ounas
January 20th, 2006, 03:19 PM
Nice one thanks...

Brrr here is cold -35C

-Ounas:D

juantxorena
January 21st, 2006, 05:38 AM
My /var/mail directory is empty :???::???::???::???:

george_apan
January 21st, 2006, 06:52 AM
My /var/mail directory is empty :???::???::???::???:
Mine too...

Chrissss
January 21st, 2006, 09:13 AM
Start once e.g. the mailer mutt. After that your mbox files will be created :)

CU
Christoph

george_apan
January 21st, 2006, 02:22 PM
Start once e.g. the mailer mutt. After that your mbox files will be created :)

CU
Christoph
Sorry but this didn't help. I installed mutt (postfix was installed along with it). There were some configuration options for postfix where I just pressed enter. When I run mutt I get an error saying that there is no /var/mail/username directory. What am I doing wrong?

edit: And a Mail directory was created in my home dir.

stalefries
January 26th, 2006, 07:02 PM
I can't for the life of me find System.

pbb
February 1st, 2006, 07:12 AM
I can't for the life of me find System.

Did you first create the mailbox "System"?

Create a subfolder in "Local Folders/Inbox" called "System"

simplyw00x
February 18th, 2006, 09:06 AM
A bit of necromancy, but I found that doing this in Evolution is even easier. Go Edit/Preferences, and create a new account. Enter anything as the email address, then on the next page choose "Standard mbox spool or directory", then enter '/var/mail/yourusername' as the directory. Click next, and choose 'sendmail' as your mail server. Finished!

george_apan
February 18th, 2006, 09:20 AM
A bit of necromancy, but I found that doing this in Evolution is even easier. Go Edit/Preferences, and create a new account. Enter anything as the email address, then on the next page choose "Standard mbox spool or directory", then enter '/var/mail/yourusername' as the directory. Click next, and choose 'sendmail' as your mail server. Finished!
Thanks. This worked fine! :)

I don't understand why I have a /var/mail/username directory now while there was nothing in /var/mail before. I didn't touch anything in the meantime (I think). Maybe there was nothing in there because I had no system mail until now? :confused:

simplyw00x
February 18th, 2006, 12:49 PM
There should definitely have been something there; the ubuntu installer sends you email to let you know when ubuntu is installed, and several dpkg warning messages also get sent there. Anacron and cron send stuff there as well.

george_apan
February 18th, 2006, 02:56 PM
There is only one e-mail sent by Anacron in my system mail dated January 22nd anyway. Maybe the directory was created automatically with this e-mail and I just realized it. My previous attempt with thunderbird was before that date.

Rizado
February 18th, 2006, 05:21 PM
I don't have anything in my /var/mail/ either. Running Kubuntu on this box but it's empty on another ubuntu computer too. And what the hell is mailer mutt :confused:

Anyway in thunderbird 1.5 there's no Inbox.sbd/, System is directly under Local folders so it probably works too.

george_apan
February 18th, 2006, 05:47 PM
I'm wondering... Have you logged in at least once straight to the console instead of the gui? Maybe this is needed to create something in /var/mail/

Try pressing Ctrl+Alt+F1 while in Gnome/KDE. You'll get a text only console (tty1). Log in with your username and password and see if you get a "You have mail" notice. You can go back to your gui by pressing Ctrl+Alt+F7 any time.

Rizado
February 19th, 2006, 04:41 AM
Loads of times. I've been using fedora and redhat before and I always got messages. Now with ubuntu it seems as if some service aren't running.

dcstar
February 26th, 2006, 06:17 AM
A bit of necromancy, but I found that doing this in Evolution is even easier. Go Edit/Preferences, and create a new account. Enter anything as the email address, then on the next page choose "Standard mbox spool or directory", then enter '/var/mail/yourusername' as the directory. Click next, and choose 'sendmail' as your mail server. Finished!
Also you may want to change your "Check for new mail" setting to 1 minute (it is a trivial internal file reading task, so it won't load you system too much).

And if you want the root mails sent to your own user account - so you can read them via this method - do the following:

Install the postfix package, then in a user terminal:
sudo gedit /etc/aliases
Add in a line similar to the following and save the file:

root: yourusername

Then:
sudo newaliases
sudo /etc/init.d/postfix restart
Now all root mails (like the ones cron sends etc.) will be redirected to your internal e-mail account, which will then be read by your mail client.

PS, if you want ALL your internal mails to be sent to an external e-mail address, you can also use the aliases file for this (assuming you have an SMTP server set up and working).

PPS, I might make this a HOWTO on it's own for Evolution users, they may not look at this one.

george_apan
February 27th, 2006, 07:23 AM
I get a "sudo: newaliases: command not found".

dcstar
February 28th, 2006, 03:24 AM
I get a "sudo: newaliases: command not found".
Should be part of the postfix package.

george_apan
February 28th, 2006, 05:51 AM
Should be part of the postfix package.
Yes, that was it. Thank you! :)

mezhaka
October 25th, 2006, 08:45 AM
I don't have anything in my /var/mail/ either. Running Kubuntu on this box but it's empty on another ubuntu computer too. And what the hell is mailer mutt :confused:

Anyway in thunderbird 1.5 there's no Inbox.sbd/, System is directly under Local folders so it probably works too.

so am i. have you figured out what was the deal?

i'm playing with "at" and "batch" and just can't find any file they send the output to...

mezhaka
October 27th, 2006, 10:03 PM
so am i. have you figured out what was the deal?

i'm playing with "at" and "batch" and just can't find any file they send the output to...

ok, at last i've found out the root of the problem. i had no Mail Transfer Agent on my system installed. so installing postfix fixed all the stuff.