Imapsync cPanel – A smart solution for email migration

Table of Contents

One of the hardest part of web migration is to transfer mailboxes without any data loss.

Luckily, free utilities like Imapsync in cPanel eases mail migration to another IMAP server.

It helps to transfer the mailboxes as their original state without altering the mail flags read, sent and unread.

At 1 onlyhost, we often get requests from our customers to migrate email from cPanel to other servers as part of our Server Migration Services.

Today, we’ll see how our Migration Engineers migrate mailboxes from cPanel via Imapsync and fix the related errors.

 

 

What is Imapsync?

Imapsync is migration tool used to transfer the mailboxes one server to another server. However, this can only be used if both servers are IMAP.

A major challenge in mail migration would be the lack of email flags after migration. It make things messy when you have to read all the mails once again and change status. That’s where, our Migration Engineers see Imapsync cPanel method useful.

One of the advantages of this form of migration is that the flags are preserved. That means unread emails will stay unread, read emails will stay read, deleted will stay deleted.

 

How we Install imapsync

Now, let’s see how we install Imapsync on the servers. The exact steps differ based on the flavour of Linux running on the servers.

For example, in CentOS & Fedora servers,

1. We begin the Imapsync installation by adding the EPEL package repository on the system.

yum install epel-release

2. Now, we install imapsync package using the following command.

yum install imapsync

Again, Imapsync support cloud solutions like Docker, AWS, etc. too.

In Docker server, to install or update the imapsync image, we run:

docker pull gilleslamiral/imapsync

Similarly, in Ubuntu servers, we install imapsync dependencies and imapsync program using the root user by running apt-get command.

 

How we migrate emails using Imapsync

Now, let’s see the exact process of mail migration. In fact, for Imapsync mail migration, there are some per-requisites. They are as follows.

  1. IMAP old server name details.
  2. Email accounts should be available under new host.
  3. The details of email accounts, username and password.

To copy the mails, we run the imapsync command as:

/usr/bin/imapsync --host1 oldserver.example.com --user1 user1@example.com --password1  Mypasswd --host2 newserver.example.com --user2 user2@example.com --password2 Mypasswd2

However, it is not safe to manually migrate using basic command that contain clear text password details. As a result, command like ps-aux on the server show passwords in their output.

Therefore, our Migration experts use a secure method to migrate the emails. We save the email accounts and their passwords in files readable only by root user. Again, the format is an email address on the old server, password on the old server, email address on the new server, password on the new server. Each item is separated by a semi-colon. Then, we do migration using a bash shell script that contains pointers to password files.

Moreover, using bash script automates the process and help to reduce the complexity of the migration process. Additionally, this method is highly secure and time-saving.

 

Common problems after cPanel Imapsync migration

Although the Imapsync mail migration process is quite simple, customers often encounter problems after email migration. We’ll now take a look at the top errors and their fixes.

 

1. Without a root access

Recently, one of our customers contacted us to migrate IMAP email accounts from the old cPanel server to a VPS server. But, he didn’t have root access to the old server.

Then, our Support Engineers helps to migrate the IMAP email accounts from cPanel server to the new server via imapsync. For that, we installed imapsync on the new server and created new email accounts too. After that, we copied the email data over using the individual email account details.

 

2. Migrating large Mailboxes

Similarly, when migrating mailboxes customers may face problems like timeout errors. Often, this happens due to the large size of Mailboxes. By default, imapsync often cause timeouts when the migration process continues for a longer period.

To avoid these timeout errors, our Migration Experts switch off the computation of statistics using the following commands.

--nofoldersizes --skipsize --fast

 

After this migration of mails work successfully.

 

[Having trouble while migrating emails to other servers? We’ll fix it for you.] 

 

Conclusion

In short, imapsync method helps to migrate the cPanel mailboxes to another IMAP server​. Today, we saw how our Migration Engineers migrated email from cPanel via Imapsync and fixed related errors.

Leave a Comment

Your email address will not be published. Required fields are marked *

Social Share

Facebook
Twitter
LinkedIn
Telegram

Cheapest Web Hosting

Fasters Web Hosting Promo
Scroll to Top

Launch your Website at RS599

Create a professional website yourself with our domain hosting combo. Get Extra benefits at this Year end Sale with 10% OFF and Enjoy Amazing Deels on Shared Hosting!

Starting at Only RS599/Year

Year End Sale

Hours
Minutes
Seconds

Use Code STARTBIZ at Checkout.

Create an earning opportunity with A Web Hosting Business

Become reseller and start reselling domains, web hosting, ssl certificates and More.

45% OFF

Starting at RS399/Month

Hours
Minutes
Seconds

Use coupon: at the checkout.