Aha, clearing out the
.mbsync directory seems to have fixed the obscure UIDs error I was getting. So, what I've done now is:
(a) created a separate config file in
.mbsyncrc format for each mailbox - like the ones at the Importing Email from Another Provider link, but with different filenames, and with the
Pass field set to the mailbox passwords for ease of use.
(b) Created the following
sync_email script in my home directory so I can clear out the
.mbsync directory and run the migration for a mailbox with a specific config file, like so:
# Clear out any previous run
# Sync fresh using the config provided as the argument
mbsync -a -c $1
Then made it executable via
chmod u+x sync_email.
(c) I can sync over the latest emails by running the script with the relevant config file as an argument, e.g.
Judging by the web mail interface this seems to work, so hopefully I'll be able to run that, redirect my domain to Opalstack, then run it again to pull over any emails that came in after the first migration, with zero mail downtime.
Hope this helps someone!