Migrate mail from Google Accounts or IMAP

Google Workspace Migration for Microsoft Exchange

As an administrator, you can use Google Workspace Migration for Microsoft Exchange (GWMME) to migrate email data from your old Google or IMAP-based email account. You can migrate data from almost all RFC 3501-compliant IMAP servers, including Google Workspace. You can also migrate email data from Gmail accounts. 

Step 1: Before you begin

  • Check the system requirements—Make sure you meet the GWMME system requirements.
  • Turn off folder-size limits and make labels available—Each user must individually turn off folder-size limits and make the All Mail, Spam, and Trash labels available to IMAP. Tell your users to follow the steps in Get email from another email app

Step 2: Set up access for apps

If you're migrating from a Google Workspace account, follow the set-up steps in Option 2: Migrating from a Google Workspace account, then move to step 3 on this page. 

Allow less-secure apps to access accounts

You need to allow less-secure apps to access accounts if you’re migrating from:

  • Google Workspace accounts and are using passwords instead of OAuth
  • Personal Gmail (@gmail.com) accounts

    Note: If you're migrating data from Gmail and you don’t want to allow access for less-secure apps, we recommend using the data migration service instead. For details, go to Set up and migrate from Gmail.

To allow access for less-secure apps:

  1. In the Google Admin console, follow the steps in Manage access to less secure apps.
  2. Instruct your users to not turn off access to less-secure apps until the migration process is complete. 

Use App Passwords to access accounts

You need to use App Passwords to access accounts if you turned on 2-Step Verification for your source account.

To use App Passwords:

  1. Tell your users to follow the steps to generate an App Password in Sign in with App Passwords.
  2. When you create the CSV file of users (in step 3, below on this page), add each user's App Password. For details about how to format the CSV file, go to Migrating from other IMAP servers.

    Example: jensmith@solarmora.com#App-Password, jensmith@solarmora.com

Step 3: Create a CSV file of users

Create a control CSV file of the user accounts that you're migrating to make sure your source data correctly maps to your new user accounts. For details, go to Create CSV files for your migration.

Step 4: Authorize GWMME

Before you can install GWMME, you must Authorize GWMME for your account.

Step 5: Download & install GWMME

  1. Go to the GWMME download page.
  2. Click Download GWMME.
  3. Open the installer and follow the instructions to install GWMME.

Step 6: Configure GWMME

You can migrate data by running GWMME: 

  • On a Microsoft Windows computer, using the GWMME interface—Follow the instructions below, in this section. 
  • From the command line (better suited to experienced administrators)—Go to Migrate data using the command line.

Expand section  |  Collapse all & go to top

1. Enter IMAP server details
  1. Click Startand thenGoogle Workspace Migrationand thenGoogle Workspace Migration for Microsoft Exchange.
  2. For Server Type, choose an option: 
    • IMAP–Proceed to step 3.
    • Gmail–Proceed to step 8.
  3. For IMAP Server type, select your source server type.
  4. For Hostname/IP Address, enter your source domain name or the IP address of your source email server.
    Example: imap.example.com or
  5. For IMAP Security, choose an option:
    • None–No encryption
    • SSL–SSL/TLS encryption
    • STARTTLS–TLS encryption using the STARTTLS command
  6. For IMAP Port, enter the connection port on the IMAP service. 
  7. If you're using SSL, enter 993.

  8. For IMAP Path Prefix, if you're migrating from a Cyrus or Courier IMAP server, enter INBOX. Otherwise, leave it blank.
  9. Click Next.
2. Enter user & domain information
  1. For Google Workspace domain name, enter the new primary Google Workspace target domain where the data will be migrated.

    Note: If you're migrating mail to a Google Workspace account with secondary domains, the target domain you enter might differ from the domain in the email addresses you’re migrating.

  2. For Service account credentials file, enter the path to the JSON file created as part of the authorization process.
  3. For Google Workspace admin user, enter the full email address of your Google Workspace super administrator account.
  4. Click Next.
3. Review migration settings
  1. Check the Email messages box and set the date range for the migration.
  2. For File of folders to migrate, click More "", navigate to the mapping file created above, and then click Open.
  3. Click Next.
  4. Review the migration settings and check the box next to each optional setting that you want to use:
    • Migrate all data—Overwrites existing data during migration (duplicate messages skipped when unchecked)
    • Save settings—Retains the current configuration for future use
    • Run Diagnostics—Verifies the configuration before running the migration
    • Estimate—Estimates the message count for the source users
    • Migrate—Performs the migration
  5. Click Nextand thenStart.

Related topics

Google, Google Workspace, and related marks and logos are trademarks of Google LLC. All other company and product names are trademarks of the companies with which they are associated.

Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue

Clear search
Close search
Google apps
Main menu
Search Help Center