Where apps hide your files
Mail keeps every downloaded message on disk as a small file inside a versioned folder in your Library. Here is where that folder is, how it is laid out, and how to get mail out without breaking anything.
~/Library/Mail/V10/
V10 is the folder on macOS Sequoia 15, where this post was checked, and user reports show Tahoe 26 still uses it. Earlier releases used lower numbers. If you see more than one V folder under ~/Library/Mail, the highest is the live one. Open it with ⇧⌘G in Finder, or run open ~/Library/Mail/V10 in Terminal. macOS protects this folder, so Terminal needs Full Disk Access to list inside it.
Mail is a sandboxed app, so two related folders sit outside ~/Library/Mail:
~/Library/Containers/com.apple.mail/Data/Library/Mail Downloads/
~/Library/Group Containers/group.com.apple.mail/
Inside V10 there is one folder per account, named with a long ID (a UUID), plus MailData. The IDs are not your email addresses. To tell accounts apart, open each folder and look at the mailbox names inside.
Under an account folder:
<account-ID>/INBOX.mbox/<store-ID>/Data/Messages/73.partial.emlx
<account-ID>/Sent Messages.mbox/<store-ID>/Data/Attachments/
Every mailbox is a folder ending in .mbox, not the single mbox text file other mail programs use. Inside it, Data holds the messages. Big mailboxes are split into numbered subfolders such as Data/0/8/Messages, so the depth varies: on the Mac checked for this post, most of its 38,000 message files sat two numbered levels down.
| Item | Meaning |
|---|---|
*.emlx | One complete message, headers and body, in a single file. |
*.partial.emlx | A message whose attachments were not downloaded. The rest stays on the server. |
Attachments/ | Downloaded attachments, in folders named after the message number. |
MailData/Envelope Index | The database Mail uses for message lists and search. Do not open or edit it. |
MailData/*.plist | Settings such as VIP, flagged and smart mailboxes. |
File names are message numbers such as 73.emlx, not subjects or senders, so you cannot scan the folder by eye. An .emlx file is plain text, but it is private mail, so open one only when you know which message you want.
Copying files out of V10 is the last resort. Mail has its own routes:
.mbox package, and File > Import Mailboxes brings it back into Mail on any Mac..eml file.~/Library/Mail across by hand is not a method Apple documents, and it does not carry your accounts, which are set up in Internet Accounts.For IMAP accounts (iCloud, Gmail, Outlook.com), the server holds the master copy, so the local files are a cache. For POP accounts and any On My Mac mailboxes, the local files may be the only copy, so export those before you reset anything.
Mail keeps full messages and attachments for the accounts you use, and the folder only grows. On the Mac checked for this post, ~/Library/Mail was 3.7 GB. To check yours, run du -sh ~/Library/Mail (Terminal needs Full Disk Access).
Safe ways to shrink it, all from inside Mail:
Never drag .emlx files, Attachments folders or Envelope Index to the Trash by hand. Mail keeps listing messages whose files are gone and its index falls out of step. If the message list is wrong or search misses mail, select the mailbox and choose Mailbox > Rebuild instead of touching the files. On IMAP accounts a rebuild downloads the messages again, so it can take a while.
The Mail Downloads folder in Mail's container holds copies of attachments you opened from a message. Attachments you save go to Downloads instead, according to Apple. The Remove unedited downloads pop-up menu in Mail > Settings > General decides when Mail clears the container copies. Leave it to that setting: if you opened an attachment, edited it and saved it in place, the edited copy may exist only in that folder.
Time Machine includes ~/Library/Mail (tmutil isexcluded ~/Library/Mail reports [Included] on the Mac checked). If you copy the folder yourself, quit Mail first, because a copy taken while Mail runs can catch its database halfway through a write.
Spotlight leaves ~/Library out of its results, so a note like "the .emlx for message 73" leads nowhere there. Everywhere can list the files in Mail's folders once you grant it Full Disk Access, which macOS requires for any app reading them. Then typing emlx, or part of an attachment's name such as invoice, finds the file in milliseconds, and ⌘↵ reveals it in Finder. It matches file names, not the text inside messages, and message files are named by number, so it is far more useful for attachments than for mail bodies.
In ~/Library/Mail/V10/ on macOS Sequoia, and by user reports on Tahoe too, with one folder per account holding .mbox folders of .emlx message files. Older macOS versions use a lower V number.
An .emlx file is one email saved by Mail, with the message followed by a small property list. A .partial.emlx is a message whose attachments were not downloaded.
Not by hand. Set Download Attachments to Recent or None in Mail's account settings, remove attachments from old messages and erase deleted items. Deleting files directly leaves Mail's index out of step, and for POP accounts it may delete your only copy.
Select the mailboxes and choose Mailbox > Export Mailbox. Mail saves each one as an .mbox package, which File > Import Mailboxes can bring back on another Mac.
Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.
Version 2.20.3 · macOS 13+ · 4.7 MB · notarised