Importing emails from cPanel

Hi all

I’m going to transfer some websites from a cPanel VPs to a new VPs using Virtualmin.

Transfering websites, databases, is not a problem.

Only, I need a suggestion for transfer emails (IMAP, POP).-

Simply copying /home/mydomain/email folder can work?

Thank you


Are you by chance performing the domain transfer by going into Add Server -> Import Virtual Server, and then importing the backup? If so, that might save you a bunch of time. I was under the impression that the import handles email.

If you did all that, and are seeing that it’s not handling your email – we can look into that :slight_smile: The first step would be to look at your “email” directory, and determine what format it’s in. Virtualmin uses email in a “Maildir” format. If that’s what you have now in cPanel, that should be easy to convert.


Yup! If you generate backups in cPanel, those backups can be imported into Virtualmin.

I’d suggest giving that a shot, I believe it will handle your email.

Also, I pointed you to the wrong location in my earlier post… what you want is Add Servers -> Migrate Virtual Server.

There, you’ll see an option to import cPanel backups.


Hi Eric,

I had to migrate a huge WHM/cPanel website over to Virtualmin/Webmin manually, because Migrate Virtual Server just couldn’t do it (I guess because of file and database sizes, some kind of limitations, etc.) Now everything works just fine, except mail boxes. The virtual server had hundred of e-mail boxes, so re-creating them manually is not a way to go.

Is there any way to import mail boxes separately from virtual server from a directory on HD?

I tried this workaround:

  1. To prevent possible conflict between already set up virtual server without imported e-mail boxes and its version with e-mail boxes, I have renamed previously manually migrated domain name, let’s call it ‘’ to ‘’;
  2. Have emptied public_html and databases on old cPanel server (because they are huge and prevent migrating over to Virtualmin);
  3. Successfully migrated to Virtualmin with all the mailboxes as ‘’.
  4. Renamed ‘’ to ‘’.
  5. Renamed ‘’ back to ‘’ (because this one is functional website now).

Now a question - how can I move mailboxes from ‘’ to ‘’?