Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I'm trying to read local mail with Thunderbird on Ubuntu (with both 12.04 and 13.04). I've followed the instructions found here: How can I access system mail in /var/mail/ via thunderbird?

I can read mail on the system using alpine or vim, so I know the mailbox is not empty. When I click the get-mail button, nothing happens. I see no Inbox (or any folder structure) for the specific account. I've set the rights for /var/mail to 1777.


  • server name: localhost
  • username: john

How can I get this working?

Okay, considering the extra bounty, I would like to get this working like normal mail. The accepted answer from Qasim resulted in a much more usable situation than before - opening mail in Thunderbird with layout. I still face three problems though.

  1. When new mail is received in the mailbox, Thunderbird won't see this until after I restart Thunderbird.
  2. When Thunderbird is restarted, all mail is reset to unread and deleted mail is undone. This is probably because Thunderbird reads the mail from the /var/mail/www-data file, but doesn't update this file. So after restarting, it simply reads this file again, with the new mail and all old mail.
  3. This is probably a postfix issue: mail is sent out to existing mail addresses, but cannot be delivered because the receiving mailserver cannot be reached. This results in "Undelivered mail returned to sender". Only one mailserver can be reached: localhost. Because this is a test system, I don't want real customers to receive mail. I've blocked mail ports in UFW to be sure.

When opening the returned mail, I can scroll down and then I see the original mail with proper layout. So I can read the mail, see if the proper images are included, and for me that's workable. Having to restart TB to read new mail - I know when new mail arrives, so I know when to restart. Having old mail restored after a restart - not big problem as well. I can delete the mail file if it gets too much. I know how it works, but it would be nice if it worked like normal.

share|improve this question
I am uploading the video on youtube ......w8 1 more hour – Qasim Jun 20 '13 at 14:55

2 Answers 2

up vote 10 down vote accepted

Read Local Email With Thunderbird

Watch Vido

Step no 1.

      sudo apt-get install postfix -y

If installed

      sudo dpkg-reconfigure postfix

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

configure it for local email, Choose the default settings & use localhost as hostname

Step no 2.

      sudo nano /etc/aliases

And replace root with your user name, My user name is " one "

   postmaster:    root
   logcheck: one

Then run sudo newaliases so that the configuration is updated.

Step no 3.

you need to create a .forward file containing your username and localhost: e.g. one@localhost so that root's mail will be forwarded to you. To do this, enter these commands:

      sudo nano /root/.forward

And add the user-name@localhost e.g. one@localhost in the file and save it.

Step no 4.

      sudo adduser $USER mail

It is necessary to add your user to the mail group so that Thunderbird could access the mail files

Step no 5.

        logout and login for the changes to take effect

Step no 6.

Now for the Thunderbird configuration. Go to edit > account settings > account actions > add other account > select Unix Mailspool and in the next screen put your username in the first box and place yourusername@localhost in the second box.

enter image description here

enter image description here

enter image description here

Server Settings > Browse

enter image description here

Browse > Select /var/mail folder

enter image description here

Outgoing Server , Port 25

enter image description here

Thunderbird will close automatically & then Write an email to root@localhost

enter image description here

enter image description here

Get Mail

enter image description here

enter image description here

share|improve this answer
Thanks for the long reply. I haven't found the time yet to test it. I'll come back and award the points even if the bounty has expired, if the answer works. – SPRBRN Jun 19 '13 at 7:32
@rxt i'll be waiting – Qasim Jun 19 '13 at 10:33
I can read mail! On opening TB it reads mail and displays all mail as unread. Trying to fetch new mail does not work and needs a restart. It seems impossible to delete mail in TB. – SPRBRN Jun 19 '13 at 11:37
@rxt yes you can ....reboot your pc ...i had the same issue at starting ...then it automatically fixed... – Qasim Jun 19 '13 at 11:38
Some more explanation. Marking mail as being read and deleting mail works, until.... When new mail arrives, all old mail is restored as unread. – SPRBRN Jun 19 '13 at 11:41

Setup a movemail account and restart Thunderbird (the directory structure will appear after that).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.