I am trying to recover my Apple Mail inbox on macOS Yosemite (Mail v8) after a series of events caused all messages to disappear from the application, even though the raw files are still present on disk.
What happened
- The Inbox was accidentally deleted on an iPhone, which removed the IMAP messages from the server.
- On my MacBook (offline at that moment), the emails were still present locally inside Apple Mail.
- I tried to move the messages from the IMAP Inbox into a local "On My Mac" mailbox to save them.
- During this move, the Mac ran out of disk space.
- The move operation aborted, and afterwards, the original Inbox inside Apple Mail appeared completely empty.
- However, on the filesystem, the raw (emlx and Attachments) mail files still exist.
Where the files are located
The messages are stored in Apple Mail’s IMAP local cache at:
~/Library/Mail/V2/<IMAP-ACCOUNT>/INBOX.mbox/
with a structure like:
INBOX.mbox/
└── <GUID>/
└── Data/
└── 0/
└── 1/
├── Messages/
└── Attachments/
└── 2/
└── 3/
... (many more)
Inside these various Messages folders, there are thousands of:
*.emlx*.emlxpart*.partial.emlx
What I am seeing
- Each
.emlxfile has a normal file size (for example, several KB or more). - But when I open them directly on macOS, they appear empty in Apple Mail and show no message text.
- If I manually rename an
.emlxfile to.emland open it on Windows or in another mail program, the message content is fully visible. - So the file content is still there, Apple Mail just refuses to display it.
Current state
- I now have plenty of free disk space again.
- I still have the entire original
INBOX.mboxfolder. - Apple Mail refuses to show or rebuild the messages.
- Rebuilding the Mail index (Envelope Index* files) did not help.
- The data clearly exists in the
.emlx, but Apple Mail does not see it.
My question
How can I restore the mailbox so that Apple Mail recognizes and displays the messages again? I would like to either:
- Rebuild the original IMAP Inbox locally in Apple Mail,
- or recreate a valid local mailbox from the
.emlxfiles, - or convert this structure into a proper
.mboxfile that Apple Mail can import.
At this point, I simply want a clean mailbox (local or mbox export) so I can later upload the messages to the IMAP server again.
Additional notes
- macOS: Yosemite
- Mail.app version: 8
- IMAP account
- No Time Machine backup
- The issue started after the disk ran out of space during a move from IMAP to a local mailbox
- The raw files still contain the real message data (verified by renaming to
.eml)
-
You say you have no Time Machine backups. Does that mean you have no backups at all? If so, do nothing else until you've backed up. Using a computer with no backups is a rolling data-loss emergency.Linc Davis– Linc Davis2025年11月22日 19:09:08 +00:00Commented Nov 22 at 19:09