Threading messages in Thunderbird

One of my favourite features in a mail client is Threading. This shows you all the messages in a folder that are related to one conversation in one place, similar to GoogleMail’s conversation view, but it actually more context with you have multiple related discussions going on at once.

Outlook Express has had it for years, as has Thunderbird, WorldClient recently added Threading support too. For OE and WorldClient, this setting is per-user, it applies to all folders in your profile, so it’s easy enough to toggle. However, Thunderbird stores the “thread” flag on a per folder basis though, which is always a pain when setting up a new computer since I’ve got hundreds of folders and want every one of them threaded. After literally years of searching, I stumbled across a way to accomplish this goal.

Find your Thunderbird profile, create a file called “user.js” and edit it in notepad. Take care to not end up with “user.js.txt” as that won’t work. Inside the file, add these lines:

# Mozilla User Preferences

user_pref(“mail.check_all_imap_folders_for_new”, true);
user_pref(“mailnews.default_sort_order”, 22);
user_pref(“mailnews.default_sort_type”, 1);
user_pref(“mailnews.default_view_flags”, 1);
user_pref(“mailnews.headers.showSender”, true);
user_pref(“mailnews.headers.showUserAgent”, true);

Restart Thunderbird, and now any newly created folders will automatically have threading enabled, oldest threads first. If you want newest threads first, change “default_sort_type” to 2.

I got this clue from Thunderbird’s bugzilla bug #86845 and thought I’d share it here since I’m sure I’m not the only one who has wanted this.

So what if you want to make all your current folders thread automatically without going folder by folder? If you use IMAP, you’re in luck, shut down Thunderbird, look for the \ImapMail\ subdirectory and rename or delete it. This will cause Thunderbird to forget everything it knows about all folders, reloading them as new, and redownload all content (which doesn’t take long since it just downloads headers, messages aren’t downloaded until they’re accessed).