Search code examples
emaildnscpaneladd-onaddon-domain

Cpanel Addon Domain Email Migrating to Own Cpanel Account


I have a cpanel account with multiple addon domains. I am in the process of moving every website to its own cpanel account.

I have email set up on the addon domains and before I go and move the files and the database over to the new account, I want to make sure that their emails move over as well.

I don't want the users to have to change their passwords, lose any email, etc. I have a couple clients that have dozens of email accounts attached to them, and they cannot afford to lose anything or change passwords.


Solution

  • I believe I can assist you. I suggest you create a test/fake domain to test! You can use your hosts file to point to a fake domain at your cpanel server!

    Lets get started:

    I have a cpanel account with multiple addon domains. This means each addon domain have a folder in the main user account!
    /home/main_user/addon_domain.tld

    I am in the process of moving every website to it's own cpanel account. I guess you will create a new account for each addon addon_domain.tld and move to /home/New_addon_domain_username/public_html

    I have email set up on the addon domains and before I go and move the files and the #database over to the new account, I want to make sure that their emails move over as well.

    For the databases there are 2 cases! We can get back to that later.

    For the email accounts, the solution may not be as hard as you think, and the users can keep there emails. Better, they will not notice any changes. All you need to know is this:

    1- DATA emails data is stored at /home/main_user/mail, you can copy those folders and sym-links for and in the separated accounts your create There you can run the command "ls -l" and you will get it. (if not paste the results here)

    2- Authentication, user/password This can be found at /home/main_user/etc , take note they're hidden files (ls -a) the files are .passwd and .shadow I believe that in /home/main_user/etc you will find a unique folder for each addon_domain which will contain both of .passwd and .shadow

    I don't want the users to have to change their passwords, lose any email, etc. I have a couple clients that have dozens of email accounts attached to them, and they cannot afford to lose anything or change passwords.

    I've done this zillions of time, the users keep the same account and password. As I suggested, before you start, try with a test domain! Or at least create a test mail account to know where the data goes (/home.../mail) and the password auth goes (/home/.../etc)

    Careful, you can not have the same mail account in 2 cpanel accounts. If you move it to a new one, you have to delete it from the previous one.