Skip to content

How to Save Space On Your Computer When Using Gmail IMAP

September 2, 2011

Photo credited to knowliz.com

Gmail and the IMAP mail protocol work great together. Gmail is a free email service that offers over 7 GB of online storage and IMAP lets you keep your computers, phones and tablets in sync with Gmail. The problem is that because of the way Gmail works with its Labels system you can amass multiple duplicates of the same email when using a mail client like Mac Mail or Windows Live Mail. 

When you receive an email in your Gmail account, the message goes to your All Mail folder and Gmail will apply an Inbox label to the message. Because of the Inbox label, the message shows up in your Inbox section of the Gmail web interface and your mail client. When you archive the message using Gmail’s web interface, Gmail just removes the Inbox label and the message stays in the All Mail folder. The same works for sent messages and any other labels you may have set up. 

When you use IMAP to access your Gmail account, the mail client will show all your separate labels as individual folders and create duplicate messages. For example, using Mac Mail with Gmail IMAP I see my Inbox, Sent Items, Starred, Spam, Trash, All Mail  and some other Labels I have created. If I receive a new message, Mac Mail will download a copy into my Inbox  and my All Mail folders. If I want to Star the message I will then have three copies. 

What this leads to is a much heftier mail folder size on your hard drive compared to what Gmail calculates. Google said that I was using 3.5GB of storage on their servers but when I right-click ~/Library/Mail I was almost 11GB of hard drive space. 

The following instructions are how to fix this issue using Mac Mail and iPhone, but the same procedures work for other mail clients. 

First, go to Gmail, click the Gear icon on the top right, click Mail Settings and click the Labels tab. Un-check the “Show in IMAP” check box for the All Mail label. This will stop your email client from creating the All Mail folder and downloading all your messages.

When you delete a message from your Inbox in your mail client, the message will be removed from your Inbox but Gmail will still keep a copy in the All Mail folder online. But, what if you still want to be able to look through old messages using Mac Mail?

 I like to be able to quickly search and find old messages using Mac Mail but I don’t want to use 11GB of storage on my small SSD so I created a great compromise. I figured I only really care about the last year of emails but I do not want to permanently delete the older ones so I created a new Label in Gmail called Recent.

Then I open my All Mail folder and searched for anything newer than 12/31/2010. Next, I selected all messages on the page and all messages in the search and applied the Recent label. 

 

Now, we can set up Mac Mail, assuming it is already setup for Gmail IMAP. We need to go to the Mail Menu then Preferences and Accounts. Select your Gmail account and click on the “Mailbox Behaviors” tab. We need to set the Trash settings like the picture below. 

 

Now select the Advanced tab and set the “IMAP Path Prefix” to ‘[Gmail]’ and close the preferences clicking Save when prompted. 

 

Next we need to set the Recent folder as the Trash folder on Mac Mail. What this means is that when we delete a message from the Inbox, the message will be moved to the Recent folder and Gmail will apply the Recent label to it on the Gmail website. To do this, select the Recent folder on the left and go to the Mailbox Menu then click “Use This Mailbox For” and then click “Trash.”

To setup an iPhone, you must select “Other” account when creating Gmail and set it up as IMAP. After creating the account, go to the account settings and Advanced settings. For Deleted Mailbox, select Recent on the server and change the option to Remove Deleted Messages to Never

 

Why is this process better than using the All Mail folder with IMAP? This process allows us to use much less space on our hard drive yet still have access to older emails using Gmail and IMAP. I was able to drop my Mail usage from almost 11GB to just over 2GB. It also means that if the Recent folder gets too big all I need to do is delete or remove the label from some of the items in the Recent folder without the worry of losing them because they will still be in the All Mail folder online. 

 

By setting up our mail clients on our computers, phones and anything else we have like this, we can keep everything in sync without using more wasted space then necessary. 

 

 

 

Advertisements

From → Tutorial

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: