Tuesday, February 18, 2014

MDaemon Mail to Exchange via imapsync

Gentle reader of migration mindedness,

Today we will use imapsync for migrating email from MDaemon to Exchange.

Why?  Obviously because we're going to get to moving calendars for this legacy product, but you only get to calendars if you're also doing email and we get asked about email, so we're documenting it here.

Using imapsync will cost you all of 50 Euros.

Goodness, gracious it is worth it!  

This application has significant advantages over other products:  
  1. It is really simple to install and use.
  2. The "sync" in the title is serious.  You can upload all the data from a user set during working hours and then cut over the incremental changes starting on a Friday after closing time.
  3. You can also use imapsync on a Linux environment as well as a Windows environment.
  4. It is all in your control as opposed to run through someone else's data center or through a major integrator looking to run up hours.
  5. It is very reasonably priced with the most liberal license I have seen.

We use the Windows version in our testing.

imapsync runs exclusively in the Command Prompt.

First off, please make sure you have enabled IMAP on your Exchange 2013 server.

Migrating from MDaemon to Office 365 looks something like this (if you use individual passwords for users).

imapsync.exe 
--host1 147.1.41.1 --user1 zyg@sumatra.local --password1  "XXXX" 
--host2 outlook.office365.com --user2 zyg@sumatra.onmicrosoft.com --password2 "XXXXX"  
--ssl2

If you set up a service account with FullAccess, you can accomplish a migration with a command like this:


imapsync.exe 
--host1 147.1.41.1  
--user1 jimi.hendrix@sumatra.local --password1  "XXXX" 
--host2 outlook.office365.com --port2 993 --sep2 / 
--user2 jimi.hendrix@sumatra.onmicrosoft.com  
--authuser2 riuliano@sumatra.onmicrosoft.com 
--password2 "XXXXX"  --ssl2


Note in  the above, for an Office 365 target system we need to use the "--sep2 /" command. 

Executing will give you some excellent statistics and feedback.


Other things to be aware of
Exchange Configuration Requirements:
Before you can run imapsync, you will have configure Exchange for IMAP.  This requires two steps.

Step 1: Start two IMAP4 services (and configure those services to automatically start if you wish.)

By default, in Exchange 2013 the IMAP4 service(s) are stopped:


To start those services: On the computer running the Client Access server role:
1. Set the IMAP4 service to automatically start:
     Set-service msExchangeIMAP4 -startuptype automatic
2. Start the Microsoft Exchange IMAP4 service.
     Start-service msExchangeIMAP4

On the computer running the Mailbox server role:
1. Set the Microsoft Exchange IMAP4 Backend service to start automatically.
     Set-service msExchangeIMAP4BE -startuptype automatic
2. Start the Microsoft Exchange IMAP4 Backend service.
             Start-service msExchangeIMAP4BE

In our case, the CAS and Mailbox server roles are on the same box:



Step 2: Configure Exchange IMAP4 External Connection so users can see (and thus use) the IMAP server settings

Use the powershell SET-IMAPSettings cmdlet, e.g.:
     Set-ImapSettings -ExternalConnectionSetting {:993:SSL}.

This requires you restart IIS.

This is true even if you are working within the firewall  Thus in our case, the External Connection is the same as the InternalConnection.



Finally,  Verify things are working, using OWA’s Options select Account, then pick the “Settings for POP or IMAP access” link.




These sample scripts for major migrations / multiple users will help you out a lot.
I really like the way this user lays out a basic sequencing for migrations including how and when to change your MX records.

And on the more than crucial need for advance planning and testing, please read this thread.





1 comment:

zyg said...

-- sep 2 / should not be necessary in the most recent releases of imapsync. Thanks to Gilles Lamiral for making the mods to improve imapsync and for keeping us in the loop.