How to Open an MBOX File
With mailmd How to Delete a Gmail Account Without Losing Your EmailsOn this page
If you have an email archive ending in .mbox, open it with an email client that supports importing MBOX files. MBOX is a format that stores multiple email messages in one file. Thunderbird is a practical choice on Windows, macOS, and Linux; Apple Mail can import MBOX files on a Mac. Microsoft Outlook does not open MBOX files directly.
Keep an unchanged copy of the archive before importing it. Email programs can organize MBOX files in different ways, so one client may handle an archive better than another, according to the UK National Archives’ format record.
Open the file in Thunderbird #
Thunderbird can import an MBOX archive into a local folder. The University of Michigan’s instructions use the ImportExportTools NG add-on and note that large archives take longer to import.
- If the MBOX file is inside a ZIP archive, extract it first.
- Install ImportExportTools NG in Thunderbird.
- Create a folder under Local Folders for the imported messages.
- Open the folder’s menu and choose Import mbox file, then Import directly one or more mbox files.
- Select the MBOX file and wait until the import finishes.
Import large files one at a time. If the archive does not have a .mbox extension, it may still be an MBOX file; some email exports use files without an extension. If Thunderbird does not recognize the file, check the export instructions for the program that created it.
Thunderbird versions may use different menu names and import options. If the import option is missing, check whether the add-on is installed and compatible with your version.
Import an MBOX file into Apple Mail #
On a Mac, open Apple Mail and choose File > Import Mailboxes. Select Files in MBOX format, locate the archive, and start the import. The imported messages appear in a mailbox within Mail. These menu instructions are described in a third-party MBOX tutorial; available options can vary by macOS version.
If you use Outlook or need a quick preview #
Outlook does not open MBOX files directly, according to CubeBackup’s Outlook instructions. To move messages into Outlook, import the archive into Thunderbird, then export the messages in a format Outlook accepts, such as EML. Test the process on a small selection before applying it to a large archive, and keep the original MBOX file unchanged.
If you only need to read messages, an MBOX viewer lets you view them without importing them into a mail client. Check the viewer’s limits, privacy terms, and download source before opening a private archive. Free versions may restrict how many messages they display or require payment for export features.
A text editor can show the raw contents, but the messages will not appear like a normal mailbox. MBOX files use separator lines and email headers, which contain details such as sender and subject, to distinguish messages. Editing these details can damage the archive. If you inspect the file in a text editor, work from a copy and avoid saving changes to the original. The mbox manual describes the format’s message boundaries and warns that inconsistent access can corrupt an archive.
Protect the original archive #
Keep the MBOX file closed in other programs while importing or copying it, and do not import directly from a location where another mail program is changing it. The format relies on file locks to prevent conflicting changes. These locks signal that a program is using the file. Inconsistent locking can cause corruption or data loss, as described in the Dovecot documentation.
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.