Share and sync mailbox with Thunderbird
Q I've been using Thunderbird as a mail client and am very happy with it. I've now acquired two laptops and would like to be able to access my mailbox from all three machines - ie for them all to share the same contents. My requirements in a nutshell:
- I want to download all mail from the ISP once (I don't want to leave it on the ISP).
- I want to use Thunderbird as the mail client on all machines.
- All machines should share the same set of mailboxes so that I can, for example, send email from laptop 1 and be able to see the sent emails on laptop 2 and desktop as well.
- It should be able to run on Mac OS X 10.4 as well as Linux.
- It should be open source.
I've tried simply sharing out the mailbox directory using Samba, but this doesn't seem to work - it seems to screw up index files.
A There are two ways you can achieve this. One is to use POP3 to collect mail from the server and synchronise the mail storage directories on the two machines. Unison (www.cis.upenn.edu/~bcpierce/unison) is excellent for performing this task, as well as for synchronising any other part of your home more than one box. Unison is best suited to keeping two computers in sync - I use it to keep my laptop and desktop up to date with each other. It uses the rsync protocol to save bandwidth and time but, unlike rsync, it can handle situations where each computer has had files updated since the last sync. Using it with three machines would require a little more effort to begin with, but would certainly be workable. Your other option, which applies only to email, is to run your own IMAP server on your desktop machine. Here you would run Fetchmail to pull messages from your ISP and store them locally, then point the mail programs on all the computers to the IMAP server on the desktop (you do this on the desktop too, setting the server to localhost). Your mail is stored on the server and so is status information, so when you read a mail from one computer it is marked as 'read' on all of them.
Unlike with POP3, with IMAP you leave your mail on the server and can read it from anywhere with an internet connection. Most mail clients have an option to synchronise their local store with the server, so you can also keep local copies of mails for reading when offline. I prefer to use Dovecot (http://dovecot.org), but the easiest choice is probably to use whichever IMAP server your distro defaults to, as that will be largely set up on installation and have the most support from your distro's forums or mailing lists. For something as straightforward as your needs, you shouldn't have to move very far - if at all - from the default configuration. The Dovecot wiki, at the above address, has plenty of information on there is more than one person in your household, is that you can get Fetchmail (possibly with the help of Procmail) to sort your mail into separate mailboxes for each user. Then each can access their mail using the same IMAP server (but a different login name of course).
Follow us on Identi.ca or Twitter