GMail, IMAP, and Apple Mail = Slow?

2009 December 23
by Colin

I am finally getting around to getting GMail to play nice with Apple Mail on my Macbook, if only for the ability to work offline (i.e., when I’m 35,000 feet up) as well as have some form of coherent backup in the (hopefully unlikely) event that GMail kicks the bucket for an extended period of time.

I had tried to sync my GMail account once-upon-a-time, but decided it wasn’t worth the potential hassle. What hassle, I don’t remember– but in any event, I remember it was extremely easy to get it up and running using POP. However, this time around I decided IMAP was the way to go. Over the last few years I have slowly devolved into someone who uses GMail as my big e-mail cloud in the sky– that is, I want to be able to access an identical account (same inbox, sent, drafts, etc.) from anywhere (Macbook, PC, office, iPhone). IMAP should give me that ability.

Well, once I set up Mail to play nice with my Google account I noticed signficant slowdowns. I mean really, really slow. Like sending an e-mail that said “hello world!” took five minutes as the Apple pinwheel spun frantically. It seems like this a common occurrence with Mail 3.x and Leopard/Snow Leopard but there seem to be very few answers. I did end up finding one in the dusty corner of the internet.

It appears that Apple Mail has an issue with big attachments. I mean really big attachments. Like 20 MB big. Get rid of them, and it solves the problem. How do you do it? Well, there are two ways…

The easy way (tested by yours truly):

1.) Delete your IMAP account from within Mail by going to “Mail” -> “Preferences” and then clicking the little minus button below the account names. NOTE: I’m pretty sure this is foolproof with IMAP, but please, please make sure you are not deleting your e-mails from the server when you download them to your computer, because if you do that and then delete this account, well, you’ll lose your e-mails.

2.) Go into finder and delete the folder ~/Library/Mail/IMAP–/ or thereabouts.

3.) Go back into Mail, click on “Mail” -> “Preferences” and then the plus icon. Create your IMAP account as you did previously (make sure “create my account automatically” is unchecked or you will end up just creating a POP account with the default settings). This time, unclick “bring this account online” at the end of the creation process.

Don't check

4.) Go back into “Mail” -> “Preferences,” click on your GMail – IMAP account, then click on the advanced tab. Uncheck “compact mailboxes automatically” and MOST IMPORTANTLY set the offline viewing preference to keep “all messages but omit attachments.”

All messages, but omit attachments

5.) Set account to “online” and Mail will re-download all your e-mails; however e-mails and e-mails alone– no attachments. Everything should be running at Mach speed again.

Now, this way has one main drawback. You aren’t storing any attachments on your within Mail; if you want to download them, you have to do so as the e-mail comes in. This isn’t a problem for me, since I download the attachments I feel are important to whatever folder they are needed in by default and therefore don’t need another copy clogging up my inbox. However, if this is of crucial importance you can try the next step (at your own risk).

The hard way (I haven’t confirmed this works, but this would allow you to keep most attachments offline; only the ones over 20 MB are deleted– courtesy of bebopper):

1.) Quit Mail (Force quit if you have to)

2.) In Finder, click “Go” -> “Go to Folder.” Type the following folder path (replacing with your GMail User Name): ~/Library/Mail/IMAP–/.OfflineCache

3.) Look through the cached messages in this invisible folder and see if there is one or more larger than 20MB.

4.) Drag the offending large messages to the Desktop or Trash. Restart Mail, and Mail should stop hating you.

Both of these are essentially band-aids, so hopefully Apple will get its act together and figure out exactly what is going on. This seems to be a problem that has arisen in later incarnations of 10.5 and into 10.6, so it’s something that should be of pressing importance to the development team as we speak.

Find this page useful? Save you a few dollars fixing something?
If you so desire, feel free to kick back a dollar or two to help site upkeep.

6 Responses leave one →
  1. 2010 January 13
    Dave permalink

    The second method or “hard way” is extremely easy and worked great! I am glad I found this tip as Mail became usless after I accidentally tried to send a 21 mb attachment. Really hope apple fixes this soon. Thanks again!

  2. 2010 February 20

    Thanks for helping to tackle this problem. I’ve tried:

    2.) In Finder, click “Go” -> “Go to Folder.” Type the following folder path (replacing with your GMail User Name): ~/Library/Mail/IMAP–/.OfflineCache

    But i can’t seem to find any folder. Let’s pretend my Gmail username was “john.doe” … should this be my search:

    john.doe): ~/Library/Mail/IMAP–/.OfflineCache
    or
    john.doe: ~/Library/Mail/IMAP–/.OfflineCache
    or
    something else?

    THANKSdw

  3. 2010 February 20
    Colin permalink

    It should be…

    /Library/Mail/IMAP-john.doe@imap.gmail.com/.OfflineCache

    or

    /Library/Mail/IMAP-john.doe@gmail.com/.OfflineCache

    or maybe even…

    /Library/Mail/IMAP-john.doe@gmail/.OfflineCache

  4. 2010 March 26

    Thanks very much for this posting – it resolved my problem with Gmail / Apple Mail continual non-stop loop!

  5. 2011 June 7

    Yep — found this article trying to fix a case like this, and THANK YOU — there was a 1.75 GB file in that hidden directory, and it was bringing the entire Mac to its’ knees whenever Mail was open.

    Here it is 2011 — almost 2 years after you posted this article — and the issue still comes around.

  6. 2011 November 5
    Cecil permalink

    This is the only help I have found that finally solved this slowdown issue for me. How frustrating. My answer was that in the /Library/Mail/pop-myemailaddress@whatever there were three such pop addresses that I stopped using ages ago. I guess in using the technique of copying over mail folders on new machines these came along for the ride. Moved them out of the folder and mail is now up to lightning speed. What a relief. Thanks for the hints.

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS