Charlie Harvey

Thunderbird/Icedove sort order and delete order on Debian Squeeze

Its true. By default Icedove (that’s Thunderbird to non-Debianists) puts the newest emails at the bottom of the message list. This is wrong and evil (I may be exaggerating). It took me a while to find the proper solution and then a bit longer to figure out I needed to delete the .msf files from my ~/.icedove/123xyz.default/ folder to stop the old sort order from staying put. And then a bit longer again to have the correct email be selected after I deleted one. You probably want to back up your profile before trying this.

  1. First we open Edit | Prefs | Advanced | General | Config Editor . You might get a warning if you’ve not been there before.
  2. The preferences you’ll need to set are these:
    Key Set it to
    mailnews.default_news_sort_order 2
    mailnews.default_news_sort_type 18
    mailnews.default_sort_order 2
    mailnews.default_sort_type 18
    mail.delete_matches_sort_order true
  3. The final step is to stop Icedove and then delete any .msf files from your ~/.icedove/xxxxxxxxx.default folder. These cache folders and hence won’t reflect your changes.

WTF? Why did that work?

I had a look at the Mail and news settings reference. It looks like the various sort_order keys can be 1 or 2 for ascending or descending sort respectively. But that document does not tell us what the values for sort_type can be. After some faffage and fiddling I came up with a simple guide to the possible sort_types.


Number Meaning
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
32 Attachments

The last setting, mail.delete_matches_sort_order is a boolean and you want it set to true for intuitive behaviour when you delete an email.


  • Be respectful. You may want to read the comment guidelines before posting.
  • You can use Markdown syntax to format your comments. You can only use level 5 and 6 headings.
  • You can add class="your language" to code blocks to help highlight.js highlight them correctly.

Privacy note: This form will forward your IP address, user agent and referrer to the Akismet, StopForumSpam and Botscout spam filtering services. I don’t log these details. Those services will. I do log everything you type into the form. Full privacy statement.