Back to blog

Demystifying Dovecot to Thunderbird migration: the definitive guide

1/6/2026 · 2 min · Email

Share

Migrating Maildir (Dovecot) to Thunderbird looks straightforward, but format differences often lead to missing folders, import conflicts, and partial history.

This guide summarizes the practical fixes and automation pattern that made the process reliable.

Why this migration is tricky

Dovecot mailboxes commonly use folder conventions such as:

Thunderbird expects MBOX behavior under Local Folders. Without proper conversion, teams often hit:

  1. missing subfolders
  2. converter timeout/resource spikes
  3. naming conflicts (INBOX already exists)

Key technical lessons

1) Empty folders are still part of structure

Generic converters may ignore empty folders, breaking hierarchy expectations. A robust conversion flow must preserve structure even with zero-byte content.

2) Remote execution and interactive prompts

curl | bash can consume prompt input unexpectedly. Using process substitution or explicit terminal input handling keeps interaction reliable.

3) Production resource safety

Long mailbox conversion should support low-priority execution (nice) to avoid impacting live services.

Automated approach: maildir-to-mbox

Execution pattern:

bash <(curl -sSL https://raw.githubusercontent.com/sr00t3d/maildir-to-mbox/main/maildir-mbox.sh)

Useful capabilities:

Thunderbird restore flow (no extension required)

  1. Download generated archive (.tar.gz).
  2. Locate Thunderbird Local Folders storage path.
  3. Close Thunderbird.
  4. Extract converted files into local folder path.
  5. Reopen Thunderbird and validate folder tree.

Official repository

Open-source project:

https://github.com/sr00t3d/maildir-to-mbox

With correct format handling and automation, Dovecot-to-Thunderbird migration becomes predictable and repeatable. The biggest win is preserving mailbox history structure with minimal operational effort.

CC BY-NC

This post is licensed under CC BY-NC.

Comments

Join the discussion below.