Search

Monday, January 27, 2020

Moving Thunderbird e-mail from Windows to Linux, MacOS X and other operating systems

Thunderbird Official Logo

The cheap SSD that I had put into my ancient overheated Compaq CQ61 crapped out, forcing me to replace it and reinstall my current favorite operating system MX Linux. As a bit of history, this laptop has gone through three platter hard drive and now one SSD failures. It is also on it's fourth keyboard, third power adapter, and probably 10th battery. But that is beside the point.

Thunderbird is my current email client of choice, and I once again found myself needing to copy over all of my Thunderbird email to the freshly installed MX Linux. Having multiple email and newsgroup accounts, I did not want to enter authentication details for each after the migration either.

The basic steps of grabbing Thunderbird for Windows email including account usernames and passwords are documented all over the internet. On Windows 10 (and possibly on Windows 7 onward), it boils down to:

  1. If Thunderbird is running, close the application
  2. Open File Explorer
  3. Type in the location "%APPDATA%\Thunderbird"
  4. Right-click on the file "profiles" and open in Notepad or your favorite text editor (I use Notepad++)
  5. Examine the file and identify the folder location pointed to by the "Path=" configuration line under the [Profile0] section. This is where all your email and newsgroups should live, and is referred to by Thunderbird as your "profile".
  6. You can copy the folder name from the "Path=" line and paste it into File Explorer. You will see files and folders corresponding to your email and newsgroup accounts.
  7. Assuming you have 7zip or a similar utility installed, in File Explorer select everything and zip them up into a zip archive file.
  8. Transfer this zip archive file to your Linux machine.

Now, on the Linux machine:

    Thunderbird Linux Initial Screen
  1. If Thunderbird was previously launched, there will be a hidden ".thunderbird" directory under your home directory. Delete this directory using "rm -rf $HOME/.thunderbird". Warning: If you have used Thunderbird before, this will delete all existing emails and newsgroup articles!
  2. Launch Thunderbird, but Cancel out all initial windows and exit Thunderbird. Do not create any accounts!
  3. Thunderbird has now created a new .thunderbird directory under your home directory, and inside it you will find the file "profiles.ini". Look at this file:
    cat $HOME/.thunderbird/profiles.ini
  4.  Once again, locate the directory name where your email is stored by identifying the "Path=" configuration line under the [Profile0] section. This will typically be some random letters followed by .default or .default-default or something similar. This is where you have to unzip the files into from the zip archive you copied over from the Windows machine.

Well, I transferred over the profile contents from Windows 10 laptop into the right directory on the new SSD and started Thunderbird up. And, I was immediately hit by Thunderbird asking for credentials for all the accounts in turn. Not only that, Thunderbird refused to remember the passwords, even if I remembered and entered them correctly. I could see my email transferred over, but could not get new ones or send new email without the authentication information for the accounts.

The solution to the "Thunderbird always asking for password" issue turned out to be very simple. Close Thunderbird and simply delete the pkcs11.txt file copied over from Windows in the profile folder (thank you mozillaZine).

Relaunch Thunderbird and enjoy your email on Linux! This procedure should generally work for copying or moving over Thunderbird email across different operating systems.

Update: On Mac OS X, Thunderbird profiles are stored under Library/Thunderbird directory under the user's home directory, i.e. /Users/<username>/Library/Thunderbird/Profiles has the profiles.ini file and subdirectories under there have the profile data.

No comments:

Post a Comment

"SEO" link builders: move on, your spam link will not get posted.

Note: Only a member of this blog may post a comment.

Recommended Products from Amazon