Migrate your Thunderbird emails from Windows to Linux

Thunderbird icon

If you're experimenting with Linux, or even moving over to it and you're currently using Thunderbird as your email client on Windows, you might be wondering how to move your emails and profile from Windows over to Linux.

This process can even be used as part of a bigger project, for example to move from Outlook Express or another Windows-only email client on Windows to Thunderbird on Linux. If you first Import from your Windows client to Thunderbird on Windows, you can then follow this tutorial to move that over to Linux. But anyway, let's get on.

The first thing I recommend doing isn't essential, but can prevent headaches later. In your Windows copy of Thunderbird, go to File > Compact Folders. This cleans your mail folders up and can prevent issues with unread counts not being correct once your profile folder has been migrated over.

The process is reasonably simple, provided you know where your profile folder is on Windows and can transfer the files somehow between Windows and Linux. To find your profile folder, follow the instructions on this page that pertain to the version of Windows you are running.

Once you've found that profile folder (and you're inside Thunderbird > Profiles), there should be a randomly named folder ending with .default. Copy this folder somehow to your Linux machine.

Over on Linux, we first need to remove any existing profile information for Thunderbird if you've opened it already. Obviously, make sure you're not actually using Thunderbird on this user account for anything important, or this step will end up deleting all your email there. You have been warned.

Go into your home folder on Linux, and choose View > Show Hidden Files. If you've already opened Thunderbird, there will be a folder called .thunderbird (Debian and Ubuntu users, .mozilla-thunderbird). Delete it - as long as you're sure there's nothing important there.

Now (re)create that folder, so right-click, Create New Folder and name the folder .thunderbird, or .mozilla-thunderbird on Debian/Ubuntu. Go inside your new folder and paste your profile folder that you copied from Windows.

There is one final step you need to take to get your mail up and running in Linux. Inside .thunderbird, you need to make a file called profiles.ini. Do a right-click and create a new text file in the folder, and name it profiles.ini. Open up this new file in a text editor, and paste in the following:

[General]
StartWithLastProfile=1
[Profile0]
Name=default
IsRelative=1
Path=xxxxxxxx.default

Replace the xxxxxxxx with the real name of your profile folder that you pasted. Save the file and quit, and now launch Thunderbird. Your email should load up as if nothing has happened and all your archives should be up and rolling.

Should you run into any problems with folder unread counts being incorrect as I mentioned above, you'll have to go through the affected folders, mark items so that the unread count is correct again, then perform File > Compact Folders to force those changes to save to disk, or the problem will reoccur.

Avatar for peter Peter Upfold - http://peter.upfold.org.uk/

Peter Upfold is a technology enthusiast from the UK. Peter’s interest in Linux stems back to 2003, when curiosity got the better of him and he began using SUSE 9.0. Now he runs Linux Mint 9 on the desktop, runs a CentOS-based web server from home for his personal website and dabbles in all sorts of technology things across the Windows, Mac and open source worlds.

Home » Articles »

Discussion: Migrate your Thunderbird emails from Windows to Linux

  1. Anirudh (guest)

    # Posted on 04 March 2008 at 09:22 PM

    As far as I know, the profile folders can just be copied between systems. The profile folders have been designed to be as OS independent as possible.



  2. Ridgeland (guest)

    # Posted on 05 March 2008 at 03:59 PM

    I use a small data partition to store Firefox bookmarks, Thunderbird's xxxxxxx.default and more. Then as I try Ubuntu, Fedora, SuSE whatever I just use a link to have the new OS point to /UserHome/Thunderbird/xxxxxxx.default, bookmarks etc. When I add a new bookmark in Fedora it's there in SuSE and Ubuntu too. I have all three installed on my PC. Maybe you could keep the original in Windows and use Linux to link to it. Here we always unplug the DSL line before booting Windows, for obvious reasons.



  3. # Posted on 06 March 2008 at 01:01 AM

    <strong>Story added...</strong>

    This story has been submitted to fsdaily.com! If you think this story should be read by the free software community, come vote it up and discuss it here:

    http://www.fsdaily.com/EndUser/Migrate_your_Thunderbird_emails_from_Windows_to_Linux...



  4. NixCraft (guest)

    # Posted on 07 March 2008 at 07:28 AM

    Well, Here is another way to do it.

    1) Copy only your mail folder: C:\Documents and Settings\YOU_NAME\Application Data\Thunderbird\Profiles\XXXXXX.default\Mail

    2) In your Linux system; redo your settings: IE: smtp, imap server, passwords, etc. Yep, an extra step; but not huge. Your profile is created.

    3) Copy and paste your mail folder in your ~.thunderbird/.../.../mail directory. Yep; over write it.

    4) Don't forget to change permissions so you have write access.

    PS: You don't have to work with profile issues; *.ini issues, etc; since it is a new profile. To sum it up; I traded up front configuring a new account; with "potential" profile issues. Was it worth it? Well... I think so... but YMMV.



  5. Matt (guest)

    # Posted on 02 May 2008 at 04:55 AM

    Thanks for the article. My laptop drive earlier week. Luckily I had a back of the data and with this short tutorial I was able to quickly get my email back online!

    Thanks, Matt



  6. John (guest)

    # Posted on 27 July 2008 at 07:19 PM

    Thanks for a short and sweet tutorial. Had to move my wife's huge Thurderbird profile from Windows to her new Linux (Ubuntu) machine and the article was a life saver.

    Cheers! John



  7. Daneel (guest)

    # Posted on 24 August 2008 at 01:07 PM

    To #2 I'm trying to achieve the same behaviour on Mandriva 2008.1 but when I make links to

    /mnt/win_c/Documents and Settings/jirka/Data aplikací/Thunderbird/Profiles/zhi5grk7.default

    and

    /mnt/win_c/Documents and Settings/jirka/Data aplikací/Thunderbird/profiles.ini

    and start Thunderbird, it says "Thunderbird is already running....."



  8. Outlander (guest)

    # Posted on 05 November 2008 at 10:55 AM

    Sweeeet - Instructions were clear and correct. I managed to migrate my Thunderbird profile from WinXP into Ubunti 8.10, without problems.

    Thanks for the helpful post.



  9. LiCo (guest)

    # Posted on 28 November 2008 at 01:40 AM

    Hello, I think I have a "big" problem here. See with me:

    1) I backup my messages from Outlook Express (.dbx to my pendrive for example) 2) I formatted my HD and installed MANDRIVA 2008 (so, I don't have Windows anymore) 3) I installed Mozila Thunderbird

    And it's the problem: I can't import my messages now! I can't find my folder with messages to import. And I don't have Windows! Only Mandriva, Thunderbird and my backup.

    Any help please? I'm a newbee in Linux and I'm trying to change completaly from Windows.

    My email is fabinho_lico@yahoo.com.br and I'd like someone get in touch with me.

    Thanks

    Sorry for my bad English.



  10. Peter (guest)

    # Posted on 28 November 2008 at 07:51 AM

    @LiCo - you need to find a friend with Windows and Outlook Express. Take your dbx file to them, import it into their copy of Outlook Express. Then, install Thunderbird on that Windows machine and import your messages into Thunderbird.

    Once you have everything in Thunderbird, you can copy your profile over to Linux, follow the procedure above and it should work. (Also check your account settings once in Thunderbird; it's been a while since I last used OE so I don't remember exactly how it works).



  11. LiCo (guest)

    # Posted on 28 November 2008 at 10:12 AM

    Hello Peter, first of all, thanks for mailing me and answer me.

    I think I'll do this, on Windows.

    I'm learning Linux, and tryin to use ONLY this OS, so that's why I was trying to do all conversion by Linux. But my brother has Windows and I'll folow the steps above.

    Thanks anyway.

    But ...... should have a way lol :oD



  12. VistaConvert (guest)

    # Posted on 29 November 2008 at 06:47 PM

    Thanks for the tip. It worked perfectly.



  13. # Posted on 23 December 2008 at 08:56 AM

    [...] http://fosswire.com/ [...]



  14. Moe (guest)

    # Posted on 01 January 2009 at 03:37 PM

    Everything fine until the final step. When you save and exit profile.ini: [General] StartWithLastProfile=1 [Profile0] Name=default IsRelative=1 Path=xxxxxxxx.default a new file (can't remember the name but it's got a triangular symbol) is created which must be deleted otherwise Thunderbird can't be started.

    Moreover, there's an easier way to carry out this stage. Install and start Thunderbird, then exit without configuring anything. This creates the xxxxxxxx. dev ault folder and the profile.ini text doc. All you have to do now is delete the xxxxxxxx.dev ault folder and copy and paste your migrated xxxxxxxx.dev ault folder in its place; then change the alphanumeric path part only for your new profile in the profile.ini document (Path=xxxxxxxx.default) and save and exit. Delete the newly created file with the triangular symbol which appears. Start Thunderbird, and that's it.



  15. Moe (guest)

    # Posted on 01 January 2009 at 10:47 PM

    Oops! Forgot to thank you for your clear step-by-step Thunderbird tutorial, and to congratulate you on your excellent blog. Keep up the good work.



  16. ryan (guest)

    # Posted on 14 January 2009 at 05:04 PM

    I get the following message when i try to open thunderbird:

    “Thunderbird is already running…..”

    Any ideas why? I have chown username.username on the XXXXX.default folder.



  17. Paulo (guest)

    # Posted on 13 February 2009 at 01:14 AM

    Thank you.

    The explanation is simple and objective. It work fine. And the file profiles.ini, with a little change (in path remove the "profiles" directory name).

    Thank you again.



  18. Mareen (guest)

    # Posted on 21 April 2009 at 08:51 PM

    Thank you! I had problems with the just-copy-method ("tb is already running...") but this (quite easy) way everything finally works (i've tried a lot!). Thanks.



  19. Ikbal (guest)

    # Posted on 24 May 2009 at 01:36 PM

    Very helpfull tutorial.

    Thanks for sharing.



  20. Martin London (guest)

    # Posted on 06 August 2009 at 07:13 PM

    nice manual, but it didn't work for me ... I've got "Thuderbird is already running....".

    Solution is here: http://kb.mozillazine.org/Moving_your_profile_folder

    You can't just simply move the whole profile. You need to create a new one in Linux and then just copy inside all subfolders from the Windows one. That's it:)



  21. Briseis09 (guest)

    # Posted on 18 September 2009 at 08:19 PM

    Hi, Peter,

    I just want to say that is an awesome, straightforward tutorial. I wasn't sure I was going to be able to do this, but I tried and it worked. I did get a little stumped on the part where you replace the xxxxxxxx.default. I wasn't sure whether I should save and replace the file. I did save it and it worked. I'm not as savvy on a computer, but these instructions were very easy to follow.

    Thank you so much and thanks also goes to a friend for referring me to your article!

    Much Loves & Huggles, Briseis09 :O)



  22. Sergani (guest)

    # Posted on 26 October 2009 at 06:29 PM

    is there a way to migrate my emails from thunderbird (vista), to thunderbird (fedora 11), knowing that i've used my linux version for a couple of days now?! also, i'm using the same thunderbird version for both platforms; 3.0b4

    Thanks!



  23. vanye (guest)

    # Posted on 03 November 2009 at 10:45 AM

    Hi, this is just my second thay on a linux machine and your tuorial was very helpful to migrate all settings of Thunderbird from XP. But it seems that I have missed a step because all e-mail folders have been created as on XP but they are empty. No e-mails inside. What do you suggest.

    Thanks



  24. Gonzalo (guest)

    # Posted on 21 April 2010 at 11:23 PM

    Thanks a million! you are my hero.



  25. # Posted on 31 May 2010 at 09:24 AM

    Hi, since linux now supports ntfs very well, it is sufficient to remove .thunderbird and make a symbolic link to your windows thunderbird folder, which may be:

    ln -s /win/c/Users/xxxx/AppData/Roaming/Thunderbird .thunderbird

    You can thus continue with the SAME repository which keeps in sync and even extensions are in sync!!!



  26. ZADixie (guest)

    # Posted on 02 June 2010 at 12:14 PM

    Done that and it works. I now also have a better idea of how Thunderbird "ticks". Thank you so much.



  27. Sudiro (guest)

    # Posted on 23 July 2010 at 02:51 AM

    Hi Peter, thanks a lot for your valuable tips. My questions is : how about the rules? should i have to re-create in ubuntu-thunderbird? please let me know

    Cheer ( "Salam" in Indonesia Language"

    Sudiro



  28. # Posted on 23 July 2010 at 07:41 AM

    Sudiro,

    I haven't tested Rules specifically myself, but I'd assume they are part of the Thunderbird profile and would migrate across without any extra effort.

    The only thing I had issues with when doing this myself was email signatures -- the files were in different locations on the two platforms and had to be recreated manually. I believe in recent versions of Thunderbird (since this post was written), signatures are now handled differently, though.



  29. Nald (guest)

    # Posted on 18 August 2010 at 09:23 AM

    works like a charm on ubuntu lucid lynx, considering this tip is two years old.

    thanks Peter.



  30. Eric (guest)

    # Posted on 03 November 2010 at 09:49 PM

    Wow this was so easy don't eve have to create the profiles.ini just had to remove "profiles" from the path string and copied it to linux too. Thanks for the info btw!



  31. Peter (guest)

    # Posted on 08 January 2011 at 08:34 PM

    Thanxx! Succeeded in one time to transfer my mail From XP to Ubuntu 10.10, Very useful information for new-bees in open source OS.



  32. magellan (guest)

    # Posted on 11 January 2011 at 09:52 PM

    Hi i would like to add about the profile.ini changes the *.default i just migrate my windows 7 TB mail to ubuntu 10.04 and try to use the above mention but it doesnt work TB version is 3.1.7. i just let the profile.ini as it is and the .default but i copy the content of my windows7 .dafault inside the ubuntu.10.04 TB *.dafault and works fine.Some addition the google calendar doesn't sync you must have to reinstall the two extension responsible for sync google cal.which is the lightning 1.0b2 and Provider of google calendar 0.7.1



  33. Dimitris (guest)

    # Posted on 23 January 2011 at 07:50 PM

    Thanks very much for that Peter. Worked first time out on Ubuntu 10.10



  34. Dimitris (guest)

    # Posted on 15 February 2011 at 04:35 PM

    Hi, I am having trouble with encoding in the imported e-mails. Some of the emails appear like gibberish. The problem is not fixed if I change the encoding of the message.

    Also, some e-mails appear as html. Which also seems to be an encoding problem (broken headers).

    Has anyone come across this problem?

    BR



  35. kamal (guest)

    # Posted on 02 March 2011 at 02:59 PM

    Hi, I have a small problem. I use Thunderbird on my Linux laptop for my gmail mails. And i have thunderbird on my office windows desktop for my office mails. I want to backup my mails from office windows desktop to linux laptop, but cant afford to loose my gmail account or mails. Any help please on how should i do that ?



  36. Heinz Ruffieux (guest)

    # Posted on 20 July 2011 at 09:48 AM

    Hi, I have migrated from Outlook Express to Thunderbird on Windows successfully using this: http://www.howtoforge.com/importing_outlook_express_into_thunderbird_evolution

    I could see all my emails in Windows Thunderbird as well as all the addresses.

    Now I migrated the profile to my Linux Box as described here: http://www.howtoforge.com/importing_outlook_express_into_thunderbird_evolution_p2

    Linux Ubuntu reads in the correct profile (files there get updated when starting TB) but I can not see any of the migrated folders and neither the address book. Also the configuration is not recognized. It's just like I would start TB with an empty profile....

    On Windows as well as on Linux I am using the latest versions of TB.

    In order to install Linux I had to destroy the Windows partition as it is installed on an old computer with a small HD.

    Any ideas?

    Thanks

    Heinz



  37. steve (guest)

    # Posted on 02 August 2011 at 08:51 PM

    really really helpful!!! Thanks a lot!!!

    Done this and thunderbird works like a charm with all settings and e-mails.



Home » Articles » Migrate your Thunderbird emails from Windows to Linux

Sign In