Migrate mail from other Google accounts or IMAP servers

These instructions are for administrators using Windows XP, Windows Vista, or Windows 7. For email migration options of other operating systems, see Migrate mail using a Mac. You can also check out the Google Apps Marketplace to review other migration solutions provided by third parties.

If you've created a new Google Apps account for your organization's email, you can migrate your data from your old email account to your new one using Google Apps Migration for Microsoft Exchange. You can choose to migrate data using either one of the following server type options:

  • Gmail: Uses IMAP to migrate data, but provides configuration presets to make migration simpler.
  • IMAP: Provides more options for greater control over the migration. You can migrate from nearly any type of RFC-compliant IMAP server.


Google Apps Migration for Microsoft Exchange supports the migration of email from all versions of Google Apps (and the consumer version of Gmail) to any other version of Google Apps. GAMME also supports migration from the following IMAP servers: Microsoft Exchange, Novell GroupWise, Cyrus, Courier, Dovecot, SunMail, and Zimbra. To learn more about migrating from IMAP servers, see "Step 1" in the GAMME Admin Guide (PDF).

Other considerations:

  • Labels: Must contain messages or the labels will not be migrated. And messages have to be present at each level of nested labels or the structure will be broken.
  • IMAP settings: End users do not have to enable IMAP in their Gmail settings.
  • Multiple domains: You can migrate email to just your primary domain or to multiple domains.
Set up the migration

To learn more about Google Apps Migration for Microsoft® Exchange, see the GAMME Admin Guide, which includes detailed information about running a migration.

Create user list

Before you begin, create a list of the user accounts that you are migrating. The list should be a CSV file in the following format:

user1#user1password, google_apps_user1
user2#user2password, google_apps_user2

Example: user@sourcedomain.com#password, user@destinationdomain.com

Ensure that there are no extra characters in the CSV file. Some software can insert quotation marks around each line, which will cause the tool to fail. For more information, see Create a CSV file for GAMME.

Configure the Admin console

Step 1: Enable the Provisioning API

  1. Click Security > API reference.
  2. Select Enable API access.
  3. Click Save changes.

This API is required for validating users before the migration; therefore, only read-only access is required.

Step 2: Enable your OAuth consumer key

You must configure OAuth Client access to migrate data.

  1. Click Security > Advanced settings.
    Where is it?
  2. Click Manage OAuth domain key.
  3. Click Enable this consumer key and write down your OAuth consumer secret.

Step 3: Specify the API scopes

  1. Click Security > Advanced settings.
    Where is it?
  2. Click Manage third party OAuth Client access.
  3. In the Client Name field, enter your OAuth consumer key from step 2. This is usually your primary domain: example.com or www.example.com.
  4. In the One or More API Scopes field, enter the following comma-separated list of URLs:


    If you entered the scopes correctly, here's how the scopes should appear:

    API scopes public folder migration

    Note: If the English descriptions don't appear for any of the scopes, make sure have you copied them correctly.

  5. Click Authorize. You can now migrate data to your domain(s).
Configure the migration tool

The configuration for migrating email data between Google Apps accounts is described below.

Step 1 of 3: Server Details

Choose either the IMAP or the GMail migration option.

Gmail presets option:

  1. For Server Type, select Gmail.
  2. Click Next.

IMAP option:

Note: Using the utility to migrate between two Google Apps accounts using IMAP requires slightly different settings than those described in the GAMME Admin Guide
  1. For Server Type, select IMAP.
  2. For IMAP Server type, select the server type that applies to you.
  3. In the Hostname/IP Address field, enter the address of your IMAP server. For instance, imap.gmail.com.
  4. Choose your IMAP Security preference.
  5. Enter your IMAP Port value. If you're using SSL, enter 993.
  6. Leave the IMAP Path Prefix field blank unless you're migrating from a Cyrus or Courier IMAP server. In that case, you should enter INBOX as your prefix.
  7. Click Next.

Step 2 of 3: User and Domain Information

Gmail and Gmail IMAP migration step 2 with GAMME

  1. In the Google Apps domain name field, enter the new Google Apps domain where the data will be delivered.
  2. In the Google Apps Two-legged OAuth details section, you'll need to copy the Consumer key and Consumer secret from the Advanced tools > Manage OAuth domain key page and paste the information into the corresponding field in the utility.
  3. For the File of users to migrate field, select the CSV file that you created before beginning the configuration.
  4. Click Next.

Step 3 of 3: Migration Settings

Gmail and Gmail IMAP migration step 3 with GAMME

  1. Select the settings that suit your migration needs. See "Step 4" in the GAMME Admin Guide for more information.
  2. Click Next.
  3. The Migration Settings screen appears, showing a summary of the configuration.
  4. Review and make and optionally make changes to the settings:

    Gmail and Gmail IMAP migration step 4 with GAMME
    • Migrate all data: When checked, the utility will overwrite existing data during migration. When unchecked, duplicate messages will be skipped.
    • Save settings: When checked, the utility will retain the current configuration for future use.
    • Run Diagnostics: When checked, the utility will verify the configuration before running the migration.
    • Estimate: When checked, the utility will estimate the message count for the source users.
    • Migrate: When checked, the utility will perform the migration.  
  5. Click Next to begin the migration process.
When migrating from gmail, users who log into their email accounts may see the temporary label 'Migration/DMS-Temp'. This label is created when the migration process begins and deleted once the migration process is completed.
If you're using the Gmail IMAP option: For advanced tips on doing IMAP migrations, see "Preparing For Your Migration" and "Step 1" in the GAMME Admin Guide.