Support modern Apple Mail V10 directory layout#163
Conversation
Modern Apple Mail (macOS 13+) uses a different directory structure inside .mbox directories: <GUID>/Data/Messages/ instead of the legacy Messages/ directly under .mbox. This caused import-emlx to find 0 mailboxes when pointed at ~/Library/Mail/V10. Add findMessagesDir() to probe both legacy and V10 layouts, add MsgDir field to Mailbox struct so the importer uses the actual Messages path, and filter UUID path components from labels. Fixes #157 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
roborev: Combined Review (
|
findMessagesDir() short-circuited on the first candidate found (legacy Messages/), even if it was empty. When a stale empty Messages/ coexists with a populated V10 <GUID>/Data/Messages/, the mailbox would be skipped. Collect all candidates and prefer the first with actual .emlx files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
roborev: Combined Review (
|
|
"Not valid. In practice, a .mbox directory has either a legacy Messages/ or a V10 /Data/Messages/ Adding a "highest count" heuristic for a scenario that doesn't occur in real Apple Mail data would be |
Summary
<GUID>/Data/Messages/inside.mboxdirectories instead of a directMessages/subdirectory, causingimport-emlxto find 0 mailboxesfindMessagesDir()to probe both legacy and V10 layouts, andMsgDirfield toMailboxso the importer reads from the correct pathTest plan
isUUIDedge cases~/Library/Mail/V10directoryFixes #157
🤖 Generated with Claude Code