Proper IMAP Between GMail and Apple Mail

/

Over the weekend I took the time to migrate the way that I interact with my GMail from the old POP method to the newer (and better) IMAP method. There are a few core reasons for making this dramatic switch, and I’ll mention those later. But first I want to provide you with the step-by-step instructions that I put together from many different sources to set up proper and consistent IMAP syncing of email between the GMail Cloud and your Mac running Mac OS X 10.5 Leopard (Mail 3.x) or above. See the extended body for the directions and reasons for switching. Enjoy, Alex.

Step-by-Step Setup Instructions

  1. Go into your GMail settings in your favorite web browser and click on the Forwarding and POP/IMAP tab
  2. Make sure that the Enable IMAP option towards the middle of the page is selected
  3. Go into the Labels tab
  4. Deselect Starred and All Mail from their Show in IMAP checkboxes, you can do the same for any of your own labels as well if you like, this will stop them from showing up in any email client, you do want this for the All Mail especially as it would effectively duplicate every message on your Mac
  5. If you use or plan to use either Filters on the server or Rules in Mail download and install the IMAPCheck plugin, this will enable Mail to look at more than just the Inbox when automatically checking for new mail, ignore the warning that it is no longer needed in 10.5 because it is still needed for me so will likely be for you too
  6. Follow the instructions for IMAP setup at the GMail Help Center, you’re not done when you finish these
  7. Once the initial setup is done you should see a heading like Google or GMail (whatever you named the account) in the sidebar of Mail alongside On My Mac, Mailboxes, Reminders, etc.
  8. There will be a subfolder with a white icon (not blue) named [Gmail] that has Sent Mail, Spam, Trash, and Drafts in it
  9. Select these one at a time and go into the Mailbox menu, select Use This Mailbox For submenu and then choose either Sent, Junk, Trash, and Drafts respectively (you can omit Junk/ Spam if you don’t have Junk Mail filtering enabled in Mail and you could also, then, disable Spam in IMAP from the GMail Label settings)
  10. The mailboxes will disappear leaving the white [Gmail] mailbox empty, but you can’t delete it
  11. Look under the Mailboxes heading, each mailbox minus the Inbox will have a disclosure triangle with On My Mac and the name you gave your GMail IMAP account as sub-mailboxes that make up the root Sent, Trash, Drafts, and Junk mailboxes
  12. Open up the Accounts preferences and select your new IMAP account
  13. Under the Email Address heading add any and all alternate email addresses that GMail has set up to send as separated with a comma after your root GMail email address, this will enable Mail to send out email looking like one of those other addresses
  14. Switch to the Mailbox Behaviors in the settings for your IMAP account
  15. Make sure that Store draft messages on the server is enabled, Store notes in Inbox is disabled, Store sent messages on the server is enabled (with the Delete setting as you’d like), Store junk messages on the server is enabled (with the Delete setting as you’d like, note that junk messages for GMail are Spam in the webmail interface), Move deleted messages to the Trash mailbox and Store deleted messages on the server are both enabled (with the Permanently erase setting as you’d like).
  16. Next visit the Advanced tab of the account settings and select your desired option for keeping copies of messages for offline viewing, I chose to keep copies of all messages but omit all attachments until manually downloaded

Whew, I think that’s all that is required to properly set up IMAP between a GMail account and Apple Mail under Leopard (or above). At this time you should see much less, if any, inconsistency between the webmail interface, your Mac, and any other IMAP clients you set up then you would have if you just stuck to Google’s instructions alone. Once you feel comfortable with the new arrangement you can delete your old POP account and all the On My Mac mailboxes. Note that each IMAP mailbox is really a label, so moving and copying messages to different folders is assigning the messages those labels up on the server.

The Core Advantages to IMAP Mail (with or without GMail) Over POP

  1. Any organization you do in Mail is mirrored up on the server, so: 1.a. Adding or deleting folders in Mail adds or removes that label 1.b. Your entire organizational layout is accesible not only on your Mac (like it was with POP), but also on the webmail interface and all other IMAP clients you set up (desktop or mobile)
  2. Because the drafts are stored on the server as well as locally, you can start writing a longer message in one place and finish it in another, on a different machine
  3. The offline functionality is seamless enough that if you don’t have an internet connection you’ll still have acces to (in my setup) all the messages, just not attachments, and when you come back online all the changes you made are pushed up to the server
  4. If you have an iPhone or iPod Touch you know that reading a message on your mobile device will still leave that message marked as unread when you return to your Mac, since your Mac is now also using IMAP to access GMail this small annoyance no longer happens

Conclusion

Overall your email is entirely mobile and with you anywhere you have internet access when you use IMAP over POP and with that you’re physically much freer to deeply interact with your email whenever you need to on any device. With POP you could check your email anywhere but only organize it how you liked on your Mac. Feel free to leave me comments about this topic and my setup instructions, as well as your personal experiences with GMail and IMAP.

Discussion