Migrate email to a different domain name?

Lisaweb

Member
Jun 27, 2007
8
0
51
We need to move our email to a completely different domain name. (I've searched for an answer to this, but can only find info on how to move email to a server with the SAME domain name.)

My plan is to re-create all the email accounts on the new domain, and then copy over everything under each of their respective old email folders.

Example:

Copy everything under the old domain email folder:
/mail/my-domain.NET/email-account-name

and paste it into the new domain folder:
/mail/my-domain.COM/email-account-name

Will my plan work? If not, is there another way to do it?

Thanks!
 

24x7server

Well-Known Member
Apr 17, 2013
1,911
96
78
India
cPanel Access Level
Root Administrator
Twitter
Hi,

What you can do is clone the complete account, alter it with new domain name, and restore it..
The other way is that you can sync the mails folder and then later on rename the mail boxes inside the mail directory..
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,297
1,251
313
Houston
Hi @Lisaweb

Is moving a requirement? I ask this only because you can change the primary domain name of the account without moving everything.

Our documentation here goes over what can be done: Modify an Account

If you find that you do indeed need to move the mail copying as you're suggesting would work, you would just need to ensure that the ownership and permissions match that of the new account.

@24x7server suggestions should work as well.

Thank you,
 
Last edited:

keat63

Well-Known Member
Nov 20, 2014
1,843
221
93
cPanel Access Level
Root Administrator
I've done something similar.
FTP each individual mail folder off the old server and in to the new one.
You'll need to access the root folder of your domain, and not the public_html folder.
When in the root, you'll find the individual mailboxes in the mail folder.

I guess if you recreate the email accounts exactly the same, it should make it pretty easy for you.
eg: bill.smith remains bill.smith and not billsmith
 

Lisaweb

Member
Jun 27, 2007
8
0
51
Hi,
What you can do is clone the complete account, alter it with new domain name, and restore it..
This seems like it would work just perfect for me!

Does anyone know the best way to clone an account? Because what I can see doing, is cloning the old domain, then renaming the cloned domain to the new domain name. Thanks for any advice you can offer on a Saturday....
 

tmcstom

Member
Dec 31, 2014
20
3
53
cPanel Access Level
Root Administrator
Basically you would do this

1. Create a backup of the source account
2. Change the primary domain/username of the source account
3. Restore the backup of the source account


Though you may run into issues with addon/parked domains during the restore so I would remove those from the source account after changing the primary domain. Then when you restore the backup it should restore those addon/parked domains without issue.
 

jainvikas8

Registered
May 14, 2020
1
0
1
U.K
cPanel Access Level
Website Owner
I'm in a similar situation where:
* Have a FULL website backup including e-mails of mydomain.net
* mydomain.net domain is not available anymore and I have mydomain.com
* I want to access e-mail accounts (all e-mails) from mydomain.net

So can I:
* create similar e-mail accounts on (/mail/mydomain.com/billsmith)
* Copy the folders from /mail/mydomain.net to /mail/mydomain.com

Will it work?


Therefore can use an e-mail client like RoundCube to access e-mail messages.