365 has email import tools in the Microsoft 365 admin center and there is always the trusty IMAPSYNC script (and not the web based service by the same name) which can be installed and used free of charge.
There are also various third party services which charge for the migration.
good luck with imapsync and o365. keep in mind there are special instructions for imapsync+o365, you must read the manual before using it… (had to use davmail in my case.)
–
o365 is a (the most?) lousy lock-in email service around…, could never understand why people choose it.
I am reading up on the imapsync now. I’ve also had a look at the migration options in exchange online and they seem to have improved significantly since we last tried to use them in anger!!
We are not using 365 through my choice and my boss is actually regretting we didn’t go with my other idea of virtualmin and nextcloud clusters and linux desktops for about 70% of our users!!
Yes, there are a number of things that have to be kept in mind - imapsync is not for beginners but it does give one a huge amount of control.
In a recent disaster recovery situation I was able to use imapsync to iteratively restore mailboxes - used 10 simultaneous imapsync instances to givr hundreds of users just their last few days email so that downtime was minimised, and then in the next iteration of sync transferred the remaining mail.
I can’t think of any other script that offers this level of flexibility.