Migrate E-Mail from an IMAP Server to Cloud-based Mailboxes

 

Applies to: Office 365 for professionals and small businesses, Office 365 for enterprises, Live@edu

Topic Last Modified: 2013-04-26

Use the E-mail Migration dashboard in the Exchange Control Panel to migrate the contents of user mailboxes from an IMAP messaging system to your cloud-based e-mail organization.

To start an IMAP migration, select Manage My Organization > Users & Groups > E-Mail Migration > New. On the E-mail Migration dashboard, select IMAP and click Next.

importantImportant:
For an IMAP migration, you can only migrate a user’s inbox or other mail folders. You can’t migrate contacts or calendar items. Additionally, a maximum of 500,000 items can be migrated from a user’s mailbox.
Before you begin

Before you migrate mail from an IMAP server, be sure to plan your e-mail migration carefully, especially if you're migrating lots of users. When you plan, make sure to check out Best practices.

To prepare for the migration:

  • Create a cloud-based mailbox for each user that you will migrate   Before you can migrate data from a user's mailbox on the IMAP server, the user has to have a cloud-based mailbox and user ID. Here's how to create new mailboxes and user ID for each user:

  • Obtain the FQDN for your IMAP server   You need to provide the FQDN of the IMAP server that you will migrate mailbox data from, for example, imap.contoso.edu.

    Tip   Use an IMAP client or the PING command to verify that you can use the FQDN to communicate with the IMAP server over the Internet.

  • Verify that you can connect to your IMAP server   Run the following Windows PowerShell command to test the connection settings to your IMAP server.

    Test-MigrationServerAvailability -IMAP -RemoteServer <IMAP server FQDN> -Port <143 or 993>
    

    Note   For the value of the Port parameter, use 143 for unencrypted connections or use 993 for SSL connections.

  • Configure your on-premises firewall to allow IMAP connections   You may have to open ports in your on-premises firewall so network traffic originating from the Microsoft datacenter during the migration is allowed to enter your on-premises organization. For a list of IP addresses used by Microsoft datacenters, see Exchange Online URLs and IP Address Ranges.

  • Decide which folders you don't want to migrate from the IMAP messaging system   For example, you may not want to migrate the contents of the Deleted Items and Junk Mail, and shared or public folders.

    Important   If you're migrating e-mail from an on-premises Microsoft Exchange server, we recommend that you exclude public folders from the migration. If you don't exclude public folders, the contents of the public folders are copied to the cloud-based mailbox of every user.

  • Prepare the CSV file   Identify the group of users whose mailboxes you want to migrate. Include these users in the CSV file that will make up the migration batch. If you have to migrate thousands of mailboxes, it's a good idea is to migrate users in several smaller batches. For example, if you have 10,000 accounts to migrate, you could run four batches with 2,500 users each, or you could divide the batches alphabetically, by user type, such as faculty, students, and alumni, by class, such as freshman, sophomore, junior, and senior, or in other ways that will help you keep track of the users you've migrated.

    Here are the required attributes for each user:

    • EmailAddress specifies the user ID for the user's cloud-based mailbox.

    • UserName specifies the user logon name for the user's mailbox on the IMAP server.

    • Password is the password for the user's account in the IMAP messaging system.

    Here's an example of the format for the CSV file. In this example, three mailboxes are migrated.

    EmailAddress,UserName,Password
    terrya@contoso.edu,terry.adams,1091990
    annb@contoso.edu,ann.beebe,2111991
    chrisc@contoso.edu,chris.cannon,3281986
    

    For the UserName attribute, in addition to the user name, you can use the credentials of a super-user account or administrator account that has the rights to access all mailboxes on the IMAP server. For more information, see Prepare a CSV File to Migrate E-mail from an IMAP Server.

    Tip   Use the CSV file that you used to import new users as the starting point for CSV migration file. For example, if you import 2,000 new users to your organization in the cloud, create a CSV file to migrate mail for those same 2,000 users.

  • Assign the super-user or administrator account permissions to access mailboxes in your Exchange organization   If you use administrator credentials in the CSV file, the account that you use must have the necessary permissions to access the on-premises mailboxes. You can assign the Full Access permission for individual mailboxes or assign the Receive As permission for a mailbox database. For more information, see the following:

     

    Exchange 2010

    Allow Mailbox Access

    Exchange 2007

    Exchange 2003

Return to top

Create and start migration batches

Step 1: Configure your server settings for e-mail migrations

  1. Select Manage My Organization > Users & Groups > E-Mail Migration > New.

  2. On the Welcome to E-mail Migration page, select IMAP and click Next.

  3. Configure the server settings.

     

    In this field… Do this…

    * IMAP server

    Type the FQDN of the IMAP server for the IMAP messaging system.

    Authentication

    Select the authentication method used by the IMAP server. Options are Basic, the default, or NTLM. Use NTLM if it's required by your IMAP server.

    Encryption

    Select the encryption method used by the IMAP server. Options are None, TLS, or SSL, the default.

    * Port

    Select the TCP port number used to connect to the IMAP server. Use port 143 for unencrypted connections, port 143 for TLS connections, and port 993 for SSL connections.

    Number of mailboxes to migrate simultaneously

    Specify the number of connections to the IMAP server available to migrate e-mail to cloud-based mailboxes. If the value is set to 3, the default value, you can migrate up to three mailboxes at the same time until all the mailboxes in the migration batch have been migrated. The maximum number of connections is 10. To learn more about how to optimize this setting, see Maximum Number of Connections to Your Mail Server.

    Note   The server settings you configure will persist on this page the next time you run E-Mail Migration to migrate a new batch of mailboxes.

  4. Click Next. Microsoft Exchange tries to communicate with the IMAP server to verify the server's FQDN and the port used to receive the IMAP requests. If the test connection to the IMAP server is successful, the Specify what and how to migrate (Step 2 of 3) page is displayed. If the test connection isn't successful, you'll get an error. Verify the configuration settings and try to connect again. You have to connect to the IMAP server to continue.

    If you can’t connect to the IMAP server, see this video for troubleshooting tips.

Return to top

Step 2: Upload the CSV file and exclude specific folders from e-mail migration

  1. Click Browse to select the CSV file for the IMAP migration batch.

  2. In the Batch name field, type a name that identifies the migration batch. This name is displayed on the E-Mail Migration page. Batch names can’t contain spaces or special characters.

  3. Click Add folders to exclude if you don’t want to migrate the contents of certain folders in users' mailboxes, such as Deleted Items or Junk E-Mail, or if you want to exclude shared and public folders.

  4. Type the name of the folder and click Add Add. Be sure to type the folder name exactly as it appears, for example, Deleted Items or Junk E-Mail.

  5. You can add more than one folder to the list. When you are finished adding folders, click OK.

    Important   If you're migrating e-mail from an on-premises Microsoft Exchange server, we recommend that you exclude public folders from the migration. If you don't exclude public folders, the contents of the public folders are copied to the cloud-based mailbox of every user.

    Also, folders with a forward slash ( / ) in the name aren't migrated. If users want to migrate folders that contain forward slashes in their names, they have to rename the folders or replace the forward slashes with a different character, such as an underscore character ( _ ) or a dash ( - ).

  6. To send copies of the migration reports to other users, click Browse at the bottom of the page.

  7. Click Next.

    Microsoft Exchange checks the CSV file for the following:

    • It isn't empty.

    • It uses comma-separated formatting.

    • It doesn't contain more than 50,000 rows.

    • It isn't larger than 10 MB.

    • It includes the required attributes in the header row:

      • EmailAddress, which specifies the user ID for the user's cloud-based account

      • UserName, which specifies the user logon name for the user's mailbox in the IMAP messaging system

      • Password, which specifies the password for the user's account in the IMAP messaging system

    • It contains rows with the same number of columns as the header row.

    If any one of these checks fails, you'll get an error that describes the reason for the failure. At this point, you have to fix the CSV file and resubmit it. For more information, see Prepare a CSV File to Migrate E-mail from an IMAP Server.

    If the CSV file successfully passes these checks, you'll move on to the Migration batch <batch name> created successfully (Step 3 of 3) page.

  8. Review the information about the migration batch, and then click Close.

Step 3: Start the migration batch

After you create a migration batch, it’s displayed in the list on the E-mail Migration page. Details about the selected migration batch are displayed in the details pane. The status of the migration batch is set to Created.

To start processing a migration batch, select it and then click Start.

Return to top

What happens after you start a migration batch?

After you start the migration batch, the status displayed in the details pane is changed to Queued or Running. Mailboxes are migrated in the same sequence as they’re listed in the CSV file.

The following table describes the information displayed in the details pane for the selected migration batch.

 

Field Description

Status

The current state of the selected migration batch. Includes the following states:

  • Created   Indicates that the migration batch is created. In this state, you can start, edit, delete, or change its position in the migration queue using move up or move down.

  • Queued   Indicates that the migration batch has been started. If the migration batch is at the top of the queue, it will start to run. If there are migration batches above it in the migration queue, the migration batch will remain in a queued state. It will start running after all migration batches above it are completed. In this state, you can stop the migration batch or change its position in the migration queue using move up or move down.

  • Running   Indicates that mailboxes in the migration batch are being actively migrated. In this state, you can stop the migration batch.

  • Stopped   Indicates that the migration batch is stopped, and no more mailboxes from the batch are being migrated. In this state, you can re-start the migration batch.

  • Synced   Indicates that migration batch is completed, and no mailboxes are being migrated. A migration batch in this state may contain errors when mailboxes weren’t migrated.

Requested

The number of mailboxes to be migrated in the migration batch. This number corresponds to the number of rows in the migration CSV file.

Synced

The number of mailboxes from the current migration batch that have been created in your cloud-based organization. This field is updated during the migration.

Active

Specifies the number of mailboxes being actively migrated. This number corresponds to the number of mailboxes to migrate simultaneously that you specified when configuring the connection settings.

Errors

The number of mailboxes that failed migration.

Creation Time

Date and time when the migration batch was created.

Start Time

Date and time when the migration batch was started.

Initial Sync Time

Date and time when the migration batch was completed.

Initial Sync Duration

The amount of time it took to complete the migration batch.

Last Synced Time

The last time the migration batch was re-started or the last time that incremental synchronization was performed for the batch.

Per-User Details

Click Open to display status information about each mailbox in the migration batch. For more information, see E-Mail Migration Users Status Report.

Reports

This section of the details pane contains links to the migration success and error reports. Links to these reports are sent to the administrator after the migration is complete.

Click Success or Errors to download the following reports:

  • MigrationStatistics   A CSV file that contains a row for each mailbox that was successfully migrated. Each row contains the e-mail address of the mailbox, the status of the migration, the number of mailbox items migrated and the number of mailbox items that were skipped and not migrated.

  • MigrationErrors   A CSV file that contains a row for each mailbox that wasn't migrated or configured for mail forwarding. Each row contains e-mail address of the mailbox and a description of the error.

Return to top

Monitor the migration batch

Use the E-mail Migration dashboard and the per-user migration statistics to monitor the status of the migration batch. For more information, see the following:

Stop a migration batch

If you’ve started a migration batch, and it has a status of Queued or Running, you can stop it. To stop a migration batch, select it and then click Pause. When you stop a migration batch that was queued, it won’t start after the previous migration batch is finished running.

When you stop a migration batch that’s running, any mailbox currently being processed is stopped immediately and isn't completed. Stopping a migration batch won't affect mailboxes that have been migrated.

After you stop a migration batch that was running, you receive a status e-mail message that says how many mailboxes were successfully migrated before the batch was stopped and how many mailboxes weren’t migrated. This message also contains links to the statistics report, which lists the mailboxes that were successfully migrated, and to the error report, which lists the mailboxes that weren’t migrated.

Restart a migration batch

You can restart a migration that was stopped or a migration batch that has finished running but has errors that result in mailboxes not being migrated.

To restart a migration batch, select it and then click Resume.

Create and start additional migration batches

If there are errors in a migration batch, or you want to migrate the contents of other on-premises mailboxes to the cloud, you can create and start a new migration batch. To create a new migration batch, you have to submit a new CSV file that contains the information about the mailboxes you want to migrate. You can create and start a maximum of five migration batches. If a migration batch is currently running when you start another migration batch, the status for the newly started batch is set to Queued. You don't have to enter connection settings when you create a new migration batch because they persist from the previous batch.

Configure your MX record to point to your cloud-based e-mail organization

Until you change your MX record, e-mail sent to users is still routed to their mailboxes in the IMAP messaging system. When a user mailbox is successfully migrated, the mailbox on the IMAP server and cloud-based mailbox are synchronized once every 24 hours until you stop or delete a migration batch. This lets users use their cloud-based account to access e-mail sent to their IMAP mailbox. When you configure your organization's MX record to point to your cloud-based e-mail organization, all e-mail is sent directly to the cloud-based mailboxes.

Important   It can take from 24 to 72 hours for the updated MX record to be propagated. Wait at least 24 hours after you change the MX record and then verify that mail is being routed to cloud-based mailboxes.

After you change the MX record and verify that all e-mail is being routed to cloud-based mailboxes, you can delete migration batches.

Delete a migration batch

After the mailbox items in mailboxes for an IMAP migration batch have been successfully migrated, verify the following before you delete the migration batch:

  • That mail is being sent directly to the cloud-based mailboxes after you change your MX record to point to your cloud-based e-mail organization.

  • That cloud mailboxes were synchronized at least once after mail began being sent directly to cloud mailboxes. To do this, make sure that the value in the Last Synced Time field for the migration batch is more recent than the date and time when mail started being routed directly to cloud mailboxes. This will help ensure that the most recent mail was copied to the cloud mailboxes before mail was sent directly. After you delete the migration batch, on-premises and cloud mailboxes will no longer be synchronized.

To delete a migration batch, select it and then click Delete Delete. When you delete an IMAP migration batch, the migration service cleans up any records related to the migration batch and deletes the migration batch. The batch is removed from the list of migration batches.

importantImportant:
Don’t assign a retention policy that contains an archiving retention tag to a user’s cloud mailbox until after you’ve deleted the migration batch that contains that mailbox. If an item in the user’s cloud mailbox has been moved to the user’s archive mailbox because the item’s retention age limit has expired, the same item from the on-premises mailbox will be copied back into the user’s cloud mailbox after the next incremental synchronization on the mailbox. To avoid this, delete migration batches before assigning a retention policy to cloud mailboxes.

Return to top

Best practices

Here are some tips to optimize your IMAP migration:

  • Increase the connection limits to your IMAP server   Many firewalls and e-mail servers have per-user limits, per-IP address limits, and overall connection limits. Before you migrate mailboxes, make sure that your firewall and IMAP server are configured to allow a large, or maximum, number of connections for the following settings:

    • The total number of connections to the IMAP server

    • The number of connections by a particular user. This is important if you use administrator credentials in the CSV migration file because all connections to the IMAP server are made by this user account.

    • The number of connections from a single IP address. This limit is typically enforced by the firewall or the e-mail server.

    If your IMAP server is running Microsoft Exchange Server 2010 or Exchange 2007, the default settings for connection limits are low. Be sure to increase these limits before you migrate e-mail. By default, Exchange 2003 doesn't limit the number of connections.

    For more information, see:

  • Change the DNS Time-to-Live (TTL) setting on your MX record   Before you start migrating mailboxes, change the DNS TTL setting on your current MX record to a shorter interval, such as 3600 seconds (one hour). Then, when you change MX record to point to your cloud-based e-mail organization after all mailboxes are migrated, the updated MX record should propagate more quickly because of the shortened TTL interval.

  • Run one or more test migration batches   Run a few small IMAP migration batches before you migrate larger numbers of users. In a test migration, you can do the following:

    • Verify the format of the CSV file.

    • Test the settings used to connect to the IMAP server

    • Verify you can successfully migrate e-mail using super-user credentials, if applicable.

    • Determine the optimal number of simultaneous connections to the IMAP server that minimize the impact on your Internet bandwidth. For more information, see Maximum Number of Connections to Your Mail Server.

    • Verify that folders you exclude aren't migrated to the cloud-based mailboxes.

    • Determine how long it takes to migrate a batch of users.

    Use CSV files with the same number of rows and run the batches at similar times during the day. Then compare the total running time for each test batch. This will help you estimate how long it will take to migrate all your mailboxes, how large each migration batch should be, and how many simultaneous connections to the IMAP server you should use to balance migration speed and Internet bandwidth.

  • Create mailboxes and migrate e-mail for the same batch of users   Use the CSV file that you used to import new users as the starting point for the CSV file. For example, if you import 2,000 new users to your cloud-based e-mail organization, create a CSV file to migrate mail for those same 2,000 users. This is an effective way to organize and manage your migration from an on-premises messaging system to your cloud-based organization.

  • Use super-user or administrator credentials in the CSV file to migrate e-mail   This method is the least disruptive and inconvenient for users, and it will help minimize synchronization errors caused when users change the password on their on-premises account. It also saves you from having to obtain or change user passwords. If you use this method, be sure to verify that the administrator account you use has the necessary permissions to access the mailboxes you are migrating.

    Tip   If you decide to use user credentials in the CSV file, consider globally changing users' passwords and then preventing users from changing their password on their on-premises account before you migrate their mailboxes. If users change their password before their mailbox is migrated to the cloud-based mailbox, the migration will fail. If they change their password after the mailbox is migrated, new e-mail sent to their mailbox on the IMAP server will not be migrated to their cloud-based mailbox.

  • Don't delete mailboxes or change their SMTP addresses during migration   The migration system will report an error when it can't find a mailbox that's been migrated. Be sure to complete the migration before you delete or change the SMTP address of a cloud-based or on-premises mailbox that's been migrated.

  • Communicate with your users   Give users a heads-up that you are migrating the content of their on-premises mailboxes to your cloud-based organization. Consider the following:

    • Tell users that e-mail messages larger than 35 MB won't be migrated. Ask users to save very large messages and attachments to their local computer or to a removable USB drive.

    • Ask users to delete old or unnecessary e-mail messages from the on-premises mailbox before migration. This helps reduce the amount of data that has to be migrated and can help reduce the overall migration time. Or you can clean up their mailboxes yourself.

    • Suggest that users to back up their Inbox.

    • Tell users which folders won't be migrated.

    • Folders with a forward slash ( / ) in the folder name aren't migrated. If users want to migrate folders that contain forward slashes in their names, they have to rename the folders or replace the forward slashes with a different character, such as an underscore character ( _ ) or a dash ( - ).

    • Tell users when they can use their cloud-based account to access the e-mail that was migrated from their on-premises account. Don't give users access to their cloud-based accounts until you're ready to complete the migration.

      Need a good way to provide users with information about their new cloud-based accounts? See Send a Welcome Message to New Users.

Return to top

 
Related help topics
Loading...
No resources were found.