I’ve migrated all from IceWarp to Mailcow last weekend and I’ve used the synchronization feature of Mailcow which worked like a charm!
For this you need to have the old mailserver still up and running. Create all the mailboxed in Mailcow and set a sync job for each mailbox towards the old mailserver. Mailcow will then resync every account to the old server by default every 20 minutes.
I had all my mails and folders synced perfectly with this solution. Before the final migration I disabled port 25 to the old IceWarp (so no new emails could arrive from the outside), waited 20 minutes so all boxed had the latest sync state, and then just switched to Mailcow and enabled port 25 towards Mailcow.
I can highly recommend this feature for migrating mailboxes from any other IMAP server.