Thanks, Peter.
I actually tried that using the actual losing server, an existing email account on the losing server, and a server that’s almost identical to the proposed gaining server (the only difference being that it’s running CentOS 7.9, which I think is irrelevant in this case). I tried it using rsync, rclone, SCP, tarring and SCP, and tarring and SFTP. I tried it as root and then chown’ing it, and I tried it as the virtual server user.
No joy, no matter how I did it.
What happened was that the account on the gaining server would see the number and size of emails, but nothing else. The headers and content would all be blank. I could “read” the emails using Roundcube, but there would be no content to read; and if I intended to reply, the “To” field would be empty. There were no errors. It just treated it like an empty mail.
I then scrapped and re-created the email account and sent it one email via telnet. That one mail arrived normally. But attempts to manually import the rest yielded the same results as earlier.
So I re-created the account yet again and installed Mutt. That worked. Hence the idea of using an IMAP client to maintain sync after the initial import (which would be accomplished by the Virtualmin migration script).
The site @calport sent me to also worked using a Web-based app that he makes available for free with a 3GB limit (but no limit if you pay for a license). It doesn’t actually maintain synchronization, but it synchronizes changes since the last run. That would also work for my use case.
I should also look around to see if anyone has a plug-in for Roundcube that would work, now that I think about it.
I really don’t know why the mail is unreadable just copying the contents of the folders. It looks like an ownership / permissions problem, but I can’t find any, and there are no overt errors. My guess would be that it has something to do with cPanel. Exim > Postfix shouldn’t make a difference, and both servers use Dovecot.
After a couple of hours, it became a problem I didn’t care about anymore because IMAP sync after the initial import was a workable solution. If I change my mind, I’ll let you know.
Yeah, they’re even in the same DC. That part won’t be a problem. It was more a commentary on some users’ refusal to part with any mail, no matter how old or useless it is. If they only knew how much of their old shit I delete behind their backs, such as Sent messages with image and video attachments that were addressed to my Webmaster account on the same server.
Richard