Skip to main content

Migrate mails between domains on same cPanel Account?

Comments

2 comments

  • cPRex Jurassic Moderator
    Hey there, @MBM92! Welcome to the forums, and to cPanel. While there isn't a specific function within the cPanel product to perform this work, the following steps should let you do this manually. I would recommend using the "rsync" command over SSH as that will ensure directories get properly copied, where as a copy command could accidentally omit directories, or give errors if the directory already exists. In this example we'll use the username "source" to refer to the old account we are moving the emails from, and "destination" to refer to the new account we are transferring data to. 1 - Create the email accounts you need on the destination cPanel account. This will also create the files in the cPanel configuration and the directories you need to copy the files to. 2 - Copy the files from the source account to the destination account. The directories will look something like this: /home/source/mail/sourcedomain.com/emailuser /home/destination/mail/destination.com/emailuser For example, if you were using the rsync command on the server's command line, that would look something like this: rsync -avh /home/source/mail/sourcedomain.com/emailuser/* /home/destination/mail/destination.com/emailuser/ 3 - Change the ownership of the mail files so they match the destination owner. Since all those files we just rsync'd will be owned by the "source" user, we'll want to change that so they are owned by the "destination" user. The following command would make that change: chown -Rf destination:destination /home/destination/mail/destination.com/emailuser At this point I would expect the emails to show up properly under their respective accounts. I hope this information has been helpful but let us know if you have any other questions!
    0
  • tui
    Im trying to use this guide to migrate mails from one account to another (same cpanel account and same domain just new mail account) but it dont work, after the rsync finish roundcube and horde shows a error o the new account and its unable to see mails and folders im doing this 1) create new account 2) rsync -avh /home/user/mail/domain.com/oldemailuser/* /home/user/mail/domain.com/newmailuser/ a client is asking me to change their mail from his own account to a new account, he dont want to use the old email account anymore because is very large and he wants to use a shorter mail account im using mdbox
    0

Please sign in to leave a comment.