How to: merge existing GMail accounts

If you’re like me you have a GMail account (something like [email protected]). But, one day, Google Apps came along and offered the opportunity for Google to host and act as your domains’ email provider. I immediately forwarded all my incoming gmail.com email to devinreams.com and set up the domain on Google Apps. Then a year later, I decided to change my domain to reams.me, so I set up another Google Apps instance and started forwarding email there.

Now I had three GMail accounts, all with different email saved in them. Oh, and suddenly, Google Voice and Contacts appered on the scene. I realized I wanted go go back to my gmail.com account. I had email all over the place.

I had Google email stored in three difference places

I wanted to consolidate the email from my two Google Apps accounts (devinreams.com, reams.me) and have my thousands of emails stored all in one place (gmail.com). “No sweat”, I thought. But, this process is harder than may appear on the surface. Below I outline a multi-step process where I

  1. physically copy email to one account to another, and
  2. setup rules so that new mail (incoming and outgoing) is coming to/from the right places.

Step 1: Setup Mail.app using IMAP

The biggest endeavor is moving the mail which is a process of: configuring multiple IMAP accounts in Apple’s Mail (I assume you can do the same in any IMAP-compatible email client), and physically copying the messages between the two servers. A few notes before we get setup:

  • Labels: Using IMAP, GMail labels will appear as ‘folders’. This means that one email with a label applied can appear in at least two places (All Mail, Label 1, Label 2). For simplicity’s sake, I decided to abandon the two-dozen-or-so unique labels that I had across the three accounts. There was no easy way to reconcile the different wording or usage I had evolved over the three years of different accounts. So, I stuck to simply moving ‘All Mail’ to ‘All Mail’ across accounts.
  • Connectivity: In order to make this (potentially HUGE) move, your network connection (upstream) will be in use the entire time. Basically, the email client is constantly sending commands such as “Copy Message A from Account A to Account B.” Needless to say, this will take a while and will require some bandwidth.
  • Timeouts means batching: In my experience, Google had a hard time keeping a connection open if I simply tried to copy 12,000 emails at once. I couldn’t tell if it was idling out (idle commands were queued to be sent after the copy commands…) or just choking on the request. I found I could easily queue a month (about 1,000) emails without Google disconnecting.
  • Duplicates: Despite my initial connection failures, IMAP and Google were smart enough not to copy duplicate messages. In other words, if I copied Message A already, and tried it again, it didn’t. So, if you lose your place when batching, don’t worry about it.
  • Crashes: Mail will crash when you first try to open your ‘All Mail’ folder (or any large IMAP folder for that matter). Just relaunch a few times and it’ll get there eventually. Trust me, it may take a few tries. This is where the ‘Activity Window’ can help tell you what’s going on.

With all that said, here’s the process:

  1. Go into your Gmail accounts and enable IMAP (Settings > Forwarding and POP/IMAP).
  2. Open Mail.app and set up your first GMail account (do not check ‘Automatically set up account’) following these IMAP instructions. DO NOT check ‘Take account online’.
  3. In the ‘Accounts’ screen, select your first account and disable all the ‘Mailbox Behaviors’ (not necessary, but prevents server-side things from happening).
  4. Switch to the ‘Advanced’ tab and change the ‘Keep copies of messages..’ setting to: ‘Don’t keep copies of any messages’.
  5. Repeat this process to set up your other account(s) that you’re moving to/from.
  6. Close the ‘Accounts’ screen and save your changes.
  7. Open the ‘Activity Window’ (command + 0) so you can watch what’s going on in the background.
  8. Now you can ‘Take All Accounts Online’ from the Mailbox menu.

At this point, you now have a Mail client setup so that your emails can simply copy across accounts without locally downloading each message. Now the fun part.

Step 2: Copy all your email from one account to the other

  1. Browse to the account you want to move email from and open the ‘[Gmail] All Mail’ folder (this is where the crashing is likely to happen, relaunch, watch your ‘Activity Window’, repeat).
  2. Start wherever suits you and select a good batch of emails (I would do one month at a time, approximately 1,000 emails per month). Do not try to copy all of them at once. If it works, congrats, if it doesn’t, you’ll have no idea how far it got before crashing or timing out.
  3. Right click your selection and select ‘Copy To’. Browse to the ‘[Gmail] All Mail’ folder of your other account. (notes: you can also drag/drop or ‘Copy and Paste’, you can also repeat this process using your labels instead of ‘All Mail’).
  4. Sit back and watch the bits and bytes fly through the internet in the Activity Window.
  5. Go ahead and queue the next batch of emails (eg: February). Repeat as much as you’d like. You can see these batches saved in the Activity Window and monitor progress.

Over the course of 3 days I was able to move about 30,000 emails in the background (set this up before you go to sleep and use an application like Caffeine to keep your computer awake). Trust me, this is much faster than the ‘POP import’ process that GMail has built-in (don’t even look it up).

Once you’ve arrived here you’ve successfully copied all your email from at least one account to another. You can confirm by browsing to your account online and doing some math. Now, I want to make sure all my future email goes to and comes from the right place.

Step 3: Setup forwarding from the old account

Very simply, all you need to do now is visit the old accounts and browse to ‘Settings > Forwarding and POP/IMAP’. Configure your old address to forward to your new address. Perfect… moving on.

Step 4: Setup your new account to send ‘from’ your old account

You’re likely aware that GMail can send email “on behalf of” other email addresses. Set your primary email account to send from your old ones (if so desired):

  1. Browse to ‘Settings > Accounts’
  2. Under “Send mail as” click the ‘Add another email address you own’ link
  3. Follow the instructions, your old address will be sent a confirmation (it should appear in your new account if you followed Step 3)
  4. If you want to use an old address as your primary outgoing address (eg: all email comes to gmail.com but I want to still send as if I’m at reams.me), then click ‘Default’ next to that address and check the “When receiving a message:” options below.

Now you can send email from your primary account as if you were still at your old ones. Learn more about custom ‘From’ addresses.

The consolidated life

Great, now I have all my email accounts flowing into my gmail.com account. My GMail contacts and Google Voice contacts are all synchronized (in addition to my iPhone contacts and Apple Address Book contacts).

Plus, I have over 4 years of email all in one place. I can find receipts from 2004 without having to login to my old accounts!

I tell you, I’m living the dream…

If you have any questions, be sure to post them in the comments.

6 thoughts on “How to: merge existing GMail accounts

  1. Tom Markiewicz

    I actually went the other direction and started using MailPlane for all my Gmail and Google Apps accounts. I actually found that by keeping them separate, but easily accessible allowing me to process email faster. Plus I always kept having performance issues with Mail.app.

    Reply
    1. Devin Reams Post author

      I use MailPlane on and off, too (for unrelated account, eg: work and personal) and use the web interface primarily. The point being is this outlines how you can use IMAP in Mail.app (assuming other clients can, too) to consolidate email message that should be together (my three personal accounts).

      Reply
  2. Derek

    I was in the same boat as you a few months ago when I started using Google Voice on a regular basis. Same thing when Tasks came out. It just seems much easier to use a standard Gmail account rather than one of the Google Hosted accounts. My own wish is that there was a way for Gmail to correctly set the from address when sending email from a iPhone. No matter what rules are setup online through Gmail, any email sent from the iPhone uses my personal Gmail account.

    Reply
    1. Devin Reams Post author

      Hmm, I remember having the same issue but I believe was able to resolve the ‘From’ by setting the send from ‘default’ and syncing with Mail.app (which had the correct From: address).

      Reply
  3. Pingback: blogmarks for 2009-07-13 | I Live In Success

Leave a Reply

Your email address will not be published. Required fields are marked *