Migrating Thunderbird mail and settings from Windows to Linux

I have been using Mozilla Mail and later Thunderbird for my email for around five years. My mail folders contain over half a gigabyte of communication, that I definitely do not want to lose. So moving to Linux, I also had to move my mail.

While Thunderbird has features to import email and settings from other mail programs, like Outlook and Pegasus, it does not have an option to import from another Thunderbird installation.

My first attempt of just copying all the mail folders from my Windows profile to the Linux profile did not work as expected. Most of my mails got copied, but some older ones seemed to get lost.

After browsing a bit, I found an explanation of how to do it properly, namely by copying the whole profile instead of just the mail folders. This way, all settings and spam filter training, etc. also get copied – very nice!

First step is to set up a new profile in Thunderbird. This will get stored under “~/.thunderbird/xxxxxxxx.default” (where xxx is some kind of hash value). Next, copy all files from the Windows profile (under Documents and Settings/Application Data/Thunderbird/xxxxxx.default) into the Linux profile. This may or may not include your mail folders, which by default are stored under the profile, but may be customized. In my case, the mail folders were on another drive accessible to both Windows and Linux, so I just let them stay there.

In the profile data is a file called prefs.js. This include the setup of email and newsfeed accounts. In this file are paths to the mail folders. In the Windows profile, these point to something like C:\…\…\. These obviously do not work under Linux, so edit all occurrences to the new path, e.g. something like /home//.thunderbird/xxxxxxx.default/… Make sure the profile and mail folders are read and writeable.

Starting up Thunderbird, you should now see all you mail and settings.

  • Print
  • email
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Twitter
  • Google Bookmarks
  • Google Buzz
  • Posterous
This entry was posted in Software. Bookmark the permalink.

16 Responses to Migrating Thunderbird mail and settings from Windows to Linux

  1. jc says:

    Just did the exact same thing moving towards Ubuntu 6.10 and it seems to be working great. There were several file path references to update in that file though.

    The only issue I might worry about in the future is those folder paths with spaces in the folder name that got moved over from windows. I left them as is in the prefs.js file.

    Thanks for the tip.

  2. Glad to hear you found the tip useful.

    I am still using this setup and it works great.

    The only slightly annoying thing I have noticed, is that sometimes when I switch between Linux and Windows, Thunderbird will need to rebuild indexes for my folders. Also, when that happens, the inbox will sometimes appear empty. Usually, after clicking back and forth on some of the folders, everything is back to normal. Not quite sure why this happens. I do not have any spaces in the path to the folders.

  3. Linux Newbie in Green Bay says:

    Thank you very much for this how-to! I’m migrating to Ubuntu 6.06 LTS, and your procedure worked like a charm. It almost seemed too easy; I was done in just a few minutes.

    Thanks for the help.

    – Curt

  4. Jon says:

    Thanks for the article. Just installed xubuntu 6.06 on an old 733MHz machine and migrated my Windows XP Thunderbird profile over to it, so far so good.

    Cheers!

    Jon

  5. Natasha says:

    This is the best guide for this particular issue. I had to do it twice for it to work though. (I guess since I had fiddled with Thunderbird on Linux before I followed your steps…so I uninstalled/reinstalled Tbird, and voila! no problem)
    I’m still curious though how to actually set it up for the emails to be written and read from both partitions (windows & linux) — you did this to an external drive? Is there a way to set it up internally? That would be ideal.
    I also can’t seem to make the fonts thinner & smaller like it was before. Now nothing seems to fit into its allotted space, and I have to open Thunderbird to fullscreen width in order for everything to be readable. I tried adjusting the font sizes in Pref’s but that didnt do anything, even if I restarted the program.

  6. Hi Natasha, thanks for your comment.
    I have my all my mail folders on a FAT32 formatted partition that is read/write mounted from both Linux and Windows. So in principle, my harddrive is divided into three partitions, one for Linux, one for Windows and one for shared data.
    As for your problem with fonts, is this a problem only in Thunderbird, or is it the same in other desktop apps? I wonder whether Thunderbird reads settings like this from the window manager (probably KDE or Gnome). I will have a look at it.

  7. Pingback: off on another tangent… » transferring my Thunderbird mail to Ubuntu

  8. that worked perfectly for me. thank you so much for taking to the time to make my conversion from windows to linux so much easier. what i have decided to do is use kontact for 2007 with no importing of address books or emails, so i start on a clean slate. then when i need an ‘old’ email or address i just open thunderbird and refer to it. that way i have a great archive, and a great current email program will all the bells and whistles, and i can use all the filing techniques i have learnt on the new system, instead of taking on all the old stuff. i am also using ubuntu as i prefer the program start up stuff on top, and the running stuff below, and i prefer file browser to kubuntu’s. however, i did install kubuntu desktop once i had installed ubuntu, and all the kubuntu programs work fine so far, which i why i am using kontact, which i prefer so far to evolution and thunderbird.

  9. Pingback: Ubuntu Learner» Blog Archive » Migrating Thunderbird from XP to Ubuntu (simple and complex)

  10. anonymous says:

    This worked like a charm.

  11. harce says:

    thx alot! wosent sure what’s the problem, I didn’t know about the config file, but everything works now :]

  12. Chris Gray says:

    Worked beautifully, thanks a lot! 🙂

  13. Tom Martin says:

    Thank you very much for this! I have been hesitant about fully migrating because I hadn’t been able to figure this out before.

    Now that I’ve done it, it’s really simple…

  14. Joey Goncalves says:

    Thanks. Worked for me 🙂

  15. Caio Ariede says:

    Works perfectly on (X)ubuntu 🙂 Thank you.

    Just a note, thunderbird profile: ~/home/.mozilla-thunderbird/

  16. Mick Wahren says:

    Thanks for the tips. Great stuff

    Any idea how to import the folders when you already have a profile with several email accounts already set up on the linux end?

Leave a Reply

Your email address will not be published. Required fields are marked *