Migrate emails using imapsync
This post explains how to migrate emails using imapsync tool. Imapsync is an IMAP transfers tool. The purpose of imapsync is to migrate IMAP accounts or to backup IMAP accounts.
Please see this post to know how to Install imapsync on CentOS and Ubuntu systems.
Install imapsync on CentOS and Ubuntu
imapsync --host1 <Source Server> --user1 <Source Email ID> --passfile1 <Path of file which includes Password> --host2 <Destination Server> --user2 <Destination Email ID> --passfile2 <Path of file which includes Password>
Here I am migrating an email account “email@example.com” from the source server “server1.grepitout.com” to the destination server “server2.grepitout.com”. Make sure that the email account “firstname.lastname@example.org” is existing on the destination server too.
Store the Source Email ID’s password on file “/root/sourcepasswd” and Destination Email ID’s password on file “/root/destinationpasswd“.
We can execute the following command from Source or Destination server or even any linux mechine which have imapsync tool. So, we don’t need shell access on Source and Destination server to migrate an email account.
imapsync --host1 server1.grepitout.com --user1 email@example.com --passfile1 /root/sourcepasswd --host2 server2.grepitout.com --user2 firstname.lastname@example.org --passfile2 /root/destinationpasswd
If you like this post and wish to receive more articles from us, please like our FB page: Button
Your suggestions and feedbacks will encourage us and help to improve further, please feel free to write your comments.
For more details on our services, please drop us an E-mail at email@example.com