Thunderbird: export email account settings

I'd like to create a new profile for Thunderbird using the same mail accounts I already configured in my old profile. As it is quite a number of accounts, it would be great to have a way to export/import them instead of writing down the settings just to fill in again in the new profile.

Using web search and search here I mainly found following suggestions that do not match what I need:

  1. Copy the whole profile: Not possible for me as I don't want to copy other settings, the downloaded mail data etc. and the old profile broke when running out of space in the home folder anyway.
  2. Use mozBackup: There seem to be several programs by that name (forks?). In any case, it's Windows-only and hence no option (I am mostly on Linux and prefer platform-independent solutions anyway)
  3. Use accountex: Seems to do what I want, but it is not compatible with current Thunderbird version (supports only up to version 3.1)
  4. Posts with various tips from > 4 years ago: Top results in the web search with the G. But they do not work in current versions of Thunderbird either.

Did I overlook anything? After all, it doesn't sound like I was looking for something nobody ever looked for.


Solution 1:

You could copy the relevant prefs.js items manually.

  • mail.account.*
  • mail.accountmanager.*
  • mail.identity.*
  • mail.server.*
  • mail.smtpserver.*
  • mail.smtpservers

For example:

egrep 'user_pref\("mail\.(account(manager)?|identity|(smtp)?servers?)[."]' \
    < old-profile/prefs.js >> new-profile/prefs.js

The file is located in your Thunderbird profile directory, uses the same format on all platforms, and even on all Thunderbird versions (hasn't changed much from Netscape Navigator days, I believe).