Convert mbox-based Local Folders to Maildir in Thunderbird 102 #

The roadmap for Thunderbird 102 (2022) mentioned Maildir support and a decade-old Bugzilla issue about finishing the job:

Maildir is a message storage format that should improve data safety, allow for incremental (delta) backups of messages and allow for antivirus to interact better with messages. Maildir will be vastly improved for 102, but may not be pref'd on by default.

845952 - (maildirblockers) [meta] finish "maildir" message storage

There is still little in the way of official documentation, so I decided to test 3 native methods for converting mbox-based Local Folders to Maildir under macOS 12.4 Monterey and Mozilla Thunderbird 102.

Back up before attempting any of these; Mozilla's Maildir in Thunderbird page still warns:

We suggest you leave Maildir disabled unless you are an advanced user, willing to risk your data, and know how to back up your email before turning on Maildir and how to restore it if you run into problems.

1. Failed: New import wizard (from 2022 for Thunderbird 102)

Thunderbird 102 introduced a new import/export wizard which sounded promising; alas, it did not avail:

  1. Create and open a new Thunderbird profile then close the Account Setup tab

  2. Thunderbird → Settings → General → Indexing → "Message Store Type for new accounts:" → change from "File per folder (mbox)" to "File per message (maildir)"

  3. For good measure: Thunderbird → Settings → General → Config Editor... → set "mail.store_conversion_enabled" to "true".

  4. Tools → Import... → Import from another Thunderbird installation → Continue → select mbox-based Thunderbird profile → Continue → uncheck all but "Mail Messages" → Continue → click "Start Import" then "Finish"

Thunderbird automatically restarted and a new "Thunderbird Import" folder appeared under Local Folders, but it only contained empty subfolders.

2. Failed: mbox to Maildir conversion (from 2018 for Thunderbird 60)

From Thunderbird 60.0 Release Notes:

Thunderbird now allows the conversion of folders from mbox to maildir format and vice versa. This is an experimental feature that needs to be enabled by setting the preference mail.store_conversion_enabled. Note that this functionality does not not work if the option "Allow Windows Search/Spotlight to search messages" is selected.

Let's give it a try:

  1. Thunderbird → Settings → General → Config Editor... → set "mail.store_conversion_enabled" to "true".

  2. Right click Local Folders → Settings → change "Message Store Type:" from "File per folder (mbox)" to "File per message (maildir)" → Continue:


The messages in the account Local Folders will now be converted to the maildir format. Thunderbird will restart after the conversion is complete.


Converting the account Local Folders to maildir...


Conversion failed.

3. Succeeded: Phil Davis' method (from 2015 for Thunderbird 38.0.1)

Found thanks to this archived copy: Conversion de mbox à maildir. Instructions have been abbreviated, amplified, and updated:

  1. Create and open a new Thunderbird profile then close the Account Setup tab

  2. Thunderbird → Settings → General → Indexing → "Message Store Type for new accounts:" → change from "File per folder (mbox)" to "File per message (maildir)"

  3. Thunderbird → Account Settings → Account Actions → Add Mail Account... → set up an email account {this account will use Maildir}

  4. Thunderbird → Settings → General → Indexing → "Message Store Type for new accounts:" → change from "File per message (maildir)" back to "File per folder (mbox)"

  5. Thunderbird → Account Settings → Account Actions → Add Mail Account... → set up a dummy email account by entering a name and email address (e.g., [email protected]) → "Configure manually" → INCOMING SERVER: Protocol: POP3 → Hostname: dummy.example.com* → "Advanced Config" → OK {this account will use mbox}

  6. Thunderbird → Settings → General → Indexing → "Message Store Type for new accounts:" → change from "File per folder (mbox)" back to "File per message (maildir)"

  7. Exit Thunderbird

  8. Replace contents of ~/Library/Thunderbird/Profiles/new-profile/Mail/dummy.example.com/ with copy of contents from "~Library/Thunderbird/Profiles/old-mbox-profile/Mail/Local Folders"

  9. Start Thunderbird with the new profile; mail folders from old mbox profile appear under [email protected]

  10. Select all mail folders under [email protected] and drag to Local Folders, which will copy them into new Maildir-based directories. Compare message counts by enabling View > Layout > Folder Pane Columns.

* Leaving the hostname as ".example.com" creates a hidden folder in ~/Library/Thunderbird/Profiles/new-profile/Mail/, making step 8 slightly confounding.

Related

/misc | Jul 10, 2022


Subscribe or visit the archives.