Easy synchronization of email between two machines w/ Thunderbird
Category: Blog

Have you ever wanted to synchronize email between two machines and been disgusted at the lack of options to truly synchronize all mail? Of course there are ways to do it easily between a PDA and a desktop machine, but between a laptop and a desktop there aren’t many options (let alone good ones). Over the years I have tried a combination of things like IMAP, rsync, commercial apps, etc. and never found anything which wasn’t more trouble than it was worth. Today I had a surprisingly simple idea which so far is working fantastically, so here’s the info so you can do the same.


First step is to configure Thunderbird on both machines to check the same pop account. If you need help with this step, then you probably should stop now. When configuring the pop account, check the box which says “leave mail on server” and then check the box which says “delete mail after ___ days”. Set the number of days to the maximum number of days which either machine could go without checking mail (two days seemed reasonable in my case). All of this should seem pretty unoriginal at this point and might work for some people. The issue I had was how to share my sent email between both machines. Fortunately, I found an option in Firefox which makes all of that easily possible. When viewing the email account settings, you should see an option in the left side which says “Copies & Folders”. There, you will see an option which says “When sending email, automatically BCC these addresses”. Click on that option and type in your email address in the box to BCC to. Now all email you send out will be automatically BCC’d back to yourself without any further work. After doing this, we now need to make sure the incoming BCC’d email gets put into the Sent mail folder. We do this by setting up two new rules, the first rule will move mail sent by the other machine into your sent mail folder on this machine, the other will delete the duplicate email received by the local machine which is already in the sent items folder. You could of course uncheck the option in the account setup which saves a copy automatically in the sent items folder, but I didn’t want to do that because if something failed on the MTA, I would then loose my copy of a sent email (which isn’t acceptable to me). The first rule is setup to match on Return-Path being the return path which matches your email address and the user agent string of the opposite machine. My machines have different User-Agent headers (different OS’s), but if your’s doesn’t then you will need something else unique in the headers between both machines. For the actions, you would want to move the email to the sent items folder, mark it as read, and delete it from the pop server (as the other machine already has it in it’s sent items folder anyway). The second rule will match on the same criteria, only with the user agent of the local machine instead of the other machine. The actions for this rule will simply mark it as read and then delete it (putting it in the trash folder). After setting up the rules on both machines, any email sent by one or the other machine will now show up in the sent items on both. Although nothing in these instructions is revolutionary or ground breaking, it does work very well for keeping mail synchronized between two machines without requiring any additional software. If you have any questions or know of any other methods, please feel free to leave a comment.

Tags:

6 Responses to “Easy synchronization of email between two machines w/ Thunderbird”

  1. soccaj says:

    Why not using webmail like gmail or yahoo mail. You don’t have to synchronise at all

  2. Jeremy says:

    Two reasons behind that actually.

    1.) This is my Yahoo work email so Gmail wouldn’t work. Yahoo mail would sorta work, but it doesn’t support subfolders (neither does Gmail) and I have a very rigidly designed mail organization system.

    2.) I wanted to be able to read my mail even when I didn’t have an internet connection (like when I am on a plane).

  3. Pat says:

    This looks like a very neat solution and will meet my needs perfectly. Not revolutionary or groundbreaking? It’s a pretty creative use of available resources – and can’t be emulated in Outlook – at least I can’t find a way to automatically bcc an address! So I’ll give Thunderbird a go… Thanks!

  4. [...] you are using Thunderbird, there isn’t really anything notable available. However, Jeremy Johnstone posted on his site a unique way of getting the job done without using any special software. His method, in short, [...]

  5. FYI, I have created Thundercat, a .NET 2.0/Mono 1.9 application to synchronize mbox mail files. Thundercat is heavily tested with Thunderbird mail files and is freely available from: http://thundercat.dpant.com. The website contains all technical information, too.

    Please feel free to try Thundercat out and let me know of any shortcomings / bugs.

    Thank you very much.

  6. Stuart Elder says:

    Brilliant Jeremy! Just what I’ve been looking for, and oh so simple.

    Many thanks.

    Stuart

Leave a Comment

Spam Protection by WP-SpamFree