[ Thanks to Falko
Timme for this link. ]
“This guide explains how you can migrate mailboxes between IMAP
servers with imapcopy. imapcopy lets you copy recursively all email
messages and folders from one imap account to another. It supports
the protocols imap and imaps.”