Easily move an email account from one cPanel server to another

Keith Curreri - Blog Headshot

By Keith Curreri on August 21, 2014

Moving an email account (including old emails) from one cPanel server to another is pretty easy to do yourself if you have some knowledge of cPanel and FTP.

I will be using the terms OLD SERVER and NEW SERVER a lot in this article. Below are the definitions:

OLD SERVER = Server that the email account is currently on and will soon be moved from

NEW SERVER = Server that you want to move the email account to

Step 1: Create a new email account on the NEW SERVER with the same address and password

You can do this by going into the cPanel on the NEW SERVER and click on Email Accounts.

Step 2: Download the files off of the OLD SERVER

FTP onto the OLD SERVER and download the files needed. From the root directory, go to “mail/domain.com/emailAccount”. Here you will see a bunch of files. All you really need to copy are the new and cur directories.

If you have a lot of emails this could take a while.

Step 3: Transfer files to NEW SERVER

When the files are downloaded in step 2 place the new and cur directories in the “root/mail/domain.com/emailAccount” of the respective account on the NEW SERVER. The folder should already be created since you already created the account in step 1.

Go get some coffee. This step will take awhile as well.

Step 4: Reset Mail Quota

Now if you check the NEW SERVER you will see that your emails are transferred but your quota says 0/xxx MB. To update a wrong mail quota in cPanel: FTP to the OLD SERVER, open up the maildirsize file at “root/mail/domain.com/emailAccount” and copy all of the contents and paste them into the maildirsize file on the NEW SERVER.

You may have luck copying the maildirsize file on the OLD SERVER and pasting it on the NEW SERVER, however this did not work for me.

Step 5: Change DNS

If you followed all of the steps up to this point you should have all the files transferred, but you still need to point your DNS records to the NEW SERVER in order to have mail go there. When you update your records it could take up to 24 hours to take effect.

Step 6: Test

Finally, send a test email to the account. If that works send an email from the account. You’re done!

Leave a Reply

35 Comments on "Easily move an email account from one cPanel server to another"

Notify of
avatar
rg

Nice. But I think to retain the passwords , you have to move the /etc files as well

karl

It worked! Thank you!

John De Guzman

Thanks! Had a friend who asked me to help him with this. Glad to have found this. It saved me time instead of me doing it or having to create an instruction for him on how he can migrate his email.

Saminu Eedris

Wow….This works like MAGIC.

This is so amazing and thanks for making such a helpful post.

God bless you man.

Priya

I was exactly looking for this… Thanks for sharing. we have wasted lots of time doing manual export using Horde and Round cube 🙁

Aksam Zarook

Thank you. Your solutions worked perfectly. Have you got any idea why cPanel forum etc. doesn’t mention this method to transfer email accounts from one host to another? This obviously works and easier than manual transfer through outlook downloading etc.

Zubaer

Hi Keith,

Thanks for this cool article. I was looking for an easy and efficient way to transfer emails from old server to new.

Hansol

It worked perfectly, saved me all the stress of going through migration process through hosting company.

Thank you 🙂

Themis

I am migrating to my home server , and you just saved 10 years of my email history 🙂
Thank you , it worked like a charm.

Keith

Great!! Glad I could help!

Srikanth

Thanks mate! This worked as simple as that.

I manually editted the maildirsize and finally it worked on displaying correct quota usage.

Thanks

Karen Callahan

Great instructions, Keith. Saved me a bundle of time. THANKS!

Keith

Hey Karen!

So glad I could help!

-Keith

edmund browne

Thanks amigo Keith. Your instructions is bang on. If you wanted a valuation of how much your advice is worth, I would say it is worth £50.00 or $99.00.
That is how much my host server company wanted to charge me. Thanks for your blog. God bless you.

Keith

Haha, great Edmund! Glad I could help and save you some money!

ese

Very straight-forward and accurate! Thanks Keith.

Keith

Glad I could help!

Aaron

Great post! I just had to do this today with a couple of accounts. To also note, if a user has about 30 folders in the inbox, you’ll have to transfer the (DOT) files too, like .Deleted Messages, .Junk Folder, etc… Whatever else they have in their account. I basically just copied all of the folders over, as well as the maildirsize file too. Worked PERFECTLY!

Thanks!

Keith

Thanks Aaron, happy to hear that it went smoothly. Thanks for letting me know about the DOT files.

Dan

Hey Dude, thanks for sharing!

I’m in the middle of moving my photography website (www.studioinfocus.it) from one hoster to another and your guide was really usefull. I only have one question: what do you mean when you say that I have to change DNS after moving all the files? How do I do that?

Thanks again and cheers from Italy!

Corneille Towendo

Hi Bro,
Greetings from Accra, Ghana. Very nice post and straight to the point. That’s what I was looking for.
Cheers.
Thanks a lot 😉 .

Keith

Glad I could help!

Keith

Hi Dan!

Glad everything went smoothly for you!

When I say to change the DNS I mean to make sure you change where your domain name points. Just make sure that your domain is pointing to the new server or else email will keep going to your old server.

Thanks!
Keith

Dennis

Man, thanks.

Now i can do it all by myself!

Thanks again!

Keith

Awesome!!

Dana

You’re a freakin’ genius. Thank you. Worked seamlessly. 🙂

Keith

Awesome! Happy to help

Web Developer Indonesia

Thank you very much for sharing this article.
I just successfully moved my site – complete with emails – to another cpanel host.

Aniway, I didn’t reset the mail quota, but the cPanel automatically count it right. Nice!

Keith

Great news! Glad I could help.

-Keith

vaishak

Hi Is it possible to do the same for a horde email. I need to move to yahoo small business

Keith

Yep, it will work with Horde, roundcube, and SquirrelMail.

Antonie

Thank you, this is a great article!
Easy to follow and it is actually quite easy to do especially if you do it over SSH.

It seems like it wasn’t necessary to update the quotes though, cPanel did that automatically after a few minutes.

Keith

Thanks Antonie, glad I could help.

The mail quota gave me some issues, but it could have just been that I got impatient and didn’t wait long enough. Either way, looks like both options work!

-Keith

Adrienne
Hi Keith, I saw your comment over at Mitch’s place and thought I would drop by your blog for a visit. Great post and great information even for the non-techie people like myself. I really hope I never have to change hosting services because I love where I am. They would do all this work for me though if needed but it’s always good to know how this can be done and that really did seem rather easy. Thanks for these instructions and I’ll be sure to pass them along to my friends as well. I have a feeling they… Read more »
Keith

Hi Adrienne,

Thanks for visiting. I’m glad that everything sounds simple to do, that’s what I’m aiming for!

Thanks again!
Keith

wpDiscuz