You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How can I reduce the size of my mail folder?

While trying to install new software, I found that my hard drive was quite full. A little investigation shows that Library/Containers/com.apple.mail/Data/Library/Log/Mail has a file called "imap.gmail..." that is taking 49 GB!! An old discussion here suggested going to the GMail Imap settings -> Folder size settings and restricting the number of messages. I did that, rebuilt my "in" box, and restarted my Mac, but none of these things seemed to help. I'm sure I don't need 49 GB of old mail on my computer, so how can I reduce the size of that file? Would it be safe to simply delete the file and let Mail build it again?

MacBook Pro 13″, macOS 10.15

Posted on Sep 23, 2021 8:41 AM

Reply
5 replies

Sep 24, 2021 11:51 AM in response to William Williams

Hi William Williams,


We see you'd like to reduce the size of your Mail folder as its taking up a good bit of space on your internal storage.


Given the folder is an IMAP, it stays constantly in sync with the web server, in. this case Gmail. Given that's the case, deleting and rebuilding it wouldn't reclaim any space as it'll just sync everything back down again.


What you can do is delete older emails or large attachments that you no longer need. This does delete them from Gmails server as well, but it frees up space on your device. You can see more tips to work down the size of your mailbox in the article below.


Cheers!

Sep 24, 2021 2:53 PM in response to Eric--F

Yes, I'm afraid I mis-stated the problem: the huge file wasn't in my mail folder at all. However, that article refers to a different problem: running out of space on the e-mail server. My issue was a huge file associated with mail on my own computer. After a bit more research, I realized that it was a log file and simply deleted it. I have no idea how it got so humongous, taking up nearly 20% of my 250 GB hard drive, but I'll definitely keep my on it in the future. If anyone is interested, once again the file is here: ~/Library/Containers/com.apple.mail/Data/Library/Log/Mail. Among the files in that directory there are two of interest, one that begins with "imap" and the other with "smtp." It was the imap one that had blown up (it's now 16 MB). Any idea what the purpose of this file is? I would assume that somehow it's supposed to be deleted and refreshed now and then and for some reason it's not, but it's not a big deal. Maybe moving to Big Sur will help ;)

Sep 24, 2021 3:47 PM in response to William Williams

William Williams,


Thanks for clarifying.


That file looks ike it is related to the Connection Doctor feature of Mail. In the Mail app, from the menu bar, select Window > Connection Doctor. You'll see a checkbox to "Log Connection Activity". If that's checked, that is what is generating the log file.


While we'd be unable to speculate as to how it got so large, you can uncheck that option if you no longer wish to log connection activity in the Mail app. It won't delete any of your messages or attachments, etc.


If you notice this becomes a recurrent issue or the file quickly grows in size, we'd recommend reaching out to Apple Support directly for assistance at that point.


Take care.

How can I reduce the size of my mail folder?

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