Migrate mail server from iRedMail to VirtualMin

Dear All!

Virtualmin is awesome! I love it. I’m currently running an old mail server using iRedMail and honestly no longer need it, and will be switching over to Virtualmin for all sites. I have two mailboxes tom@domain.tld with 667 email (488mb) and me@mysite.tld with 112 emails ( 57mb). on the old mail server. I did had a look at imapsync (https://github.com/imapsync/imapsync) but that seems a bit over complicated for two emails, but maybe the top recommendation option for safely transfer?


I was just considering copying the content of old servers Maildir over to the new server and see what happens, but honestly, I don’t really like playing around with fire. The reason I did not was because it seems that the Maildir folders where different e.g:

Old Sever (iRedMail) Ubuntu 14.04 | Dovecot 2.2.22 (fe789d2)

Maildir Folder structure:

188M cur
0 dovecot-acl-list
16K dovecot.index
900K dovecot.index.cache
36K dovecot.index.log
4.0K dovecot.index.thread
4.0K dovecot-keywords
4.0K dovecot.mailbox.log
44K dovecot-uidlist
4.0K dovecot-uidvalidity
0 dovecot-uidvalidity.55af9ex0
0 maildirfolder
4.0K new
4.0K subscriptions
4.0K tmp

.

Example email files names in ./cur:
1437618362.M346151P14629.instange-1-mail-server,S=360621,W=366805:2,S
1437643592.M402524P29649.instange-1-mail-server,S=6604,W=6783:2,S
1437643676.M708566P29703.instange-1-mail-server,S=509416,W=516068:2,S


New Sever (VirtualMin) Ubuntu 16.04 | Dovecot 2.2.9

Maildir Folder structure:

20K cur
4.0K dovecot.index.cache
4.0K dovecot.index.log
4.0K dovecot-uidlist
4.0K dovecot-uidvalidity
0 dovecot-uidvalidity.57f77278
4.0K new
4.0K subscriptions
4.0K tmp

.

Example email files names in ./cur:
1475834620.26979_1.domain.tld:2,RS
1475835989.27871_0.domain.tld:2,S
1475836361.28346_0.domain.tld:2,S


The last point(s) are the difference in file contents between the two servers:

  • VirtualMin server has X-Spam-Checker-Version,X-Spam-Level,X-Spam-Status params and iRedMail does not.
  • VirtualMin server Delivered-To: tom@vps66312.local, iRedMail is Delivered-To: tom@domain.tld
  • VirtualMin server has X-Original-To: tom@domain.tld param, and iRedMail does not

.

So as you can see quite a different between the two but maybe dovecot is smart and able to just know, or not?! I’m a bit lost, any help would be great. Thanks.