Easily move an email account from one cPanel server to another Print

  • 0

Email Account Migration Between Servers

Moving an email account (including old emails) from one hosting server to another is manageable if you have some knowledge of control panels and file transfer methods.

I will be using the terms SOURCE SERVER and DESTINATION SERVER frequently in this article. Below are the definitions:

SOURCE SERVER = Server that the email account is currently on and will soon be moved from
DESTINATION SERVER = Server that you want to move the email account to

Step 1: Create a new email account on the DESTINATION SERVER with the same address and password
You can do this by accessing the control panel on the DESTINATION SERVER and navigating to Email Accounts. Create an account with identical email address and password as the one on the source server.

Step 2: Download the email files from the SOURCE SERVER
Connect to the SOURCE SERVER via SFTP/FTP and download the necessary files. From the root directory, navigate to the mail directory structure, typically following a path like "mail/domain.com/emailAccount". Here you will see various files and directories. The essential directories to copy are typically the "new" and "cur" directories which contain the actual email messages.

If you have a substantial number of emails, this transfer process may take considerable time depending on your connection speed and the volume of data.

Step 3: Transfer files to DESTINATION SERVER
When the files are downloaded in step 2, place the "new" and "cur" directories in the corresponding location on the DESTINATION SERVER at "mail/domain.com/emailAccount". The folder structure should already exist since you created the account in step 1.

This transfer step will also require time, particularly for larger email collections.

Step 4: Update Mail Storage Quota Information
After transferring emails, you may notice that the email quota display shows 0/xxx MB. To correct this and update the mail quota information in the control panel: Connect to the SOURCE SERVER via SFTP/FTP, locate the "maildirsize" file at "mail/domain.com/emailAccount" and copy its contents. Then paste this information into the corresponding "maildirsize" file on the DESTINATION SERVER.

Note: While you could attempt to copy the entire "maildirsize" file between servers, this method may not work consistently across different server configurations.

Step 5: Update DNS Records
If you have completed all previous steps successfully, you will have all email files transferred, but you still need to update your DNS records to point to the DESTINATION SERVER to ensure new mail is delivered to the correct location. When you update your MX (Mail Exchange) records, allow up to 24-48 hours for these changes to propagate throughout the internet.

Step 6: Testing
Finally, conduct thorough testing:

  1. Send a test email to the migrated account from an external email address

  2. Send a test email from the migrated account to an external address

  3. Check that all folders and historical emails are accessible

  4. Verify that email sending and receiving work correctly

Additional Considerations:

  • Before Starting: Ensure you have adequate storage space on the destination server

  • During Transfer: Avoid making changes to email accounts on either server

  • Permissions: Verify file permissions are correctly set on the destination server

  • Alternative Methods: Some control panels offer built-in migration tools that may simplify this process

  • Backup: Always maintain backups of your email data before beginning migration

Troubleshooting Tips:

  • If emails don't appear, check file permissions in the mail directories

  • If quota doesn't update, you may need to manually calculate and set the quota

  • If DNS changes cause issues, verify MX record priority settings

  • If some emails are missing, ensure you transferred all relevant directories (including "tmp" if necessary)

Complete! Your email account migration should now be finished with all historical emails preserved and accessible on the new server.


Was this answer helpful?

« Back