Gmail and Mail.app on Mavericks – A Middle Ground

There’s been a lot of complaining about how Mavericks breaks Gmail compatibility in the built in Mail application from the likes of Gruber and Marco based on Joe Kissel’s piece on TidBITS.  Kissel eventually decided to switch away from Gmail as he outlines in this follow up tutorial.

Some background: I’ve been using Gmail and Mail.app together for many years, since before Gmail offered POP3 or IMAP support.  My setup has been very stable and reliable over the past 7+ year that I’ve used it, so I thought it would be a good time to share how it works.  It came about because I wanted to be able to access my Gmail messages via several different computers but they had yet to offer support for the IMAP protocol (or even POP3 at that point).

I created a separate email account on a server that supported traditional IMAP.  I used a private domain hosted from DreamHost, but any mail server with IMAP support will work.  You also don’t have to worry about spam filtering or making sure your domain is not black or gray listed by the big guys (a common problem with self hosted email) because this account will only be used by you.

Once I had my own IMAP compatible email server, I set Gmail to forward all messages to this private account and then archive its own copy.  In a sense, Gmail is being used as an intermediary and front-end for my privately hosted email back-end.  Finally, I set all my mail clients like Mail.app on my Mac and iPhone to use my private IMAP server for incoming mail while they used Gmail’s SMTP servers for all outgoing mail.

And that’s really all you have to do.  People can email you at your Gmail or Google Domain hosted email address just like they always have, but you’ll get their messages from your standard IMAP server.  Outgoing email, since it’s sent via Gmail SMTP, shows all the standard addresses and headers from Gmail so recipients can’t tell the difference. It’s also archived to your Gmail Sent Mail folder/tag.

Basically, it’s a nice middle ground approach to using Gmail on your Mac: more convenient than a full switch to another email provider and more sane than Gmail’s own IMAP.

Some of the benefits of this setup:

  1. No addresses to change, use the same email addresses you always have.
  2. All sent and received items are archived in your Gmail account for reference later.  If you ever can’t find a local copy of an email, it’s easy to log into the Gmail web interface and dig it up from your full history.
  3. Similar to point #2 you can be a little more aggressive about cleaning and purging your inbox, knowing that Gmail has a backup copy of your email.
  4. Since your email will come via Gmail, it’s very unlikely your messages will be filtered by spam blocking tools.
  5. If Gmail ever disable’s IMAP support, this setup will continue working perfectly.
  6. You get Gmail’s spam filtering before things reach your inbox.
  7. You can use this to combine multiple external addresses into one account, and, with, some server-side rules on your IMAP host, filter messages accordingly.

 

Some of the downsides:

  1. You need somewhere to host your IMAP inbox, if you already have a web server this should be pretty easy but otherwise you’ll need to pay a few dollars a month for a service to host it for you.
  2. There are 2 points of failure between getting your email.  This hasn’t been a large problem for me, but if you had frequent downtimes on your IMAP host it could be.
  3. It’s a bit confusing to set up because you can’t use the Gmail setup assistants in OS X and iOS.  Rather, you can use them but you have to modify the domains later.  Alternatively, once you set it up on your Mac you can sync the account settings to iOS.
  4. You loose access to the extra features Gmail puts on top of email, like tags.
  5. The Gmail web interface will not reflect the state of your inbox.  You’ll have to use the one from your IMAP host, but that one might not be able to send messages via SMTP to Gmail (this depends on your provider).
  6. If Gmail ever disables forwarding, this setup will break.  I consider this less likely than them removing IMAP support.
  7. It’s harder to use Gmail-centric email clients like Mailbox with this setup, but that’s true if you just run your own IMAP server too.
  8. The NSA is going to be able to read your mail even easier.

 

Update: Apple released Mail Update for Mavericks as I was typing this post.  I think it should fix some of the Mail.app bugs and regressions in the latest OS.  Instead it should now work just like things did in Mountain Lion.  However, this doesn’t fix the non-standard IMAP implementation Gmail provides, so I still recommend my solution.