Migrating from third-party providers to Office 365 – IMAP4 #2

December 7, 2012 by Peter O'Dowd in IT Infrastructure, Technical Documentation



Part 1: POP3 Example

Part 2: IMAP4 Example 1


IMAP4 Mailbox Migration Specifics – Example 2

This email provider, Contoso, supports the IMAP protocol. Using the IMAP protocol allows you to migrate all mailbox folders (not just the Inbox, as with POP3). Also, the provider allows the customer to configure their own address space and subsequently have MX records configured in DNS with their domain registrar to direct incoming email to the provider’s mail server. Also, with this provider it is possible to export the address book of email addresses and mailbox information, and there is a single account with full mailbox access to all mailboxes; consequently, the migration is more automated than in the previous example.

Capability Example 2 IMAP provider
Domain name suffix Customer-specific; for example, contoso.com or treyresearch.com
IMAP migration YES
Admin account with Full Access YES
Export org address book YES
Export Contacts YES
Export Calendar NO, but may be shared privately/publicly for access in Office 365

First, it is necessary to verify the domain name to Microsoft. Let’s assume that the name of the provider is contoso.com, and that our registered domain name is treyresearch.com. To verify the domain name, follow the steps in the previous section, Example 1: IMAP Provider.

Export .csv files of all mailboxes on Contoso

Now that you have verified your domain name with Office 365, the next step is to create a .csv file for creating users and mailboxes on Office 365. I’m going to use some screenshots from Rackspace to illustrate how you can achieve this.

  1. Click Export List (csv). This produces a .csv file, as shown in the following illustration.

  2. Save the .csv file locally.

    It is almost certain that the .csv file will not be in the correct format for importing into Office 365. In this example with Rackspace, I needed to add two extra columns and delete several more, as described below.

  3. Add two columns to the .csv file, with the headers Emailaddress and Password. Enter all users’ email addresses and passwords to be used on Office 365. (This will probably be the same email address they had on Contoso.)
  4. Delete the following columns.

Enabled Home: Street RegisteredAddress
MiddleInitial Home: City RoomNumber
AlternateEmail Home: State Website
LastLogin Home: Zip Organization
UsedStorage Home: Country OfficeNumber
MaxSize OrganizationUnit Address
DepartmentNumber Pager State
Description PersonalTitle Country
TertiaryEmail PhysicalDeliveryOfficeName User ID
EmployeeNumber PostalAddress OrganizationUnit
EmployeeType PostOfficeBox Organization

Import users into Office 365 using a .csv file

Office 365 provides the capability for importing users from a .csv file. For more information, see Import New Exchange Online Users with a CSV File.

  1. In Outlook Web Access, using the administrator account in Office 365, navigate to Manage My Organization, and then under Outlook, click Options and
    select See all Options.
  2. On the Options screen, click Manage Myself and then select My Organization.

  3. On the Mailboxes tab, click Import Users.

  4. On the Import Users screen, browse to the .csv file you created earlier and click Next. The file will be briefly checked and the following screen will be displayed.

  5. Click Import.

Once complete, a mail item will be sent to the Office 365 administrators’ mailbox. If there are any issues with creating users, the mail item will identify them and provide a reason. You may now view the newly created accounts as shown in the following screenshot.

Import mailboxes into Office 365

Create a .csv file

With a migration from Contoso, you have two options for creating the .csv file:

  1. Because Contoso allows you to have a single mailbox that can be enabled to access all mailboxes, you can create a .csv file using the admin account and password to migrate all mailboxes (recommended).
  2. Alternatively, you can create a .csv file listing each mailbox and the user’s password, as in the previous example.

Initially, create a .csv file with just a few ‘test’ mailboxes listed in it to confirm that the format of the .csv file is correct and that mailboxes migrate. This is also a good time to record how long a mailbox takes to migrate, and calculate the GB/hour transfer rate. This figure should be used to calculate the time required for a complete migration. Once a mailbox has been migrated, Office 365 will continue to synchronize the mailbox every 24 hours. Therefore a staged migration is possible, where users continue to use their Rackspace mailboxes until you have migrated all the mail.

Populate mailboxes

To populate the mailboxes with mail, follow the instructions for importing mail from IMAP as detailed in the previous section. For more information, see Increase the Number of Mailboxes to Migrate Simultaneously. If you get any errors, click Open (next to Per User Details). This allows you to view any errors before the migration is complete. Fix any errors and run the batch again. A good batch will migrate three mailboxes at a time, with results something like the following.

Note: My migration times were approximately 1.6GB/hour. Contacts may be exported and created as in the previous section.

Share a calendar

Typically, there is no way to export a calendar from other hosting providers. However, it is often possible to share the calendar publicly.

The calendar URL can be viewed in either Microsoft Office Outlook or Office 365.

Repoint MX Records to Office365

Now it is time to switch over so that mail will be delivered to Office 365. To do this requires changing the MX record for your organization in DNS on the Internet. (Remember, we ensured that its TTL was 1 hour in previous steps.) Go back to the printout of those instructions and enter the value of the MX record that was given to you by Office 365. For more information, see Verify your domain and change name servers at any DNS hosting provider and domain registrar. For information on repointing MX records to Office365, see Change MX Record.


To summarize, migrating to Office 365 involves performing the following tasks:

  • Register and subscribe to Office 365.
  • Verify your domain name to Office 365, to configure it as an accepted domain.
  • Create users/mailboxes.
  • Migrate the mailbox data, Calendar, and Contacts where possible.
  • Maintain a period of coexistence between the old and new environments.
  • Point the mail exchanger (MX) record to Office 365.
  • Decommission the email provider’s mailboxes.

When migrating from a POP provider, there are two options available: use connected accounts, or export and import using .pst files. When migrating from an IMAP provider, check to see if the provider gives a method for exporting mailbox address information. If so, use a .csv file to create the mailboxes in Office 365; otherwise a manual process is required. Use the IMAP migration tool provided by Office 365 to pull across all mailbox information. In all cases, check to see if the provider allows exporting of contacts and calendars. If they do, follow the instructions in this blog to migrate that data. I hope you find this information useful. Look out for my next blog, which will describe how to migrate into the next version of Exchange Online with Exchange 2013!

Previous sections


Part 1: POP3 Example

Part 2: IMAP4 Example 1