Search

Migrate Email 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: 2011-12-02

Use Email Migration in the Exchange Control Panel to migrate the contents of user mailboxes from an IMAP messaging system to your cloud-based email organisation.

To start an IMAP migration, select Manage My Organisation > Users & Groups > Email Migration > New. On the Welcome to Email Migration page, select IMAP and click Next.

Important   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 email migration carefully, especially if you're migrating lots of users. When you plan, make sure you take a look at 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 a new mailbox 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.
  • 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 datacentre during the migration is allowed to enter your on-premises organisation. For a list of IP addresses used by Microsoft datacentres, 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 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 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 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 first year, second year and final year, 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 Email from an IMAP Server.
    Tip   Use the CSV file that you used to import new users as the starting point for the CSV migration file. For example, if you import 2,000 new users to your organisation 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 organisation   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

Run a migration batch

Step 1: Configure your server settings for email migrations

  1. Select Manage My Organisation > Users & Groups > Email Migration > New.
  2. On the Welcome to Email 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 email 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 optimise 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 Email 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 Exclude specific folders from email migration 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: Exclude specific folders from email migration

You may not want to migrate the contents of certain folders in users' mailboxes, such as Deleted Items or Junk Email. You can also exclude shared and public folders. Here's how:

  1. Click Add folders to exclude. 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.
  2. You can add more than one folder to the list. When you are finished adding folders, click OK.
  3. Click Next.

Important   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 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 slash with a different character, such as an underscore character ( _ ) or a dash ( - ).

Step 3: Upload a batch of mailboxes to migrate

  1. Click Browse to select the CSV file for the migration batch.
  2. After you select the CSV file, 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 Windows Live 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 Email from an IMAP Server.
    If the CSV file successfully passes these checks, you'll move on to the Start the migration page.

Return to top

Step 4: Start the migration

In addition to the checks described in step 3, Microsoft Exchange also checks for data validation errors in the CSV file. If data in any row of the CSV file doesn't meet the property definition for the corresponding attribute in the header, you'll get an error. The migration process isn't terminated if data validation errors are found, but email won't be migrated for the mailboxes that correspond to the rows that have data validation errors. If data validation errors are found, a warning and a link to the validation error report are displayed on the Start the migration page. For more information, see Troubleshoot Migration Validation Errors.

To start the migration:

  1. Decide if you want Microsoft Exchange to send a status email message to other users when the migration batch is done running. If so, click the Browse to select one or more users.
  2. Review the migration settings.
    • To start processing the migration batch, click Run.
    • To cancel the current migration batch and return to step 1, click Start Over.

Return to top

What happens after you start the migration batch?

After you start the migration, two panes are displayed on the Email Migration tab:

  • Active Email Migration   This pane contains the following information about the migration batch in progress:
    • The name of the CSV file used for the migration batch
    • The date and time when the migration batch was started, and the user who started the migration
    • The total number of migrations requested. This number corresponds to the number of rows in the CSV migration file.
    • The number of migration requests from the current migration batch that have been completed. This field is updated throughout the migration.
    • The number of active mailbox migrations. This number corresponds to the number of simultaneous connections that you specified in step 1 of setting up the migration.
    • A link to the Active Mailbox Migration Report, which shows detailed information about each mailbox that is being actively migrated. A compilation of this report, which contains similar information for all the mailboxes in the migration batch, is included in the status email sent to the administrator after the migration batch has finished.
    • The number of mailboxes that failed to be migrated
    • A link to the Error Report for Active Migrations that documents each migration error found during the processing of the current migration batch. For each error, the report includes a suggestion for fixing the error. Use this information to fix the error, and then submit a revised CSV file for a new migration batch. For more information, see Troubleshoot Active Migration Errors.
    Click Refresh Refresh periodically to refresh this pane during the processing of the current migration batch. When the migration batch is done, the Active Email Migration pane is no longer displayed.
  • Email Migration   This pane contains information about the overall migration, which consists of all the migration batches that you've run. It contains the following information:
    • The number of mailboxes from all migration batches that have been migrated and are actively being synchronised with the corresponding on-premises mailbox
    • The number of synchronisation errors that have occurred since the migration was started
    • A link to the Error Report for Synchronisation Failures, which identifies synchronisation failures that are preventing Microsoft Exchange from retrieving new email messages sent to a user's mailbox in the IMAP messaging system. For more information, see Troubleshoot Migration Synchronization Failures.

Return to top

Stop a migration batch

To stop a migration batch, in the Active Email Migration pane, click Stop.

You can only stop migration batches that have mailboxes in the process of being migrated or are waiting to be migrated. The migration of any mailbox currently being processed is stopped immediately and is not completed. Also, stopping a migration batch won't affect mailboxes that have been migrated already.

After you stop a migration batch, you receive a status email message that says how many mailboxes were successfully migrated before the batch was stopped. This message also has an attached MigrationErrors.csv file that identifies the rows that were in progress when the migration was stopped and the rows waiting to be migrated.

Start additional migration batches

After the current migration batch is complete, repeat steps 1 to 4 to run additional migration batches. Each migration batch uses its own CSV file.

Return to top

Complete the migration

After you've run all your IMAP migration batches for the mailboxes you plan to migrate, you're ready to complete the migration. Follow these steps:

  1. Configure your MX record to point to your cloud-based email organisation    Until you change your MX record, email 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 periodically synchronised until you complete the overall migration. This lets users use their cloud-based account to access email sent to their IMAP mailbox. When you configure your organisation's MX record to point to your cloud-based email organisation, all email is sent directly to the cloud-based mailboxes.
    After you change the MX record and verify that all email is being routed to cloud-based mailboxes, you're ready to complete the migration.
    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 before you complete the migration. Verify that mail is being routed to cloud-based mailboxes before you complete the migration.
  2. Complete the overall migration process   Click Complete Migration in the Email Migration pane. What happens when you click Complete Migration?
    • Microsoft Exchange runs a final synchronisation for all mailboxes. After this, email is no longer synchronised between mailboxes on the IMAP messaging system and cloud-based mailboxes.
    • Microsoft Exchange sends a final status email message after the migration is complete. If there are any errors during the final synchronisation process, a MigrationErrors.csv file that lists the errors is attached to this message.

Return to top

Best practices

Here are some tips to optimise your 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 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 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 your MX record to point to your cloud-based email organisation 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 email using super-user credentials, if applicable.
    • Determine the optimal number of simultaneous connections to the IMAP server that minimise 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 email for the same batch of users   Use the CSV file that you used to import new users as the starting point for the CSV migration file. For example, if you import 2,000 new users to your cloud-based email organisation, create a CSV file to migrate mail for those same 2,000 users. This is an effective way to organise and manage your migration from an on-premises messaging system to your cloud-based organisation.
  • Use super-user or administrator credentials in the CSV file to migrate email   This method is the least disruptive and inconvenient for users, and it will help minimise synchronisation 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 emails 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 organisation. 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 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 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 email 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.
Related forum or blog discussions
Loading...
No related forum or blog posts found.
Not finding what you're looking for?