Migrate email accounts to Virtualmin, best practice

20+ email accounts with 6 GB data in total to be moved from another hosting provider to my Virtualmin Pro installation.

My take on it has been to try to find an automated method via IMAP using offlineimap http://docs.offlineimap.org/. I have managed to download the data to my local machine, but I fail at synchronizing from Local to Remote. All local mail is deleted when I try to sync up to the Virtualmin remote.

Maybe I am going at this the wrong way? I have searched quite a bit, but haven’t found anything really useful. Doing it manually via the mail client (e.g. Thunderbird)? There’s gotta be a better way, aye?

I am considering installing Getmail (http://pyropus.ca/software/getmail/documentation.html) on the same machine as Virtualmin to fetch all the mail with the Maildir for the individual users as destination.

The .getmail/getmailrc file will look something like this:

[retriever] type = SimpleIMAPSSLRetriever server = imap.otherhost.com port = 993 username = username@domain password = ...

type = Maildir
path = /home//homes//Maildir/
user = .

delete = false
message_log = ~/.getmail/log

Any thoughts?