Export from Apple Mail
Apple Mail exports a mailbox as a folder named Name.mbox that contains a file named mbox.
Choose Mailbox › Export Mailbox… in Mail, then drop the exported folder onto the Mbox Viewer
window. You can also copy the mbox file out of the exported folder, rename the copy with a
.mbox extension, and open it in Mbox Viewer. You can also skip the export
and open the .emlx files that Mail keeps for each message, as shown at the end of this page.
How do I export the mailbox from Mail?
- In Apple Mail, select the mailbox in the sidebar, for example a folder named Work.
- Choose Mailbox › Export Mailbox…. You can also Control-click the mailbox and pick the same command.
- Choose a destination folder, for example Desktop, and confirm.
Mail creates a folder named Work.mbox in the destination. The messages are in the file named
mbox inside it.
How do I take the mbox file out?
Dropping the exported Work.mbox folder onto the Mbox Viewer window opens the mbox file inside
it, and the mailbox is named Work. Take the file out when you want to keep a copy of it in another
place. The open dialog lists files whose name ends in .mbox or .mbx, so the copy needs one of
these extensions.
- Open the exported
Work.mboxfolder in Finder. If Finder shows it as a single item, Control-click it and choose Show Package Contents. - Copy the file named
mboxto another folder. Documents is a good choice. - Rename the copy to
Work.mbox. Finder asks whether you want to add the extension, and you confirm. - Open the copy in Mbox Viewer, as described in Open your first mbox.
One Terminal command does steps 1 to 3 at once:
cp ~/Desktop/Work.mbox/mbox ~/Documents/Work.mbox
What does Mbox Viewer show from an Apple Mail export?
| Element | In Mbox Viewer |
|---|---|
| Headers, text and HTML body | The reading pane shows them, with remote images blocked by default |
| Attachments | Listed in the reading pane, with Open and Save… |
| Photos inserted inline in a text message | Listed as attachments, so you can save them |
| Mailbox structure | One mbox file per exported mailbox |
| Flags and colors set in Mail | Not read. Use tags in Mbox Viewer instead |
The export carries no Gmail labels, so label: finds nothing in it. Classify the messages with
tags and virtual folders.
Where should I keep the exported file?
Keep the copy at a stable path. Mbox Viewer remembers each mailbox by its location and shows File not found if the file moves. Opening the file again at its new location brings back its tags and folders.
If you plan to let an AI agent read the mailbox, avoid ~/Documents, ~/Desktop and
~/Downloads, or allow the client in System Settings › Privacy & Security › Files and
Folders when macOS asks. The rest of the setup is in Set up Claude Desktop.
Can I open the .emlx files of Mail directly?
Yes. Apple Mail stores each message as an .emlx file in ~/Library/Mail/, inside a folder whose
name starts with V and a number that depends on the macOS version. Each mailbox is a folder
named after it with .mbox added, and its .emlx files sit in Messages subfolders deeper
inside. Mbox Viewer opens these files without an export:
- In Finder, choose Go › Go to Folder… and enter
~/Library/Mail. - Find the folder of the mailbox, for example
Work.mbox, and copy it to Documents. - Drop the copy onto the Mbox Viewer window.
Mbox Viewer imports every .emlx file of the copy, subfolders included, into an mbox file of its
own, then indexes it. A single .emlx file opens the same way. The rules of the import are in
Open .eml files and folders.
An .emlx file ends with a list of properties, such as the flags set in Mail. Mbox Viewer ignores
that list and reads only the message. Mail sometimes keeps the attachments of a message apart and
names the message file .partial.emlx. Such a message is imported without the attachments that
Mail stored apart.
Frequently asked questions
How do I export a mailbox from Apple Mail?
Select the mailbox in the Mail sidebar and choose Mailbox › Export Mailbox…. Pick a destination folder and confirm. Mail writes a folder named after the mailbox with .mbox added.
Can Mbox Viewer open the exported Name.mbox folder directly?
Yes. Drop the exported folder onto the Mbox Viewer window. The app opens the file named mbox inside it and names the mailbox after the folder. A folder named Work.mbox gives a mailbox named Work.
Which file do I take from the exported folder?
Take the file named mbox, which has no extension. It holds every message of the exported mailbox. Leave the other files of the folder where they are.
Why do I need to rename the mbox file?
Mbox Viewer opens only files whose name ends in .mbox or .mbx. The name you choose before the extension also becomes the mailbox name in the sidebar.
Are attachments included in an Apple Mail export?
Yes. Each exported message keeps its attachments inside the file. Mbox Viewer lists them in the reading pane, where you can open or save each one.
Can I export a Gmail account that I use in Apple Mail?
Yes, but Mail exports one mailbox at a time. Google Takeout is a better choice for Gmail, because it exports the whole account in one file and keeps the labels, the read state and the stars.
Does exporting remove the messages from Apple Mail?
No. Export writes a copy of the mailbox and leaves the messages in Mail. Mbox Viewer then reads the copy without modifying it.
Can I export several mailboxes and open them all?
Yes. Export each mailbox, take out each mbox file and give each copy its own name. Select all the copies in the open dialog, and Mbox Viewer indexes them two at a time.
Can I open the .emlx files of Apple Mail without exporting?
Yes. Mbox Viewer opens a single .emlx file, and it imports every .emlx file of a folder you drop onto its window. Copy the mailbox folder out of ~/Library/Mail first, because macOS protects that folder and Mail keeps changing it.
Why does macOS ask for permission when an AI agent reads the file?
macOS protects the Documents, Desktop and Downloads folders. When an MCP client reads a mailbox stored there, macOS asks on behalf of that client, such as Claude, and not on behalf of Mbox Viewer.