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
You can do this by going into the cPanel on the NEW SERVER and click on Email Accounts.
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.
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.
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.
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.
Finally, send a test email to the account. If that works send an email from the account. You’re done!
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!
Nice. But I think to retain the passwords , you have to move the /etc files as well
It worked! Thank you!
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.
Wow….This works like MAGIC.
This is so amazing and thanks for making such a helpful post.
God bless you man.
I was exactly looking for this… Thanks for sharing. we have wasted lots of time doing manual export using Horde and Round cube 🙁
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.
Thanks for this cool article. I was looking for an easy and efficient way to transfer emails from old server to new.
It worked perfectly, saved me all the stress of going through migration process through hosting company.
Thank you 🙂
I am migrating to my home server , and you just saved 10 years of my email history 🙂
Thank you , it worked like a charm.
Great!! Glad I could help!
Thanks mate! This worked as simple as that.
I manually editted the maildirsize and finally it worked on displaying correct quota usage.
Great instructions, Keith. Saved me a bundle of time. THANKS!
So glad I could help!
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.
Haha, great Edmund! Glad I could help and save you some money!
Very straight-forward and accurate! Thanks Keith.
Glad I could help!
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 Aaron, happy to hear that it went smoothly. Thanks for letting me know about the DOT files.
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!
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.
Greetings from Accra, Ghana. Very nice post and straight to the point. That’s what I was looking for.
Thanks a lot 😉 .
Glad I could help!
Now i can do it all by myself!
You’re a freakin’ genius. Thank you. Worked seamlessly. 🙂
Awesome! Happy to help
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!
Great news! Glad I could help.
Hi Is it possible to do the same for a horde email. I need to move to yahoo small business
Yep, it will work with Horde, roundcube, and SquirrelMail.
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.
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!
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 »
Thanks for visiting. I’m glad that everything sounds simple to do, that’s what I’m aiming for!