Changing Primary domain via "Modify Account" Email account renaming behaviour.

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
948
29
178
Ok, so customer wants to change their primary hosted domain on their hosting account. We go to WHM > Modify an Account and change the domain.

Usually when this happens, the process automatically renames the mail folders and Email accounts from [email protected] to [email protected]

I did one of these last week and noticed that the Email accounts didn't get renamed - the /home/username/mail/domain1.com was still there a long with all the email accounts and a new directory for /home/username/mail/domain2 was created.

This is not my experience of how this has worked in the past.

So my questions are...

1. What determines whether or not the Email accounts will be renamed?
2. Perhaps this behaviour has changed in a recent update?

I know that it's possible to re-create the same accounts in the new domain and them move the individual mail files over - but they have a lot of mail, so would prefer a cleaner way.

Any advice greatly appreciated.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello :)

It looks like you opened a support ticket to address this issue. For reference, the ticket number was 5298995. The result of the ticket was that a directory with the new domain name was already created in /home/$user/mail. Thus, the existence of this directory prevented it from generating automatically when the account was modified to a new domain name.

Thank you.
 

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
948
29
178
Hello :)

It looks like you opened a support ticket to address this issue. For reference, the ticket number was 5298995. The result of the ticket was that a directory with the new domain name was already created in /home/$user/mail. Thus, the existence of this directory prevented it from generating automatically when the account was modified to a new domain name.

Thank you.
Just to correct you on that Michael...

When I first attempted to change the domain name on the account, it was successful, but the mail accounts did not get renamed - as per my description above. This sub directory was created during that process, it was not pre-existing.

So the existence of the sub directory was not the cause of this problem, as it didn't exist - although it may have been the cause of further attempts to rename the account.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Thank you for the clarification. Please feel free to reply to the ticket if you can reproduce the original issue so we can continue to investigate.