Tools and alternatives

ImportExportTools NG: Exporting Mail from Thunderbird

Updated 5 min read

On this page
  1. Install the add-on and find its export commands
  2. Choose a format that fits the next step
  3. Check compatibility and verify the export
  4. When mailmd is a better fit

ImportExportTools NG adds export commands to Thunderbird, Mozilla’s desktop email client. The add-on exports individual messages, folders, or account mail in formats such as EML, HTML, PDF, plain text, and mbox. An mbox file stores multiple email messages together; an EML file stores one message and its headers in a separate file.

If you want a separate copy as readable, searchable files on your computer, mailmd is a free, open source alternative. It copies each email into its own Markdown file and leaves the mailbox unchanged. The right choice depends on what you need: use ImportExportTools NG for Thunderbird-managed exports and formats such as PDF or mbox; consider mailmd when you want a local folder of message files you can search with other tools.

Install the add-on and find its export commands #

Install ImportExportTools NG through Thunderbird’s Add-ons Manager, which connects to the Thunderbird Add-ons listing. The project README also describes installing an XPI file, the packaged file format used for Thunderbird add-ons, through the Add-ons Manager’s “Install Add-on From File” option.

After installation, select the message or folder you want to export, then look for ImportExportTools NG in Thunderbird’s Tools menu. The add-on’s commands appear in a submenu there. If the Tools menu is not visible, the project README says to enable Thunderbird’s menu bar in Preferences. Version 15 introduced new export commands marked “(v15)” alongside older commands, so check the label before choosing an option.

The available commands depend on what you select and which version you have installed. For a folder export, choose the command for the format and attachment handling you want. For a message export, select the message first, then choose its export command. Version 14.0.2 added recursive export, which includes subfolders, for EML, HTML, PDF, and plain-text exports. The add-on also supports exporting account mail to mbox files.

Choose a format that fits the next step #

Use mbox when you want to keep messages from a folder or account together in a mailbox archive. Use EML when you want separate message files that other email programs can open individually. Thunderbird’s add-on also supports HTML, PDF, and plain-text output, with optional attachment handling; it can export indexes as plain text or CSV, a tabular format suited to spreadsheets and scripts. The project README summarizes these formats and the add-on’s import support for mbox, EML, and EMLX files.

HTML is a useful choice when you want to open exported messages in a browser and follow links to saved attachments. A Mozilla support thread reported that, in tests with an older add-on version, HTML exports had clickable attachment links while plain-text exports did not. Version 15’s PDF export also includes an attachment table, but its release notes say those entries are not clickable. If you need to open attachments from the exported message, check how the chosen format handles them before exporting a large folder.

Check compatibility and verify the export #

Match the add-on version to your Thunderbird version before relying on an export. The Thunderbird Add-ons listing lists version 15.0.3 for Thunderbird 140.0 through 159.*. The compatibility range changes between releases, so check the listing rather than assuming an older add-on will work with a newer Thunderbird.

Export behavior has also changed across releases. Version 15.0.1 fixed an EML encoding problem that could garble non-ASCII characters. Earlier reports describe an mbox export stopping unexpectedly without an on-screen error, and an EML export that became much larger after re-import. Those reports describe specific older setups. They do not show that current releases have the same problems or that the problems affect every export. Still, open a sample of the exported messages and attachments before treating a large export as your only copy.

PDF export has had a version-specific compatibility problem. Version 14.1.16 release notes attributed broken PDF export to a Thunderbird bug, and version 14.1.17 later noted that Thunderbird 148 fixed the issue. For a current setup, check the version notes for both the add-on and Thunderbird versions you use.

The add-on’s listing says it can have full, unrestricted access to Thunderbird and the computer. Consider that permission when deciding whether to install it. The listing and release notes provide version information, but the project README says it does not yet offer a structured user guide or handbook, so command names and release notes are important references.

When mailmd is a better fit #

ImportExportTools NG keeps export operations inside Thunderbird and supports formats suited to moving or viewing mail elsewhere. mailmd copies messages into a folder of Markdown files on your computer, one file per message. Each file starts with frontmatter, a section that stores the message headers. It turns HTML email into readable Markdown and saves attachments beside each message. It organizes folders and years as directories. Its index.jsonl file lists messages for scripts, and --keep-raw also saves the original EML file.

mailmd connects to mailboxes through IMAP, an email-access protocol, including Gmail over IMAP. It also uses the Gmail API for Gmail and Microsoft Graph for Outlook.com. To use these API connections, you need an OAuth app, a setup that authorizes account access, in Google Cloud or Microsoft Entra. mailmd opens folders in read-only mode, so it can read messages but cannot change, move, or delete them. It requests read access. Its sync command adds new mail and updates read and starred marks; it does not delete archived files when a message disappears from the server.

Choose mailmd if you want message files that you can search with an editor, rg, or grep, or filter through index.jsonl with jq. It has no built-in search engine, does not import mail back into a mailbox, and does not export to PDF or PST. It also does not free mailbox storage: you must delete messages from the mailbox yourself after confirming that the local copy is good. Spam and trash are excluded unless requested; for Gmail over IMAP, mailmd syncs All Mail so archived messages are included.

To try it, visit mailmd.dev or review its open source code. You can run it manually or ask a coding agent to follow the project’s setup instructions; you enter your password into mailmd yourself, so the agent does not see it. mailmd saves logins outside the archive, where only your user account can read them. It sends no telemetry or mail to a mailmd server.

Free and open source

Try mailmd

mailmd is a free command-line tool that copies your email into Markdown files on your computer, one file per message. It works with any IMAP mailbox, and with Gmail and Outlook through their own APIs.

Install

$ curl -fsSL https://raw.githubusercontent.com/vincentsch/mailmd/main/install.sh | sh

Set it up with your coding agent

Set up mailmd so you can read my email. Use https://github.com/vincentsch/mailmd: read its AGENTS.md and follow the steps. Connect my mailbox and run the first sync. Then show me where the files are.

More on tools and alternatives