MacOS – How to keep Mail.app’s archive from becoming too big

macosmail.appstorage

I'm trying to reduce my hard drive space used to prepare for a move to an SSD. I've got a wonderful application called DaisyDisk that allows me to visualize data segments on my hard drives.

I have three internal drives, and for the time being I'd just like to slim down the size of my startup disk, so I can move it to a smaller SSD.

By far the largest segment of my hard drive is a section under Macintosh HD/Users/joelglovier/library/Mail/V2/Mailboxes. This directory is over 75GB. You can see the visualization from DaisyDisk here: http://cl.ly/E7OJ

I found this directory before, when trying to slim down my hard drive, and simply deleted it's contents, then changed my settings in Mail.app to not archive attachments, thinking that would resolve the issue.

However, some months later this directory has again creeped up to a ginormous size.

Can anybody please help me understand what this directory is for, and how to permanently reduce it's size – via Mail.app settings, or whatever I need to change to stop it from becoming so huge.

Thank you!

Note: I'm on OSX Lion 10.7.3 using Mail.app ver 5.2.

EDIT: SO I dug through the files in the directory in question. There was one particular mailbox in /Library/Mail/V2/Mailboxes called "Recovered Messages (account name).mbox" which contained a very strange subdirectory structure of a single email duplicated thousands of times under different subdirectory structures. For example, there was a subdirectory in it that had /1, /2, /3, etc., and each one of those directories had /attachments and /messages. The /attachments on each had hundreds of subdirectories each containing this one same attachement from a particular email, and the /messages under each had hundreds of copies of the email all with different numerical file names. But the weird thing is ALL were from the same exact email.

Best Answer

Go ahead and delete that "recovered" folder, and there is also going to be an .OfflineCache folder that needs to be removed. Note the period at the beginning of the file name; you will either need to show invisible files or use Terminal to delete that folder.

This most often happens when an unsuitable large file is attached to a message. With GMail for example, any attachment over 20MB will be rejected. Mail sees the rejection by the mail server and tries to recover from it by sending the message again. Over time, these half-attempts to send mail stack up and start using all your drive space.

If you want a quick and easy way around the problem, remove the account in Mail's preferences, then re-add it. This will discard the offline cache for the account and free up your mangled space, at the expense of having to re-download the real messages.

And in the future, don't sent huge attachments. Use a specialized service like Dropbox instead.