Today we are going to have a look at the folder where AppleMail keeps it's data. When we are going to troubleshoot problems with AppleMail I may tell you to delete some files. Therefore, it's a good idea how to find the files and to know what the files are for.

Start by making the user Library folder visible. The main folder from AppleMail is located at user/Library/Mail. The folder is secured with "full disk access". That's the reason why Mail Archiver needs this "full disk access".

Folders from Plugins

The folders Bundles, Indev, PluginLogs and SmallCubed are from the MailTags plugin by SmallCubed. You may not have those folders.

The VX Folder

Depending on the version of macOS you will have a V5 (HighSierra), V6 (Mojave) or V7 (Catalina) folder. If you have multiple folder you have a problem.

The Account folders

Under V7 are a couple of folders with cryptic names like "3B5B0A3E-CB7F-42D6-AE86-B22CE46C56AA". Those are the accounts and one folder is for the local mailboxes. It's not really clear why the folders are encrypted because the mailboxes themselves aren't (knock on wood!). It's also easy to identify the accounts with the names of the mailboxes.

The MailData folder

Now comes the most interesting folder, the MailData one. Here we got a historically grown number of files that cover part of the internal data from Mail. For instance, the account information isn’t in the MailData folder. Most likely because the accounts are also used elsewhere.

I'm not going to look at the files individually, just at some groups and the more interesting files:

  1. The plist files with the ending plist like the SyncedRules: those contain not so very important stuff. The SyncedRules file has the rules - just as the name says. If you want to have a look at the content of the files you either need XCode or a special app. Goggle for “plist editor” and you will find a few apps that can view plist files.
  2. Envelope-index files: those files are the index of the Mail database. If you can't find your emails it's time to delete those files.
  3. LSMMap2: your spam information.

The brute-force method of taming AppleMail

Once or twice a year AppleMail throws a hissy fit on my main computer: it starts and it quits. Then I delete all files in the MailData folder and restart AppleMail. Mail now needs to re-create the index file. The more emails you have the longer this takes. If I'm lucky Mail works again - if not, rinse and repeat. The last time I had to delete the files three times.