Open the Config Editor from the following menu options:
Tools > Options > Advanced > General > Config Editor
Or if you are using an older version of Thunderbird:
Preferences > Advanced > General > Config Editor
Type mailnews.default in the Filter bar to bring up a small list of preferences to configure. It will display similar to below:
Preference Name Status Type Value
mailnews.default_news_sort_order: default integer x
mailnews.default_news_sort_type: default integer y
mailnews.default_sort_order: default integer x
mailnews.default_sort_type: default integer y
In the above, replace the x and y of the value by double-clicking the name of the preference and replacing it with one of the following values as required:
1 = Ascending
2 = Descending
17 = None
18 = Date
19 = Subject
20 = Author
21 = ID (Order Received)
22 = Thread
23 = Priority
24 = Status
25 = Size
26 = Flagged
27 = Unread
28 = Recipient
29 = Location
30 = Label
31 = Junk Status
32 = Attachments
33 = Account
34 = Custom
35 = Received
So if you wanted to sort all mail by Thread, Descending (newest at top), the preferences in the config editor will look like this:
mailnews.default_sort_order: default integer 2
mailnews.default_sort_type: default integer 22
There are also default_(news_)view_flags settings (for mail and news), which allow to turn on the "Threaded" flag:
view_flags -- the second group of values can be added to one of the first group to combine effects, with several limitations:
Unthreaded 0
Threaded 1
Grouped 64 [mail only (?)]
ShowIgnored 8 [news only]
ShowUnreadOnly 16
ShowExpanded 32 [doesn't seem to work]
ShowUnreadOnly will check the View|Threads|Unread menu; this will cause only
unread items to be seen, but doesn't force a threaded view.
(See also: https://bugzil.la/86845#c74)
6Still valid for 31. Note if you have already opened one folder, it will not be sorted by the new order: it only affects folders which are first opened after this tweak. – Fish Monitor – 2014-09-13T12:18:33.213
1Those magic numbers really don't help at all. – random – 2009-07-27T13:46:12.130
7fossilet is correct, but there's a way to make it work for existing folders as well. Close Thunderbird, go to your Thunderbird profile folder, delete all .msf files, and open Thunderbird again. – Danation – 2015-11-16T20:45:51.390
2Yeah, Mozilla wants us to have fun. Why the hack should we have a simple option for that... TB 45.3.0 (!) – Kai Noack – 2016-09-05T14:51:14.690
3These config values are still relevant with Thunderbird 60.0. – Cengiz Can – 2018-10-07T13:12:02.517
For what it's worth, this seems to work in Thunderbird 61 for Linux (Ubuntu 16.04) too. – icedwater – 2019-04-15T05:05:05.050
I think
ShowExpandedis meant to be used withGrouped, that's probably why it doesn't seem to work (alone). 64=group messages but only expand the first unread group, 96=group but expand every group. – zypA13510 – 2019-08-22T05:07:25.99016Using thunderbird 3.1.10 in Ubuntu : the menu is "Edit > Preferences > Advanced > General > Config Editor" – LeGEC – 2011-07-06T07:14:08.863
2Still valid as of Thunderbird 10.0, in case anyone comes across this and wonders if it is. – WhyNotHugo – 2012-02-29T04:52:55.043
2It works with 17.0 too! – bernie – 2013-01-09T19:58:45.793
6This out to be made default in TB :) – Daniel Sokolowski – 2013-05-03T14:49:07.810