Here are Microsoft provided migration ways for third-party mail servers. Decide on a migration path in Exchange Online
If your mail server isn't supported, you could use the Import service to import data to Office 365:
- Export data from old mail server.
- Crete new mailboxes on Office 365 (Use Office 365default domain name in this step)
- Using import service to import data for those mailboxes.
- Remove domain name from old mail server, then verify domain name on Office 365.
- Change domain name for Office 365 mailboxes.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.