Where are emails stored on mac mail

On a Mac, emails stored in the Mail app are typically stored in the following locations:

  1. ~/Library/Mail: This is the default location where Mail stores its data, including emails, contacts, and settings. The ~/ symbol represents your user directory, which is usually username (e.g., john or jane).
  2. ~/Library/Mail/V2/Mailboxes: Within the ~/Library/Mail directory, you'll find a subdirectory called V2, which contains the actual email data. The Mailboxes subdirectory contains folders for each email account, such as Inbox, Sent, Trash, and so on.
  3. ~/Library/Mail/V2/Envelope Index: This file contains a database of email metadata, including sender, recipient, subject, and date information.
  4. ~/Library/Mail/V2/Message Bodies: This directory contains the actual email bodies, including attachments.

When you delete an email from the Mail app, it's not immediately deleted from these locations. Instead, Mail moves the email to the Trash folder, which is stored in ~/Library/Mail/V2/Mailboxes/Trash. You can recover deleted emails from the Trash folder by going to Mail > Preferences > General > Show this many recent emails in the Trash, and then selecting the emails you want to recover.

If you want to manually manage your email storage or migrate your emails to another device, you can use the mbox files stored in ~/Library/Mail/V2/Mailboxes. These files contain the actual email data and can be imported into other email clients or apps.

Keep in mind that Mail stores additional data, such as contacts and settings, in other locations, like ~/Library/Contacts and ~/Library/Preferences/com.apple.mail.plist.