Lion Mail.app and Gmail setup

NOTE: For Mavericks, the way Mail.app works with Gmail completely changed. The most important change is that Delete will move the message to Trash and Archive will move the message to All Mail (like a normal Gmail Archive command). It is important to have All Mail visible to IMAP in the Gmail settings.

This is very annoying, and you may be better off using a new mail client like Airmail.

---

Here are my settings for using Mail.app with Gmail and Google Apps. It took a lot of fussing to get these right, so I'm putting them here to point people to if they are having problem.

My main goals were:

  • Have "delete" work as archive (unless you delete from [Gmail]/All Mail)
  • Be able to configure this on multiple computers and go back and forth between them and the web interface and my iPhone with no problems.
  • Not have any email deleted

These are the Gmail settings:

In particular, it's important to set the Auto-Expune on so that deletes from Apple are sent directly to Gmail. Otherwise you will log in to the web app and still see mail in the Inbox that you archived on Mail.app.

Here are the mailbox settings that I use:

Also, turn off junk mail filtering because Gmail will do a better job of that:

From the menu, I have these settings enabled:

View > Show Deleted Messages

I don't use any of the Mail > Use This Mailbox For... for any of the mailboxes.