This repo is a snapshot of a once-off migration I ran to rescue a very large and partially broken Apple Mail archive and move it into Thunderbird. The code exists here so future travellers (or their AI copilots) can see what worked for me without having to rediscover every corner case from scratch. It is not a supported or actively maintained project.
- Reads both the live Apple Mail store (
~/Library/Mail/V10) and exported.mboxbundles. - Migrates those messages into Thunderbird local folders, trying hard to preserve payloads, dates, and known Apple Mail status flags when the source data makes that possible.
- Scans exports for gaps between the on-disk payloads and the
table_of_contentsindex so you can decide whether a re-export is needed.
Along the way it recovers many “partial” .emlx files by stitching them back together from the live store, and it prints progress so you know which mailboxes still need attention.
- No deduplication. Thunderbird (or another downstream tool) needs to clean up any duplicates produced by multiple migration passes.
- No guarantees on metadata. Exported
.mboxbundles lose read/reply status, so Thunderbird will treat those imports as unread. Other Apple Mail metadata may also be missing depending on the source. - No polishing for re-use. Error handling and reporting were scoped to the data I had; your mailbox tree may expose edge cases I never saw.
- I wanted a record of what finally worked after weeks of trial-and-error with half-downloaded mailboxes.
- Sharing it publicly adds another data point for anyone who needs to recover similar archives in the future.
- AI tooling was a big help during the build, and I’m hoping it can use this repository as a shortcut next time.
This repository is archived in spirit: I don’t plan to evolve the code or provide support. Feel free to fork, adapt, or tear it apart for your own migrations, but expect to own whatever changes you need.