Mac Mail File Organization?

Does anyone have a sense of how Mac Mail organizes its files. We had to import gobs of old mail from a previous backup of my wife's computer. In the process, the Mail Import function duplicated a lot of the mails. And then, when I moved them into their own mailboxes, it appeared to create new versions of them.


Now I appear to have emails in


~/Library/Mail/V4

~/Library/Mail/V6

~/Library/Containers/com.apple.mail/


Right now, I'm working off of a big external, trying to get this all straightened out.


Her internal drive is 1TB. Between these three locations, I have close to 800 GB of mail to clean up. I'm trying to figure out what I can delete.


Thanks!


Gary

Posted on May 4, 2020 10:03 AM

Reply

Similar questions

7 replies

May 4, 2020 10:15 AM in response to Gary Beberman

The V-folders are the version of Mail's database structure. V7 is Catalina, V6 is Mojave, etc.

If you have a later version, there shouldn't be anything in the previous folders. But, it sounds like if you imported both the V6 and V4 folders, they probably had duplicate information. You should only need to import a single V-folder, the latest.

When you upgrade the OS, the old folder should be deleted, but I have seen it left around. But, in those cases, there wasn't anything in the folder, email-wise. Just config files.


Containers are the App's sandbox, i.e. a place where it can safely play without interference from other apps, and it cannot interfere with them.


The Container has pointers to other areas of the OS. There is very little in the Container that is only in that container. Anything that you see in the Container that is somewhere else is likely just a pointer to that original information.

May 19, 2020 4:19 AM in response to Gary Beberman

The messages and organization is stored in ~/Library/Mail, not in the sandbox, so deleting the Container folder should not affect that.


And I missed the part before when you said you changed the “geeky” names of the folders. Did it ever occur to you that those “geeky” names might be important to how Mail references the account folders? Changing the names would break all of the indexing done in the Envelope Index database if you did that in the Mail folder.

May 4, 2020 11:49 AM in response to Gary Beberman

Well, yes, it is a lot more than pointers. They are Hard Links which are just inode references in the file system that point to where the actual data is stored. You can have thousands of hard links to a file and not take up any other storage.

When you look at a hard link in the file system, it appears to be a file. Anything that can display the storage space will almost always count all instances of the hard link as being the full size of the single storage space.

May 4, 2020 11:25 AM in response to Barney-15E

Thanks much for the tips. I think I could have done the import/reorganization of her mail in a more organized way now that I know how it works.


But, the containers part concerns me. It sounds to me like there's a lot more there than pointers. Before I started this process, there was 20 GB in it. Now, there is more than 400 GB there.


One thing interesting: I took the emails from the imported mailboxes with the geeky names (e.g. ADA69781-BAC9 . . . ) and sorted them in to new mail mailboxes with more meaningful names. The folders for these mailboxes appear to have been created in the Containers folder with copies of all of the emails there.


This makes me question how much I even need the contents of the Mail folder.

May 18, 2020 5:21 PM in response to Barney-15E

Thanks much. It's very comforting that mail isn't using as much space as I thought.


One related question: I have run into problems the solutions for which have recommended deleting the containers folder. From this exercise I'm running, reorganizing this user's mail, it seems to me that the Containers folder is where the reorg lives. That is, if I take a bunch of messages from 2018 which currently live on her drive in one of the nonsense-named folders and, in the Mail interface, move them into a mailbox called 2018, that is tracked in Containers. Deleting the folder would remove the effort going into organizing her mail.


Please tell me I'm wrong about that.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mac Mail File Organization?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.