Export from Thunderbird

Thunderbird already stores each mail folder as an mbox file in your profile. Quit Thunderbird, find the folder file in the profile, copy it elsewhere, add .mbox to the name of the copy, and open the copy in Mbox Viewer. The .msf file next to it is not needed.

Where is the Thunderbird profile?

In Thunderbird, open Help › Troubleshooting Information. In the table at the top, the Profile Folder row has a button that opens the folder in Finder or File Explorer.

System Usual profile location
macOS ~/Library/Thunderbird/Profiles/<profile>/
Windows %APPDATA%\Thunderbird\Profiles\<profile>\

Which file holds which folder?

Account type Folder inside the profile
Local Folders Mail/Local Folders/
POP account Mail/<server name>/
IMAP account ImapMail/<server name>/

Inside these folders, each mail folder is a file without an extension, such as Inbox, Sent, Drafts, Trash or Archives. Each one has an .msf file next to it, which you can ignore. Subfolders live in a directory named after the parent with .sbd added. The subfolders of Inbox are in Inbox.sbd/.

How do I copy and rename the file?

  1. Quit Thunderbird.
  2. Copy the folder file, for example Inbox, to a folder outside the profile such as Documents.
  3. Rename the copy to add the extension. Inbox becomes Inbox.mbox. The name before the extension becomes the mailbox name in Mbox Viewer.
  4. Open the copy in Mbox Viewer, as described in Open your first mbox.

On macOS, Finder asks whether you want to add the extension. Confirm it. You can also copy and rename in one Terminal command:

cp ~/Library/Thunderbird/Profiles/<profile>/Mail/Local\ Folders/Inbox ~/Documents/Inbox.mbox

On Windows, File Explorer hides extensions by default. Turn on File name extensions in the View menu of File Explorer before you rename the copy, or Windows may keep the old name without an extension. In Command Prompt, this command copies and renames in one step:

copy "%APPDATA%\Thunderbird\Profiles\<profile>\Mail\Local Folders\Inbox" "%USERPROFILE%\Documents\Inbox.mbox"

What does Mbox Viewer do with Thunderbird files?

Thunderbird detail What Mbox Viewer does
Envelope lines such as From - Mon Jan 01 00:00:00 2024 Recognises them as message boundaries
Messages deleted but not compacted Skips them, using the X-Mozilla-Status header
Compacting the folder later Your tags and folders stay on the right messages after a reindex
.msf summary files Ignores them

A Thunderbird file carries no Gmail labels, so label: finds nothing in it. Use tags and virtual folders to classify its messages instead.

Can I open single messages saved as .eml files?

Yes. Thunderbird saves a message as an .eml file with File › Save As › File. When several messages are selected, it saves one .eml file per message into the folder you choose.

  1. Select the messages in Thunderbird.
  2. Choose File › Save As › File and pick an empty folder such as Documents/Invoices.
  3. Drop that folder onto the Mbox Viewer window.

Mbox Viewer imports every .eml file of the folder into one mailbox named after the folder. The details of the import are in Open .eml files and folders.

What if the account uses maildir?

A Thunderbird account can store each message in its own file ("File per message (maildir)"). Such a profile has a directory per folder instead of an mbox file. Mbox Viewer imports a folder only for its files whose name ends in .eml or .emlx, and skips every other file.

  • If the message files of the maildir folder end in .eml, copy the folder out of the profile and drop the copy onto Mbox Viewer.
  • Otherwise, export the folder with the ImportExportTools NG add-on. It writes a regular mbox file, or one .eml file per message into a folder that Mbox Viewer can import.

You can also move the messages into a Local Folders folder that uses the default mbox storage.

Frequently asked questions

Does Thunderbird store mail in mbox format?

Yes, unless you changed the storage format of the account. Each Thunderbird folder is one mbox file without an extension in your profile, such as Inbox or Sent. An account set to the "File per message (maildir)" storage has no such file.

Why do I have to add the .mbox extension?

Mbox Viewer opens only files whose name ends in .mbox or .mbx. Thunderbird names its files after the folder, without an extension, so the copy needs one.

Can I open the file directly in the Thunderbird profile?

It is better to open a copy. Thunderbird keeps writing to its files, and each change makes Mbox Viewer show File changed and ask for a reindex. A copy also needs the .mbox extension, which you should not add inside the profile.

What is the .msf file next to each folder?

The .msf file is the summary index that Thunderbird builds for its own use. Mbox Viewer does not need it, so leave it in the profile and copy only the file without an extension.

Will messages I deleted in Thunderbird show up?

No. Thunderbird keeps deleted messages in the file until the folder is compacted, and marks them in an X-Mozilla-Status header. Mbox Viewer reads that mark and skips them.

Where are the subfolders of a Thunderbird folder?

They are in a directory named after the parent folder with .sbd added. The subfolders of Inbox are in Inbox.sbd. Each subfolder inside it is again one mbox file without an extension.

Does an IMAP folder contain every message?

Only when Thunderbird keeps the messages on your computer. Turn on Keep messages for this account on this computer in the account's Synchronization & Storage settings and let Thunderbird download the folder before you copy it.

Should I close Thunderbird before copying a folder?

Yes. Quit Thunderbird so that no write happens while the file is copied. A file copied in the middle of a write can end with a partial message.

Can I open messages that Thunderbird saved as .eml files?

Yes. Select the messages in Thunderbird, choose File › Save As › File and save them into an empty folder. Drop that folder onto Mbox Viewer, which imports every .eml file into one mailbox.

Do I need an add-on to export from Thunderbird?

No. Copying the folder file is enough. The ImportExportTools NG add-on can also export a folder as an mbox file if you prefer a menu command.