This is old content! The catacombs are a snapshot of content created from 2005-2007. For new stuff, visit Maniacal Rage.

maniacal rage

Garrett Murray lives here. He's the senior developer at Blue Flavor by day and an amateur writer and comedian by night. You can read more about him or
Garrett Murray's hCard
photo

I have three email accounts I check regularly: My Maniacal Rage account, my Gmail account and my Blue Flavor work account. My Rage account uses Gmail for Domains, so it's basically another Gmail account. Gmail doesn't support IMAP. So using the iPhone the last two months for email has been a suck-fest: Mark an email read on my Mac, mark it again on my iPhone. Spam gets through on my Mac, spam gets through on my iPhone. Ugh. There has to be a better way. Turns out, there is.

Gmail doesn't have IMAP support, but that doesn't mean we can't use IMAP with a few extra steps. It's pretty easy to do, but it has one requirement: You have to have a hosting account with a large amount of space (say, at least 2.5GB). That sounds like a lot, but these days hosts are overselling so much that it's not hard to find for cheap. For instance, I have an account at Dreamhost that I use for non-critical stuff and I have 520GB of space. Yeah, that's not a typo. That's how insanely oversold Dreamhost accounts are. All that for less than $15/month. Ridiculous.

So get yourself some hosting or use one of your current large accounts. All you need is IMAP support and space. This short tutorial assumes you're using Apple Mail, but you can probably figure out how to do this in another client. Follow these easy steps to setup IMAP for Gmail:

  1. If you haven't already done so, set up Gmail POP and download all your email to your Mac. For help on that, read the Gmail FAQ. Basically, you need all your Gmail email on your machine for later.

  2. Create an IMAP account on your server. This address is going to be private, you'll never give it out and most people will never know it exists. So make it whatever you want, although I would recommend something you wouldn't mind someone figuring out (i.e., don't make it douchebag@yourcom.com).

  3. Disable POP at Gmail.

  4. Set up your IMAP account on your Mac (separate from your earlier POP account). When configuring this IMAP account, configure it with your Gmail address as the email address, then set up incoming servers correctly for your IMAP account, but set up outgoing servers correctly for your Gmail account. For instance:

    Email address: dude@gmail.com
    Incoming mail server: mail.mydomain.com
    Username: my_imap_user
    Password: my_imap_password

    Outgoing mail server: smtp.gmail.com
    Username: dude@gmail.com
    Password: my_gmail_password

    Note how it's configured IMAP on the way in, Gmail on the way out.

    You'll also need to change a few outgoing settings that Gmail requires, like the port (from 25 to 587). These details can be found on the POP configuration page on the Gmail FAQ.

  5. Enable forwarding for your Gmail account. Tell Gmail to forward all your mail to the IMAP account you created, and to archive Gmail's copy when its done (that way you don't have an inbox with thousands of messages).

  6. Configure special folders. In Mail, in your new IMAP account, create three new mailboxes. Call them Draft, Sent and Trash. Then select each, one at a time, and go to Mailbox → Use This Mailbox For → [The mailbox of the same name]. This will configure Mail to save these kinds of messages to the server. You'll see the mailboxes disappear and reappear in the right places (under Draft, et cetera).

  7. Copy all your email to the IMAP account (and, thus, the server). Do this by dragging mail and folders from the POP account you have (where all your email was downloaded) to the IMAP account. This may take some time depending on how much mail you have. Note that you can even copy your sent/drafts/trash to the server. Tip: the Activity Viewer window (⌘0) will show you the progress of the copy.

  8. Disable the POP account in Mail and restart the app.

  9. Send some test messages. You should be able to send email to another account and it will show up looking like it's from your Gmail account. Reply to it and you'll receive the email through your IMAP account.

Wahoo! IMAP access to your Gmail account! Now all you need to do is sync this account to your iPhone if you've got one. This should make managing your email a lot easier.

Tags: imap, iphone, mail, tutorial Hierarchy: previous, next