Migrate mail using the ~/Maildir/cur file format possible?

I would like this thread to evolve into an improvement for folks currently running postfix/dovecot on another host and have a web or a ssh command-line tool to migrate the ~/Maildir format files directly to the same domain name on the MIAB server?

My remote host running postfix/dovecot is the reason why I installed MIAB. Dovecot is broken and won’t authenticate using PAM so imapsync won’t work.

The target of interest here is the migration of the /cur directory from the source user ~/Maildir/cur files to the MIAB mailboxes/example.com/someuser/cur?

Without using dovecot tools, the way I did it (running mailinabox inside a container with the /home/user-data/ directory exposed to the host) was to “rsync $MAILDIR/cur/ $MAILINABOX_MAILDIR/cur/”, which will copy all contents (note the final / ). Finally, chown the files to correct user/group. Simple as that. The only tricky part for me was that I used the “fs” layout maildirs, so nested folders were treated as subfolders. I had to translate those from Level1/Level2/Level3/ to Level1.Level2.Level3/ and also change my sieve rules.