In the first post of this mini series on migrating my private Linux/cPanel/IMAP based stack to Office 365, I was writing about my motivation for making this move. The second post was on planning the migration process and verifying my domain(s) with Office 365, This post will be about actual migration of IMAP e-mail accounts from my Linux server to Office 365.
First thing first – let’s create required user accounts. Even if that email addresses will be inactive upon creation (DNS records are still pointing to the Linux server), we need to create them first, so that mails would have a place to arrive, when DNS records are changed.
If you need to, you can click on “More” tab, and then on “Exchange / Change mailbox settings” to add some aliases for this account:
Now, when all of the required user accounts have been created, let’s change the DNS.
In your Office 365 admin panel, click on the “Domains” link. Your domain should already have status “verified”. If this is not the case, please read my previous post on domain verification with Office 365.
Click on the domain name (in my case, my test domain “progressive.ba”, and then click on the DNS settings link:
On the following screen, you’ll see all the required DNS settings, which are necessary to undertake in order that Exchange Online and Lync Online can work with this domain:
As you see, there are quite few required DNS records: an MX record and an TXT record for the “root” domain (progressive.ba), CNAME records for autodiscover.progressive.ba, sip.progressive.ba and lyncdiscover.progressive.ba, and Lync-specific SRV records for _sip._tls.progressive.ba and _sipfederationtls._tcp.progressive.ba
Let’s first add the MX record. Login into your cPanel on your Linux server, and click on the “MX Entry” icon:
Choose your domain, and then select “Remote Mail Exchange” and click on the “Change” button. After that, click on “Add New Record”, and enter required MX record (progressive-ba.mail.eo.outlook.com in my case), with priority 0, and click on “Add New Record” button.
Now you should see both local, and remote (Office 365) MX records, please delete the local one – only Office 365 specific record should remain.
Now, go back to the cPanel home, and click on the “Advanced DNS Zone Editor” icon, it’s time to add all the other DNS records (except SRV):
On the next screen, please add all requested TXT and CNAME records. The result should look like on the screen below – the yellow underlined record has been added during the domain verification (previous post), and red underlined records have been added just now (1 TXT record, and 3 CNAME records from above).
The next step is to add SRV records. It is not possible to add them through the cPanel interface, but if you have access to your WHM panel, that is an easy thing to do:
- Login to WHM
- Go to ‘DNS Functions >> Edit DNS Zone’
- Select the domain for which you need to add the SRV record (“progressive.ba” in my case)
- Select ‘SRV’ from the drop down.
Now, enter the first column with the ‘_sip._tls.YOURDOMAIN.COM’ and fill up the required fields, as requested by Office 365 above:
- Priority: 100
- Weight: 1
- Port: 443
- Hostname: sipdir.online.lync.com
- TTL: 3600
Do the same with the _sipfederationtls._tcp.YOURDOMAIN.COM – as requested from Office 365:
- Priority: 100
- Weight: 1
- Port: 5061
- Hostname: sipfed.online.lync.com
- TTL: 3600
If you don’t have access to the WHM panel, then please ask your administrator (usually your hosting provider), to manually enter the following DNS records for you:
_sip._tls.YOURDOMAIN.COM. 3600 IN SRV 100 1 443 sipdir.online.lync.com. _sipfederationtls._tcp.YOURDOMAIN.COM. 3600 IN SRV 100 1 5061 sipfed.online.lync.com.
Please change the “YOURDOMAIN.COM” with your real domain name.
Now, when you are finished with that, take a coffee break until new records are propagated (it could be a longer coffee break if you depend on the administrator for the SRV records), and then go to the centralops.net to check if the DNS records that you entered are successfully applied and propagated.
First look up the “root” domain (progressive.ba in my case). One MX record, and one TXT record, entered in the previous step, should be found there:
Now, look up the “autodiscover.YOURDOMAIN.COM”, “sip.YOURDOMAIN.COM” and “lyncdiscover.YOURDOMAIN.COM”. Each of them should have a CNAME record entered above. Please replace “YOURDOMAIN.COM” with your real domain name.
The last verification step is to look up SRV records in the _sip._tls.YOURNAME.COM and _sipfederationtls._tcp.YOURNAME.COM domains. You should get the following results:
Now, when you have confirmed that all of the DNS changes are propagated, it is time to do the final test – to check if the emails are being delivered to Office 365.
Go write a test mail to your account created above, or to one of the aliases. The mail should already arrive where it is intended to
That’s all for today, folks. The next episode will see us talking about mail forwarders, and moving my wife’s web site to SharePoint Online.