Thunderbird: Rearrange the order of email accounts


The other day I had to change an email account from POP3 to IMAP. It was 3rd on my long list of email addresses (yes, I am a massive email whore) and when I added a new account it went smack bang down to 10th at the very bottom =(

To rearrange the email accounts on the left hand tree, you have one of two three options.

Use my order generation script

I spent 15mins whipping up this script because I really don't wanna install something I don't need to.

On the other hand, its a pain in the ass to do it manually.

I've put the script here if anyone wants to use it. You can read the source code before entering any data in.

Download the FolderPanes Extension

This is the easiest way. I've never tried it, but lots of people say it works. Get it here.


Edit the file manually

This can be a little painful, as the account IDs aren't what you'd expect.

Close off Thunderbird and open up your Thunderbird profile folder. Edit "prefs.js" in notepad.

Search for "mail.accountmanager.accounts".

Now that whole row should read something like this:

user_pref("mail.accountmanager.accounts", "account9,account1,account7,account5,account8,account11,account10,account6,account3,account2,");

Now the tricky bit is to find the matching ID's. You'll have to scroll past the whole chunk of "" blocks and look for "mail.server.server#".

Naturally you'd presume that the identity IDs are the ones you need, but it isn't. It actually needs the server ones.

To make your life easier, open up a blank notepad file and copy over all the values of "".

Rearrange them in the notepad to the order you want and then change the value of "mail.accountmanager.accounts" accordingly.

Save "prefs.js" and start Thunderbird to check if the order matches what you set.

Even more success!

[ Source ]


  1. Thanks, it worked (method 2). I also had to change the value of mail.accountmanager.defaultaccount to the account I wanted to appear first in the list, though.

  2. Thanks! Manual all the way!

  3. Thanks for the post, however the add on didn't work. Also, I can't find the navigation path to Thunderbird profile folder after some Google research?
    Obviously a noob, so the specific path would help if you're able to.
    I'll keep looking in the mean time.
    p.s. I tried to delete the email accounts and setup again in alphabetical order, but seems to be no easy way of deleting email accounts?

    1. Sorry, as mentioned in the post I haven't tried the extension method.

      If you want to remove email accounts, just go to account settings, select the account and click remove.

  4. like a walk in the park, perfect!

    if you have deleted some accounts, you might have list like: account1,account2,account6,account9 then you need to check above what account is connected to certain server **user_pref("mail.account.account9.server", "server7");**

  5. Yes - Anon above is right so be careful when changing the Preferences file:

    You need to find out the user-pref mail.account/server mappings:

    e.g. user_pref("mail.account.account9.server", "server5");

    Also If you're using "Unified Folders" they have an account/server name.


Leave your thoughts ...
If you are having trouble with copy/pasting in comments, you need to sign in or click 'Preview'. For more information about this Firefox bug, see here.

Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog