Converting one domain to another but email will be retain

glocorp

Member
Dec 5, 2013
7
0
1
cPanel Access Level
Root Administrator
Good Day,


Kinda hard for me to explain how to put a subject, but here's an explanation/scenario.

I have a client that has a hosting(domain.com) and they bought a new domain newdomain.com, they've been using the domain.com hosting and emails for how many years, now they want the newdomain.com to be the main. So when they go to domain.com it will be redirect to newdomain.com. Another thing is, the domain.com's email accounts will become newdomain.com, and all the emails inboxes, sent, trash etc will be in newdomain.com email. BUT the email accounts from domain.com will still be retain and accessible and all incoming emails will be forward to newdomain.com email.

Hope you can advise me.

Thanks
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Hello :)

You could use the "Modify an Account" option in Web Host Manager:

"WHM Home » Account Functions » Modify an Account"

Update the domain name associated with the account to the new domain name, and then add the previous domain name as a "Parked Domain" to the account. You can then setup domain forwarding for email as indicated in the previous post.

Thank you.
 

glocorp

Member
Dec 5, 2013
7
0
1
cPanel Access Level
Root Administrator
Hi

Add the old domain to cPanel as either a parked domain, then in cPanel go to Forwarders and add a domain forwarder.

Setup/Edit Domain Forwarding
I already know this part.. but the old emails should be retain.

Hello :)

You could use the "Modify an Account" option in Web Host Manager:

"WHM Home » Account Functions » Modify an Account"

Update the domain name associated with the account to the new domain name, and then add the previous domain name as a "Parked Domain" to the account. You can then setup domain forwarding for email as indicated in the previous post.

Thank you.
Thanks for this answer, do I need to create all the previous email domain before I forward all of this to the new email domain?

before all this happen, I already parked the new domain and I'm making a decision that to forward old domain to new domain then modify the domain to a newly domain and parked the previous domain. If I create the forwarder before I modify the domain and add the previous to a parked domain, will the forwarder get deleted?

or to be short will the parked domain forwarder to new domain that I've created will be deleted IF I delete the parked domain

Thanks
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Could you explain why you prefer to setup the forwarding before making the change? Why not just setup domain forwarding after making the change? Please see:

Email Forwarders

In particular:
Domain forwarding takes place only when a delivery is not successful. For example, if a user sends an email to [email protected], the following actions might take place:

If [email protected] is an existing email address or auto responder, then the email will not be forwarded.
If [email protected] is not an existing email address or auto responder, then the email will be forwarded.
Thank you.
 

glocorp

Member
Dec 5, 2013
7
0
1
cPanel Access Level
Root Administrator
Could you explain why you prefer to setup the forwarding before making the change? Why not just setup domain forwarding after making the change? Please see:

Email Forwarders

In particular:


Thank you.
The reason is if I change the Primary Domain to the new domain, emails might be sending during that time on the old email domain, and since I change the Primary Domain, the Old Email Domain will be change too. So I was planning to create the forwarder first from old email domain to new email domain, then change the primary domain to the new domain so that the email that will be sent to the old email domain will be forward to the new email domain.

Thanks
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Using the "Modify an Account" option should complete the change in a matter of seconds. You could temporarily stop Exim before the change if you are concerned about email activity during that brief time period.

Thank you.
 

glocorp

Member
Dec 5, 2013
7
0
1
cPanel Access Level
Root Administrator
Using the "Modify an Account" option should complete the change in a matter of seconds. You could temporarily stop Exim before the change if you are concerned about email activity during that brief time period.

Thank you.
Good Day, I'm done modifying the name of the account and works fine after that, one problem is that all email accounts that has a filter on that filter all incoming email to go to a folder is that the old email are receiving it but get filtered from the old email domain, sample is whenever John send an email to [email protected] with a filter on, it goes to olddomain/john folder, and it doesn't catch in the [email protected] even though [email protected] is forwarded to [email protected], i saw this on the Mail delivery report. another problem is that all personal address, signatures and identities in roundcube get left behind on the olddomain. I test this by recreating an old email domain account and saw that all of the personal address, identities are still there, it didn't transferred to the new domain. Please advise on how to fix this.

Thanks
 
Last edited:

ITGabs

Well-Known Member
Jul 30, 2013
81
0
6
cPanel Access Level
Root Administrator
I was reading some old thread and maybe you can just change the olddomain for the new one in the filters in these files

Well, email accounts are stored in /home/$user/etc/$domain/passwd with an associated shadow file in the same folder. So I assume if you can match the formats and hash the passwords (there are perl scripts that can do that), it should work just fine.
https://forums.cpanel.net/f5/creating-email-accounts-ssh-194382.html#post797362

Really I am not sure where are that filters but if they are using Horde or other web client maybe you can download the full .sql and check for some olddomain remaining, your migration with filters maybe is a corner case for the cPanel domain change feature (not so easy to predict) but should be easy to fix following those two steps.