where are apple mail emails stored?

Apple Mail’s stores it’s email in an unusual location…  You would think, since it is user created content, that they would be stored in ~/Documents, but for some reason Safari Bookmarks, and Apple Mail are actually stored in ~/Library.  By the way, the Safari content is in ~Library/Safari. Apple Mail emails are stored in ~Library/Mail.

Inside the ~Library/Mail folder you will find “Envelope Index”.  If you find Apple Mail slowing down, or in Spotlight searches you start getting duplicate results, try deleting the Envelope Index (with Mail Closed, of course), and restarting Apple Mail.  Apple Mail will then display an “importing” message, but that is normal….  I have seen no reports of any issues of data loss when using this method….

Duplicating the Mail folder, will allow you to take a snap shot of the mail, rules, and other settings, so that you can migrate it to another system (or just simply back up the data).

In the ~Library/Mail folder, you will find:

  • AvailableFeeds – RSS Data
  • Envelope Index – Headers for the Mail in a pre-compiled form
  • Mail Folders – The Filenames are in the form -@.  So a pop account for john smith on gmail would be named POP-johnsmith@pop3.gmail.com
  • Mailboxes contain the mbox files that are not stored on the remote server
  • Signatures – Stores the signature files for the accounts
  • SmartMailboxes.plist – contains the query data for the SmartMailboxes
  • MessageUidsAlreadyDownloaded – contains the high message mark for all the accounts (pop, imap, etc)

Hope this helps…  If you would like me to expand on this, please feel free to ask in the comments…