Migrate emails to Office 365 using IMAP


Note that this is an advanced guide and may take 1hr+ to complete. The basic process is to create a CSV file containing usernames and passwords, configure a connection from Office 365's admin area to your IMAP server, then provide it with your list of usernames and passwords to copy across emails.

We are also able to assist you with these migrations if the Office 365 account is managed through us - we'd charge $49 per mailbox to perform an IMAP Sync. If you'd like us to manage this for you, reach out to our support team with the usernames and passwords of the accounts you'd like to migrate.


Create a list of Usernames and Passwords
Step 1 - Open up Excel or Google Sheets, and create a new file that looks like this. This must match the picture exactly, must not contain spaces, and is CASE SENSITIVE. The exact heading names are:
  • EmailAddress in cell A1.
  • UserName in cell B1.
  • Password in cell C1.
d4023ff19110c67c5f2a02a19436709cd1e78127?t=cf9fa2f2d72185266ba9c9dfffab4afb



Step 2 - Enter your email account details for each mailbox you want to migrate:

9a2d73b5808367095560c6b07b865effa2155a71?t=67d94241a93228d45a32dc4dd8d9227f

More specifically:
  • Column A is the email address of the Office 365 mailbox. This is what is shown in the username column under Users > Active users in the Microsoft 365 admin centre.
  • Column B is the username for the user's email account on the source email system. For cPanel and most mailboxes, this is the full email address.
  • Column C is the password for the user's email account on the source email system. Note that the password for the Office 365 account is not used.

If you haven't created users in the Microsoft 365 admin area yet, you can use this guide to do so.
If you don't know the users' current passwords, you'll need to reset them to passwords that you do know, and then enter those passwords in the migration file. We also have a guide on how to reset an email password in cPanel.


Step 3 - Export the file in '.csv' format, then close Google Sheets or Excel.

996f2caf1b5dc127c40ed6a4b7460cb8a36f8484?t=e365b10e15b0067906789077f41f0d70

aa0b1ffdbdf3a182819aff2ca4fad0f01e9f5cb0?t=1658fba9f808156c6b550e4e1c99fbf0


Configure the Migration Endpoint
Step 4 - Log into your Office 365 management area, then click on Show All on the left menu.

1ff3eb5c4e74b767fb3817c33fc4dc4112bb0be6?t=368e063bb36a7b18871b6be3159f2de9



Step 5 -
Select Exchange under Admin Centers to access the Exchange Admin area.

351fb823cdb07c83d193f0773c5958854164b065?t=d976a7e192b87cb40f2b77ca2bc5234a



Step 6 - Navigate to Recipients > Migration > ... > Migration endpoints. This will open in a new window.

e485c3bd8e8de0e1f333c42109f334706cb2d2a1?t=e4899d5cdef61b711b4293a90556d467



Step 7 - Click New+ to create a new Migration endpoint.

a032efe2d2967f2c5f34bc602151399148d68e22?t=08d00b287ae20f69d3d04ec3e3469417

Step 8 - Choose IMAP and select Next.

8698fa27704468a330e826fbdf373c4efce7eafa?t=d85d23f32e9271747e0f8bdca7aca635



Step 9 - Enter your IMAP connection settings. To find these, see our guide on finding General Email Settings.
If possible, use your server name (e.g. vmcp01.auserver.com.au) rather than "mail.yourdomain.net.au", as this will not be affected if you need to perform a resync of your emails post-migration. The migration service then uses the settings to test the connection to your email server. If the connection works, the Enter general information page will appear.

c7a2a5fe9f96208c97f9b2fe2f3e71a442b00e65?t=592e9bbe2e00e2493a15a3b362f0b155


Step 10 - Enter a name for the endpoint and leave the other boxes blank to use the default values, then select New.

4b8fd4d4acd444aecccdb092d430793a79618066?t=86a737d1e0bf1a8781e8eacae977eacf


Create a migration batch
Step 11 - From the Exchange Admin Center select New+ then Migrate to Exchange Online.

dd55589e88291ab40b7c043668b9ee70b47f4352?t=5085a1e4a4763491c2c22133a520e714



Step 12 - Select IMAP Migration, then click Next.

89e8d97fd59044b48efbd75dfba4db6dcba80146?t=ccc0769618317285d612fb8cd50f4af8


Step 13 - Upload the migration CSV file you created. After you upload the file, Office 365 checks it to confirm that:
  • It is not empty.
  • It uses comma-separated formatting.
  • It contains less 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. If you get an error, you have to fix the migration file and resubmit it to create a migration batch. Once the checks pass, select the option to Allow unknown Columns in the CSV file if prompted, and then select Next.

f8a016228913289050c925da129debe4977d81fe?t=9ebd2d1ed30e1619e21a3fc89b4aceb8



Step 14 - Your IMAP endpoint should be automatically selected - if not, you can select it here. Click Next.

8d128131cb0bddb9cd4c943a6b77fdb986d9df02?t=b667076d2edde0b4e9e8e4b2459deca3



Step 15 - Create a name for your migration batch, without any spaces or special characters. The default migration batch name that's displayed is the name of the migration file that you specified. You can also optionally enter the names of the folders you want to exclude from migrating, for example Shared, Junk Email, and Deleted. Click the + icon to add them to the excluded list.

Select Next once done.

bc3b61621187067840cf541ee0fa9edfb73c440b?t=166925012a054ea632ee3f847526647b



Step 16 - If you would like the migration reports emailed to a specific user, you can use the Browse button to specify this. Otherwise, leave Automatically start the batch selected, then click New to start the IMAP Sync.

The batch status is first Created and changes to Syncing after the migration starts.

8e60576fdbe24c65dedcdfe59fac09720ce446f0?t=e5c650a6af4c27889d8bc4185866ea4e



This guide is based on Microsoft's documentation, which you can view here.
For more information and tutorials on Office 365, see our Getting Started guide.


Did you find this article useful?