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!

Did you like this post? Want to get more like it?

Website Redesign Course
Subscribe
Notify of
guest
36 Comments
Inline Feedbacks
View all comments
DJ WebDesigns
DJ WebDesigns
11 months ago

I just want to add my 2 cents here to affirm that the process here works, flawlessly. I have moved three emails from one host to another in the past month. This is the BEST and less COMPLICATED tutorial. I read and watched different tutorials that would make you give up even before you finished reading or watching.

Trust the process here to a T and you will not have a single issue.

Thank you so much!

rg
rg
7 years ago

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

karl
karl
7 years ago

It worked! Thank you!

John De Guzman
7 years ago

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
7 years ago

Wow….This works like MAGIC.

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

God bless you man.

Priya
7 years ago

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
7 years ago

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
7 years ago

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
Hansol
7 years ago

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

Thank you 🙂

Themis
8 years ago

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
Keith
8 years ago
Reply to  Themis

Great!! Glad I could help!

Srikanth
Srikanth
8 years ago

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
Karen Callahan
9 years ago

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

Keith
Keith
9 years ago
Reply to  Karen Callahan

Hey Karen!

So glad I could help!

-Keith

edmund browne
edmund browne
9 years ago

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
Keith
9 years ago
Reply to  edmund browne

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

ese
ese
9 years ago

Very straight-forward and accurate! Thanks Keith.

Keith
Keith
9 years ago
Reply to  ese

Glad I could help!

Aaron
9 years ago

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
Keith
9 years ago
Reply to  Aaron

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

Dan
Dan
9 years ago

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!

Keith
Keith
9 years ago
Reply to  Dan

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

Corneille Towendo
9 years ago
Reply to  Dan

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
Keith
9 years ago

Glad I could help!

Dennis
9 years ago

Man, thanks.

Now i can do it all by myself!

Thanks again!

Keith
Keith
9 years ago
Reply to  Dennis

Awesome!!

Dana
Dana
9 years ago

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

Keith
Keith
9 years ago
Reply to  Dana

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
Keith
9 years ago

Great news! Glad I could help.

-Keith

vaishak
vaishak
10 years ago

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

Keith
Keith
10 years ago
Reply to  vaishak

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

Antonie
10 years ago

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
Keith
10 years ago
Reply to  Antonie

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
10 years ago

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
Keith
10 years ago
Reply to  Adrienne

Hi Adrienne,

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

Thanks again!
Keith

36
0
Would love your thoughts, please comment.x
()
x