How to make Gmail IMAP play nice with Apple Mail.app

I know. This should be a no-brainer. However, I didn’t use Mail.app with Gmail for a long time because Mail.app created strange labels in my Gmail Web interface and, most deal breakingly, refused to delete my messages but instead kicked them into a new label or back into the Archive label (depending on the option I checked in the Accounts –> Mailbox Behaviors –> Trash section). This meant that I had deleted messages scattered all over Gmail and a bunch of weird labels that I didn’t want. (Please, no comments on “why would you delete anything from Gmail, with those gazillion gigs of storage?”…I really don’t want stored copies of notifications that my credit card bill is available! I can stagger on without it!)

Invariably someone is wondering, “WTF is IMAP?” There is a complete technical explanation about POP and IMAP here. Basically, you’ve got your Web mail, which is what you see when you get your mail through your Web browser; your POP mail, which downloads a copy of your mail from the server to your local computer (through Eudora, Thunderbird, Mail.app, or another mail client; the fate of the original e-mail is to remain undisturbed on the server or to be deleted); or your IMAP mail, which syncs your e-mail between the server and your local computer. Why care? Because if you, like me, have various labels or folders with which you organize your mail, it’s a pain in the ya-ha to keep them spic and span on your local computer and then just have a messy inbox in your Web mail. I want it the same no matter how I approach my e-mail, and Google is nice enough to provide free IMAP. IMAP is not for folks who don’t have always-on Internet connections. No connection = no mail.

Now I will make another brief digression because undoubtedly readers will wonder why I would not want to solely use Gmail’s fabulous minimalistic Web interface. It’s OK. It’s way better than Yahoo! Mail. I use it without flinching too much if it’s convenient. Still, I like Mail.app because there are no ads, because it’s easy to include photos, and because I like the data handlers. I use Mail Act-On to assign keystrokes that deal with my mail more intuitively than Gmail’s. I additionally like the integration with Apple’s Address Book and the fact that custom pics for people show up in their e-mails (hey! eye candy is A-OK!). I can also now report that dotmac does effectively sync all the settings and accounts for Mail.app. Cool.

So. If this all sounds good, head over to Gmail and read their instructions for setting up IMAP with Apple Mail, except when you select Gmail in the accounts pane and then go to Mailbox Behaviors –> Trash, tick both options (”Move Deleted Messages to the Trash Mailbox” and “Store Deleted Messages on Server”). This is important as it directly counters Google’s directions. Finally, close out of the preferences, saving everything, and head up to the MAILBOXES section in the top left of your Mail.app window. Click the arrow next to “Sent” and then when it expands click once on “Gmail.” Head way up to your menubar and click Mailbox –> Use This Mailbox For –> Sent. Do the same thing for “Trash” (only pick Trash instead of Sent, obviously). You can use this same sequence to use your Gmail Spam folder for Apple.app junk if you have selected “Move it to the Junk Mailbox” in the Junk Mail preference pane.

Voila! You do not have sent and deleted mail all over the place: only in the “Sent Mail” and “Trash” labels in Gmail. Good times for everyone.

9 Responses to “How to make Gmail IMAP play nice with Apple Mail.app”


  1. 1 shrop June 22, 2008 at 5:33 pm

    I setup Apple Mail with Gmail the exact same way. The trick about assigning sent, junk, draft, etc mailboxes to the proper gmail folders really makes Apple Mail with gmail more usable.

    Thanks!
    Shrop

  2. 2 roz July 18, 2008 at 4:23 pm

    but you still get that extra folder on the side for starred and all mail which I hate. anyway to kill those?

  3. 3 notratched July 18, 2008 at 8:09 pm

    Not that I know of; I can use the “Get account info” dialog to get to a subscription list, but I can’t get Mail.app to populate it. Perhaps it’s because these are “labels” instead of folders…dunno. Anyone?

  4. 4 phdotaschauer July 20, 2008 at 3:06 am

    I would love to have a button in my Mail.app that allows Archiving like the Archive button in the web interface. Does anyone know Apple Script, because I think it might be necessary to use Apple Script for that and adding a button that triggers that!

  5. 5 notratched July 20, 2008 at 8:22 am

    I don’t know nothin bout no buttons (I’m a keyboard-only girl), but Mail Act-On (http://www.indev.ca/MailActOnAndLeopard.html) lets you assign keyboard shortcuts. I have ctrl-A archive my mail to the All Mail label, just like pressing Y does in the Gmail Web interface.

  6. 6 InasyIndini August 2, 2008 at 9:38 pm

    Tahnks for posting

  7. 7 Danny August 11, 2008 at 3:24 pm

    Wow - thanks for the tip and taking the time to write it!! I didn’t even stop to think there may be a built in way to map the folders manually. You saved me a lot of frustration!

  8. 8 Brian August 12, 2008 at 12:51 pm

    I am wanting to switch to IMAP but I don’t see how it is possible in Mail 3.0. Do I have to delete my accounts and set up new ones? If so will I lose everything I have in my accounts now?

  9. 9 notratched August 12, 2008 at 5:47 pm

    Can you update Mail.app to 3.4? I think the IMAP implementation in 3.0 was really bad. If you delete your POP account to switch it to IMAP, you’ll lose all the messages unless you’ve left them on the server (in which case they’ll all download when you set up the IMAP account, but they’ll all be in one giant folder). You can export the e-mails with a variety of tools before you hose the account and then reimport them if you want.

Leave a Reply




Hedwig with freaky eyes

Archives