Forum Discussion

Dzung Vu's avatar
Dzung Vu
Tin Contributor
Aug 20, 2026
Solved

Migrating from MDaemon emails to Exchange online

Dear all,

Has anyone here done migrating from Mdaemon email server to Exchange Online? 

Can we do multi domains? can we do one user or group at a time? 

Any info/ help would be appreciated.

Cheers

  • IMAP only copies mailbox data, so coexistence between MDaemon and Exchange Online requires separate mail routing.

    A practical setup is:

    1. Keep the MX record pointing to MDaemon during the migration.
    2. Set the domain in Exchange Online to Internal relay, then create an outbound connector to MDaemon. This routes messages for non-migrated recipients back to MDaemon.
    3. After a migrated user’s final IMAP sync, configure MDaemon to route new mail for that user to their verified Exchange Online routing address, normally an onmicrosoft.com address. Check your MDaemon version’s documentation for the exact forwarding or routing setting.
    4. Switch the user to Exchange Online and test mail in both directions.
    5. After everyone has moved, update the DNS records, remove the temporary routing and change the domain back to Authoritative.

    Do not create Exchange Online mailboxes too early. Once a cloud mailbox exists, Exchange Online treats that address as local instead of relaying its mail to MDaemon. Also test for routing loops before moving a real user.

    Microsoft guides:

    • https://learn.microsoft.com/en-us/exchange/mailbox-migration/migrating-imap-mailboxes/migrate-other-types-of-imap-mailboxes
    • https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/manage-accepted-domains/manage-accepted-domains
    • https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/use-connectors-to-configure-mail-flow/set-up-connectors-to-route-mail

4 Replies

  • Dzung Vu's avatar
    Dzung Vu
    Tin Contributor

    Hi NathanReed,

    Really much appreciated your help, I'll create a test environment and do a proper plan if the project and my test approved

  • NathanReed's avatar
    NathanReed
    Brass Contributor

    Yes, MDaemon mailboxes can be migrated to Exchange Online through IMAP migration.

    • Multiple email domains are supported. Add and verify each domain in Microsoft 365 before changing any DNS records.
    • Users can be migrated individually or in batches using a CSV file containing only the selected mailboxes.
    • Distribution groups and shared resources must usually be recreated separately.

    A practical migration order is:

    1. Add the domains to Microsoft 365 and create licensed Exchange Online mailboxes.
    2. Confirm that secure IMAP access to MDaemon works, normally over port 993.
    3. Create an IMAP migration endpoint in Exchange Online.
    4. Run a small pilot batch and verify the folders and message counts.
    5. Migrate the remaining users in batches.
    6. Complete the final synchronization, then change MX, Autodiscover, SPF and DKIM records.

    The main limitation is that IMAP migration transfers email and folders only. It does not migrate calendars, contacts, tasks, rules or local archives. If those items are required, use PST export/import or a migration product that supports MDaemon.

    Migrating users gradually is possible, but mail routing must be planned so messages reach both migrated and non-migrated users during coexistence.

    • Dzung Vu's avatar
      Dzung Vu
      Tin Contributor

      Hi NathanReed,

      Thanks a lot for the info.

      The step you mentioned "Migrating users gradually is possible, but mail routing must be planned so messages reach both migrated and non-migrated users during coexistence." that is what I want to achieve as well, 

      I've migrated on-prem Exchange to EXO, not IMAP, are there any links/ articles? so I can learn more even better step-by-step, that would be appreciated.

       

      Regards

       

      • NathanReed's avatar
        NathanReed
        Brass Contributor

        IMAP only copies mailbox data, so coexistence between MDaemon and Exchange Online requires separate mail routing.

        A practical setup is:

        1. Keep the MX record pointing to MDaemon during the migration.
        2. Set the domain in Exchange Online to Internal relay, then create an outbound connector to MDaemon. This routes messages for non-migrated recipients back to MDaemon.
        3. After a migrated user’s final IMAP sync, configure MDaemon to route new mail for that user to their verified Exchange Online routing address, normally an onmicrosoft.com address. Check your MDaemon version’s documentation for the exact forwarding or routing setting.
        4. Switch the user to Exchange Online and test mail in both directions.
        5. After everyone has moved, update the DNS records, remove the temporary routing and change the domain back to Authoritative.

        Do not create Exchange Online mailboxes too early. Once a cloud mailbox exists, Exchange Online treats that address as local instead of relaying its mail to MDaemon. Also test for routing loops before moving a real user.

        Microsoft guides:

        • https://learn.microsoft.com/en-us/exchange/mailbox-migration/migrating-imap-mailboxes/migrate-other-types-of-imap-mailboxes
        • https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/manage-accepted-domains/manage-accepted-domains
        • https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/use-connectors-to-configure-mail-flow/set-up-connectors-to-route-mail