How to set up Apple Mail for better Gmail IMAP support

05/11/2008 - UPDATE: Google Labs have added advanced IMAP controls which means this hack is no longer required. Find out more in our article, Google adds IMAP controls to Gmail and Google Apps

We have been using Google Apps ( for over seven months now. This should apply the same to Gmail as well.

While it's generally been fantastic with few, if any, major problems, there is one frustrating thing about it relating to Google's implementation of the IMAP protocol.

Google has a somewhat odd IMAP folder structure with a [Gmail] folder containing "all mail", Starred, Sent, Drafts etc.

The problem is that you have no choice in Apple Mail to unsubscribe from the [Gmail] (and therefor "all mail") folder. From what I've read, this may actually be an issue with the way Gmail implements IMAP preventing anyone from subscribing/unsubscribing from folders.

The result is that you end up with doubles (or more) of literally every email in your inbox. In my case, I have 12,000+ emails in my email account so this is a lot of extra emails, traffic and disk space.

Some have suggested specifying the [Gmail] prefix in IMAP set up however this means you can't actually see your INBOX but can see "all mail" as well as the other folders shown above. Not nice.

The solution

I have tried this before, I'm sure, but for some reason I don't remember it working. However, I've recently set up half a dozen or so email accounts like this and it seems to be working perfectly.

The trick is simply to specify INBOX as the IMAP Path Prefix in your email program (i.e., Apple Mail).

What this does is set the "root" of your email access to the inbox meaning all the extra folders such as "all mail" are below the root and thus not shown.

If you have any folders that you previously had in your inbox (i.e., INBOX/A Folder), you can still show these inline in your Apple Mail inbox by labelling them INBOX/INBOX/A folder (not so pretty in Gmail but works perfectly in Mail).


if you send your outgoing emails through the Gmail servers (, which I recommend you do, sent messages are automatically stored in your sent messages folder so it is recommended you set Mail to not store sent messages on the server.

This is important and I strongly recommend you uncheck this and save changes to your email settings prior to implementing the INBOX prefix above. If you don't you might find you can't access from Mail any previous sent messages unless you copy them back down which is complicated and time consuming.


This seems to fix a long-standing problem I have had with Google Apps / Gmail and Apple Mail. I am interested to know if this works for others and, if not, what their experience has been. If everything falls apart, don't stress, your emails on the server have not been affected and the worst-case scenario is that you would have to delete your email account in Mail and set it up again.

New in Shopify: Gift Cards at long last

Published on 25 November, 2013 at 09:00

Shopify iPad POS app for New Zealand stores

Published on 10 September, 2013 at 08:00

What is the optimal structure of Shopify theme settings?

Published on 06 March, 2013 at 20:00

How to optimise your Shopify site for mobile devices

Published on 21 February, 2013 at 15:00

Homepage A/B testing for The Monocle Order

Published on 17 September, 2012 at 12:00

LightSpeed Retail Point of Sale (POS)—now on iPad

Published on 15 December, 2011 at 11:00

Video from The Monocle Order's New York City launch party

Published on 13 July, 2011 at 16:05

The Monocle Order, our latest website project, featured on

Published on 30 June, 2011 at 12:24

Compare iPhone app live on the App Store

Published on 01 June, 2011 at 10:37

Our thoughts go out to the people of Christchurch

Published on 22 February, 2011 at 15:02

WIN a free lunch at Petite Fleur at Seifried Estate

Published on 17 January, 2011 at 10:30

Think Packaging on The Dieline and Lovely Package®

Published on 12 January, 2011 at 11:26

Hutli—our Mix & Mash competition entry

Published on 30 November, 2010 at 21:09

The Bridge Street Collective—A space for creative people to gather

Published on 10 November, 2010 at 10:34

Today we launch our new website

Published on 27 October, 2010 at 21:19

eDay 2010 in Nelson and Tasman

Published on 21 October, 2010 at 12:52

10% off Mac POS software and hardware

Published on 09 August, 2010 at 15:31

Tip: How to reset your PayPal password using a New Zealand bank account number

Published on 03 March, 2010 at 15:31

Intuitive Point of Sale for Mac in New Zealand now has its own home

Published on 10 February, 2010 at 15:26

Lucid Design T-Shirts—the Summer 2010 Collection

Published on 15 January, 2010 at 15:25

Website design and development by Lucid Design, Nelson New Zealand  |  Keywords: web designer, graphic designer, photographer, packaging, nelson