Import Email from CPanel without the Migrate option

Hi !

I did not see the Migrate Option in Virtualmin before my research on the Email’s import…
So to resume, I have create a new Virtual Server and import my website with a Wordpress’s Plugin and everything is fine. Now, I want to import the Email from Cpanel on my Hosting and I wonder how can I proceed ?
All the IP have been set on the DNS Gestion on my hosting to point on my VPS (email too).
I guess if I create the same email address on Virtualmin and try to get the emails on the server, there will be nothing, right?

Any thoughts ?

Thanks a lot guys!

There are best practices and methods by which you can migrate email of a domain or several domains from one server to another without any downtime or messages bouncing during the transition. To answer your question: if you merely create a set of mailboxes in Virtualmin then those will be ‘empty’ as the email which has been sent / received thus far will still be on the old Cpanel server.

You have chosen not to use the migrate option built into Virtualmin to carry out a full transfer (i.e. transfer of your website as well as your email) but instead have used a third party tool which has transferred just your website from Cpanel to Virtualmin. In this situation you must manually create the corresponding set of email addresses on the Virtualmin server that exist on the Cpanel server and then use a email sync tool like Mailbox Imapsync Online to transfer messages mailbox by mailbox. It is tedious but it will get the job done.

If I had found the migrate tools earlier, I would have use it :slight_smile:

I will try your tool then, thanks.
I have a question: do I need to set the IP for the MX (or another fields in the DNS Manager of my hosting) to the VPS IP or the Hosting IP ? For one domain, I changed all the IP for the VPS (I can edit them again if necessary).

Thanks for your reply!

When you have prepped Virtualmin to receive email for the virtual servers(s) from the rest of the net, you should change the IP addresses in the DNS Manager of your hosting to point to the Virtualmin server.

Ok, so if I resume:
Hosting: IP of MX must be the VPS IP
VPS: I have to create the same email address (if it was “info”, I have to create a user “info”).
On the online tool to migrate the emails, for the IMAP source, I have to enter the imap server, like mail.xxxxx or imap.xxxx
For the destination, I have to enter the IP of my VPS right? because if I enter the same imap server, how the tool will know the source and the destination … ?

In fact, I don’t understand how the online tool can recognize the old imap server and the new one if the IP and the mail server are the same… I mean, the IP for the domain name is the IP of the VPS and the MX is linked to the domain name, so the “old” email server at the hosting is mail.xxxx but now, mail.xxx is redirected on the VPS…

Sorry if it seems stupid questions, I just want to understand properly…

For MX

  1. create mail.domain.com and point it to the IP address of Virtualmin box / VPS IP
  2. configure MX for domain.com to point to mail.domain.com

That’s correct. On the Virtualmin box, create mailboxes to match mailboxes that exist on the old Cpanel server.

Correct: use the FQDN where it resolves and the IP address for the other one.

The MX is for incoming email delivery, it plays no role in the transfer / migration of email. For the purpose of email transfer, you can disregard MX altogether. As I said, you can use the FQDN to specify the server to which it resolves (old Cpanel server) and the IP address to specify the Virtualmin server in the online tool for email migration.

These are not stupid questions at all. When managing domains and IPs it is important to have a clear idea about how it all works and a plan which will get the result that you want.

Thank you for the detail. I tried with the online tool, but I’ve got an error. I ran it in “verbose” mode. The domain name source and the IP destination are the same… I have some difficulties to understand. I will try with the FQDN instead of the domain name…

I remember also that all my emails accounts of my domains are linked on my Gmail account, so if I can’t migrate the emails in IMAP, it’s not very important because I have a copy in Gmail in case of.

Thanks again calport!

Try using FQDN for source server (the Cpanel one) and IP address for the destination server (the Virtualmin one).

This was my setup, but I’ve got an error this way…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.