Just thought I'd share the method we used for migrating from our old server to hMailserver, it may be useful to some or blindingly obivious to others.
This method meant that we could migrate users at convenient times and have both the old server and hmailserver working in conjuction with each other. It relys on your old mail server supporting routes and domain aliases/
For domain.com migrating from oldserver to hmailserver :
1. Set up all the accounts on hmailserver to mirror accounts on oldserver.
2. Then for each mailbox on hmailserver set a forward to firstname.lastname@example.org
3. Then set a route on hmailserver pointing legacy.domain.com to oldserver's IP.
4. Then add an alias to domain.com on oldserver called legacy.domain.com
5. Change the mx record for the domain.com to point to hmailserver.
6. At this point all mail is delivered to hmailserver and then routed back to oldserver.
7. Add an alias to domain.com on hmailserver called migrate.domain.com
8. Then add a route on oldserver pointing migrate.domain.com to hmailserver.
9. Now you are free to migrate mailboxes and re-configure clients one at a time at any time. As you migrate each user make sure they download all thier mail from oldserver (if using pop3) before reconfiguring the client. Then take the forward off the mailbox on hmailserver and add a forward to the mailbox on oldserver sending any mail to email@example.com
. This way non migrated users can email migrated users and vice versa during the transition period.
Note - If using spam protection on either servers make sure to whitelist the other servers IP.
Note - We used Thunderbird to copy IMAP mailbox contents from one server to the other.
Hopefully this will be helpful to someone, and if someone else has posted this and I've missed it please feel free to remove.