Bobcares

Imapsync cPanel – A smart solution for email migration

by | Jul 13, 2019

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 Bobcares, 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.

Migrate cPanel to a new platform!

Looking for changing infrastructure of your server? Let us help you.

Our migration experts can migrate all your accounts to a new platform without data loss.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

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

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF