Export (0) Print
Expand All
6 out of 11 rated this helpful - Rate this topic

Migrate Email from an IMAP Server to Exchange Online Mailboxes

Exchange Online
 

Applies to: Exchange Online

Topic Last Modified: 2013-04-30

Use the Migration page (also called the migration dashboard) in the Exchange Administration Center (EAC) or use the Exchange Management Shell to migrate the contents of user mailboxes from an IMAP messaging system to Exchange Online mailboxes. Only mailbox items are migrated from the IMAP messaging system to Exchange Online. Exchange Online mailboxes must already exist to use an IMAP migration. They aren’t provisioned during the migration process.

Here's what happens when you migrate mailbox data to Exchange Online using an IMAP migration. The mailboxes that are migrated are listed in a CSV file that you submit when creating an IMAP migration batch.

  • Mailbox items in the mailboxes in the IMAP messaging system are copied to the corresponding mailboxes in Exchange Online. This process is called initial synchronization.
  • After initial synchronization, the mailboxes in the IMAP messaging system and Exchange Online mailboxes are synchronized every 24 hours, so that new email messages sent to the IMAP mailboxes are copied to the corresponding Exchange Online mailboxes. This process is called incremental synchronization and continues until you delete the IMAP migration batch.
  • Exchange Online sends an email message to the administrator when the IMAP migration batch has finished initial synchronization. This message lists the number of mailboxes that were successfully migrated and how many couldn’t be migrated. The message also includes links to migration statistics and error reports that contain more detailed information.

When you're ready, you can route email directly to the Exchange Online mailboxes and delete the migration batch.

  • Estimated time to complete this task: 2-5 minutes to create a migration batch. After the migration batch is started, the time it takes to migrate items to Exchange Online mailboxes will vary, based on factors such the size and number of items in each mailbox, the number of mailboxes in the migration batch, and your available network capacity. For information about factors that affect migration rate, see Migration Performance.
  • You need to be assigned permissions before you can perform this procedure or procedures. To see what permissions you need, see the "Mailbox Move and Migration Permissions" section in the Recipients Permissions topic.
  • The following restrictions apply to IMAP migrations:
    • Only items in a user's inbox or other mail folders can be migrated. You can’t migrate contacts, calendar items, or tasks.
    • A maximum of 500,000 items can be migrated from a user’s mailbox.
    • The maximum message size that can be migrated is 35 MB.
  • For information about keyboard shortcuts that may apply to the procedures in this topic, see Keyboard Shortcuts in the Exchange Admin Center.
tipTip:
Having problems? Ask for help in the Exchange forums. Visit the forums at: Exchange Server, Exchange Online, or Exchange Online Protection.

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

To prepare for an IMAP migration, you need to do the following:

  • Create an Exchange Online mailbox for each user that you will migrate.   Before you can migrate mailbox data from a user's mailbox on the IMAP server, the user has to have an Exchange Online mailbox. For more information, see Create User Mailboxes in Exchange Online.
  • Obtain the FQDN of the IMAP server.   You need to provide the FQDN (also called the full computer name) of the IMAP server that you will migrate mailbox data from when you create an IMAP migration endpoint. 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 command in the Shell to test the connection settings to your IMAP server.
    Test-MigrationServerAvailability -IMAP -RemoteServer <FQDN of IMAP server> -Port <143 or 993> -Security <None, Ssl, or Tls>
    
    For the value of the Port parameter, it’s typical to use 143 for unencrypted or TLS connections and to use 993 for SSL connections.
  • Configure the firewall to allow IMAP connections.   You may have to open ports in the firewall of the organization that hosts the IMAP server so network traffic originating from the Microsoft datacenter during the migration is allowed to enter the organization that hosts the IMAP server. For a list of IP addresses used by Microsoft datacenters, see Exchange Online URLs and IP Address Ranges.
  • Determine if you don't want to migrate selected folders from the IMAP messaging system.   You may not want to migrate the contents of specific folders, such as Deleted Items and Junk Mail, and shared or public folders.
    importantImportant:
    If you're migrating email 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 Exchange Online mailbox of every user in the CSV file.
  • Assign the 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. The permissions required to access user mailboxes will be determined by the particular IMAP server. The following list shows the administrative privileges required to migrate Exchange mailbox data using an IMAP migration. There are three options.
    • The administrator account must be assigned the FullAccess permission for each user mailbox on the Exchange server.
      Or
    • The administrator account must be assigned the Receive As permission on the Exchange mailbox database that stores the user mailboxes.
      Or
    • The administrator account must be a member of the Domain Admins group in Active Directory in the on-premises Exchange organization.
    For more information about assigning Exchange permissions, see Assign Permissions to Migrate Mailboxes to Exchange Online.

Return to top

Identify the group of users whose mailboxes you want to migrate in an IMAP migration batch. Each row in the CSV file contains information necessary to connect to a mailbox in the IMAP messaging system.

Here are the required attributes for each user:

  • EmailAddress specifies the user ID for the user's Exchange Online mailbox.
  • UserName specifies the logon name for the account to use to access the mailbox on the IMAP server.
  • Password specifies the password for the account in the UserName column.

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
paulc@contoso.edu,paul.cannon,3281986

For the UserName attribute, in addition to the user name, you can use the credentials of an account that has been assigned the necessary permissions to access mailboxes on the IMAP server. For more information, see CSV Files for IMAP Migration Batches.

tipTip:
A CSV file for an IMAP migration can have maximum of 50,000 rows. If you have to migrate email data for thousands of mailboxes, it's a good idea to migrate users in several smaller batches. For example, if you have 5,000 accounts to migrate, you could run five batches with 1,000 users each, or you could divide the batches alphabetically, by user type, by department, or in other ways that meet your organization's needs. If the same user appears in two different CSV files, Exchange Online will generate a validation error for the migration batch that contains the user that was already migrated.

Return to top

A migration endpoint is a management object in Exchange Online that contains the connection settings for the source IMAP server. When you create a migration batch, the information in the migration endpoint is used to connect to the IMAP server. The migration endpoint also defines the number of mailboxes to migrate simultaneously and the number of mailboxes to synchronize simultaneously during incremental synchronization, which occurs once every 24 hours.

For more information about creating an IMAP migration endpoint, see Create Migration Endpoints.

tipTip:
Although you can create the first IMAP migration endpoint when you create the first migration batch, we recommend that you create migration endpoints before you create a migration batch. When you create a migration endpoint, Exchange Online tests the connection to the IMAP server. The migration endpoint isn't created unless Exchange Online can successfully connect to your IMAP server. This lets you troubleshoot and resolve connectivity issues before you create a migration batch. Otherwise, you have to cancel the migration batch and resolve any connectivity issues before you can create a migration batch.

Return to top

As previously stated, you can create multiple migration batches to migrate email data to Exchange Online mailboxes. You'll need to create and submit a CSV file for each new migration batch. If you want to exclude folders from migration, you have to use the Shell to create the migration batch and include the ExcludeFolders parameter. For an example of the command syntax to use to exclude folders, see the first example in Use the Shell to create an IMAP migration batch.

The following procedure will vary based on whether you or another administrator in your Exchange Online organization have created any IMAP migration endpoints. We recommend that you create an IMAP migration endpoint before you create a migration batch for an IMAP migration.

  1. In the EAC, navigate to Recipients > Migration.
  2. Click New Add Icon and then click Migrate to Exchange Online.
  3. On the Select a migration type page, click IMAP migration, and then click Next.
  4. On the Select the users page, click Browse to specify the CSV file to use for this migration batch.
    After you select a CSV file, Exchange Online checks the CSV file to ensure the following:
    • It isn't empty.
    • It uses comma-separated formatting.
    • It doesn't contain more than 50,000 rows.
    • It includes the required attributes in the header row.
    • 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 to create a migration batch. After the CSV file is validated, the number of users listed in the CSV file is displayed as the number of mailboxes to migrate data for.
  5. Click Next.
  6. Depending on whether any IMAP migration endpoints have been created in your Exchange Online organization, do one of the following:
    • No migration endpoints have been created: On the IMAP migration configuration page, configure the following settings:
      • * IMAP server   Type the FQDN (also called the full computer name) of the IMAP server for the IMAP messaging system. This is required.
      • 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, SSL (the default), or TLS.
      • * Port   Type the TCP port number used to connect to the IMAP server. Use port 143 for unencrypted connections, port 143 for TLS connections, or port 993 (the default), for SSL connections. This is required.
      Click Next. The migration service will use the settings to test the connection to the IMAP server. If the test connection to the IMAP server is successful, the IMAP connection settings are displayed on the Confirm the migration endpoint page. Verify the settings and then click Next.
    • One migration endpoint has been created: The connection settings from the IMAP migration endpoint are displayed on the IMAP migration configuration page. Verify the connection settings, and then click Next.
    • Two or more migration endpoints have been created: Under Select a migration endpoint, select a migration endpoint from the menu and then click Next. The migration service displays the connection settings from the selected IMAP migration endpoint on a read-only page. Verify the connection settings, and then click Next.
  7. On the Move configuration page, type the name of the migration batch in the box, and then click Next. The default migration batch name that’s displayed is the name of the CSV file that you specified. The migration batch name will be displayed in the list on the migration dashboard after you create the migration batch. Batch names can’t contain spaces or special characters.
  8. On the Start the batch page, do the following:
    • Click Browse to send a copy of the migration reports to other users. By default, migration reports are sent to the administrator who creates the migration batch. You can also access the migration reports from the properties page of the migration batch.
    • Select one of the following options to start the migration batch after it's created:
      • Automatically start the batch   The migration batch is started as soon as you save the new migration batch. The batch is first marked with a status of Created. The status is changed to Syncing after the batch has been started.
      • Manually start the batch later   The migration batch is created but it's not started. The status of the batch is set to Created. To start a migration batch, select it on the migration dashboard and then click Start Start Icon.
  9. Click New to create the migration batch.
    The new IMAP migration batch is displayed on the migration dashboard.

You can use the New-MigrationBatch cmdlet to create a migration batch for an IMAP migration. Before you can use the Shell to create a migration batch, you have to create a CSV file and an IMAP migration endpoint. You can create a migration batch and start it automatically by including the AutoStart parameter. Alternatively, you can create the migration batch and then start it afterwards by using the Start-MigrationBatch cmdlet.

This example creates and starts an IMAP migration batch. The example uses the New-MigrationEndpoint cmdlet to create an IMAP migration endpoint, and then uses the endpoint and the CSV file IMAPmigration_1.csv to create the migration batch. The migration batch is automatically started with the AutoStart parameter.

$IMAPMigrationEndPoint = New-MigrationEndpoint -IMAP -Name IMAPEndpoint -RemoteServer imap.contoso.com -Port 993 -Security Ssl
New-MigrationBatch -Name IMAPBatch1 -SourceEndpoint $IMAPMigrationEndPoint.Identity -CSVData ([System.IO.File]::ReadAllBytes("C:\Users\Administrator\Desktop\IMAPmigration_1.csv")) -AutoStart

noteNote:
By default, when you create an IMAP migration endpoint, it will support 20 maximum concurrent migrations and a maximum of 10 concurrent incremental synchronizations.

This example creates a migration batch and uses the migration endpoint that was created in the previous example. The migration excludes the contents of the Deleted Items and Junk Email folders. Because the AutoStart parameter isn't included, the migration batch has to be manually started on the migration dashboard or by using the Start-MigrationBatch cmdlet.

New-MigrationBatch -Name IMAPBatch2 -SourceEndpoint IMAPEndpoint -CSVData ([System.IO.File]::ReadAllBytes("C:\Users\Administrator\Desktop\IMAPBatch2.csv")) -ExcludeFolders "Deleted Items","Junk Email"

To verify that you've successfully created an IMAP migration batch, do one of the following:

  • In the EAC, navigate to Recipients > Migration. Verify that the batch is displayed in the migration dashboard. If the migration batch was automatically started, the value displayed under Status is Syncing. If you configured the batch to be manually started, the value is Created.
  • In the Shell, run the following command to display information about all current migration batches.
    Get-MigrationBatch
    
    To display detailed information about a specific migration batch, run the following command.
    Get-MigrationBatch -Identity <identity> | fl
    

Return to top

If you create an IMAP migration batch and configure it to be started manually, you can start it by using the EAC or the Shell.

importantImportant:
Migration batches with a status of Synced that have no administrator-initiated activity (for example, no administrator has stopped and restarted a migration batch or edited a migration batch) for the last 90 days will be stopped, and then deleted 30 days later if no further action is taken by the administrator.
  1. In the EAC, navigate to Recipients > Migration.
  2. On the migration dashboard, select the batch, and then click Start Start Icon.

Run the following Shell command to start a migration batch.

Start-MigrationBatch -Identity <identity>

If a migration batch is successfully started, its status on the migration dashboard is specified as Syncing. To verify that you've successfully started a migration batch, do one of the following:

  • In the EAC, navigate to Recipients > Migration. Verify that the migration batch was started.
  • In the Shell, run the following command to verify that the migration batch was started.
    Get-MigrationBatch -Identity <identity> | fl Status
    

Return to top

Until you change your MX record, email sent to users is still routed to their mailboxes in the IMAP messaging system. After a mailbox is successfully migrated, the mailbox on the IMAP server and the Exchange Online mailbox are synchronized once every 24 hours, in a process called incremental synchronization, until you stop or delete a migration batch. This lets users use their Exchange Online mailbox to access email sent to their IMAP mailbox. When you configure your organization's MX record to point to your Office 365 email organization, all email is sent directly to the Exchange Online mailboxes. For information about configuring MX records, see Create DNS records for Office 365.

After you change the MX record and verify that all email is being routed to Exchange Online mailboxes, you can delete the IMAP migration batches.

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 directly to Exchange Online mailboxes.

Return to top

After you change the MX record and verify that all email is being routed to Exchange Online mailboxes, you're ready to delete the migration batch. Verify the following before you delete the migration batch:

  • That mail is being sent directly to the Exchange Online mailboxes after you change your MX record to point to your Office 365 email organization.
  • That all users are using their Exchange Online mailboxes. After the batch is deleted, mail sent to mailboxes on the IMAP servers will not be copied to the corresponding Exchange Online mailbox.
  • That Exchange Online mailboxes have been synchronized at least once after mail began being sent directly to them. 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 Exchange Online mailboxes. This will help ensure that the most recent mail was migrated to Exchange Online mailboxes before mail was sent directly. After you delete the migration batch, on-premises and Exchange Online mailboxes will no longer be synchronized.

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 on the migration dashboard.

importantImportant:
Migration batches with a status of Synced that have no administrator-initiated activity (for example, stopping and restarting a migration batch or editing a migration batch) for the last 90 days will be stopped, and then deleted 30 days later if no further activity is taken by the administrator.
  1. In the EAC, navigate to Recipients > Migration.
  2. On the migration dashboard, select the batch, and then click Delete Delete Icon.

Run the following Shell command to delete a migration batch.

Remove-MigrationBatch -Identity <identity>
  • In the EAC, navigate to Recipients > Migration. Verify that the migration batch is no longer listed on the migration dashboard.
    Or
  • Run the following command to verify that the migration batch has been deleted.
    Get-MigrationBatch <identity>
    
    The command will either return the migration batch with a status of Removing or it will return an error stating that migration batch couldn’t be found, verifying that the batch was deleted.

Return to top

Here are some tips for optimizing an IMAP migration:

  • Increase the connection limits to your IMAP server.   Many firewalls and email 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 an administrator account 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 email 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 email. 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 3,600 seconds (one hour). Then, when you change the MX record to point to your Office 365 email 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 migration endpoint used to connect to the IMAP server.
    • Verify that you can successfully migrate email using administrator credentials, if applicable.
    • Determine the optimal number of simultaneous connections to the IMAP server that minimize the impact on your Internet bandwidth.
    • Verify that folders you exclude aren't migrated to Exchange Online 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.
  • Use administrator credentials in the CSV file to migrate email.   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’re migrating.
    noteNote:
    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 email sent to their mailbox on the IMAP server won’t be migrated to their Exchange Online 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 and delete the migration batch before you delete or change the SMTP address of an Exchange Online or on-premises mailbox that's been migrated.
  • Communicate with your users.   Let users know ahead of time that you’ll be migrating the content of their on-premises mailboxes to your Office 365 organization. Consider the following:
    • Tell users that email 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 email messages from their on-premises mailboxes 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 back up their Inboxes.
    • Tell users which folders won't be migrated, if applicable.
    • 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 ( - ).

Return to top

 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.