Imapsync is a method for synchronizing IMAP-based email between two different servers which can copy data from one mailbox to another, where all the old email inbox data will be migrated/transferred to the new email inbox.
In this case, the email migration process uses the Imapsync CLI, where imapsync on the VM is already installed, if not, you can install it first.
1. Make sure that Imapsync is installed on the VM by:
typing the command imapsync -v or imapsync --version
2. Then go to the webmail where for this case it is an email from the old server, then you can see the contents from
folder which will then be moved to email on the new server. Then make sure Back to
set passwords for both email accounts to facilitate the migration process
3. Then open the terminal and type the following command
imapsync --host1 fakhrizal.my.id --user1 sandy@fakhrizal.my.id --password1 F*********1 --host2 do-it.my.id --user2 tes@do- it.my.id --password2 F*********1 --syncinternaldates --ssl1 -ssl2 --noauthmd5 --split1 100 --split2 100 --exclude All Mail --useheader 'Message-Id '
Information:
--host1 : source domain.example.com
--user1 : email address on source domain
--password1 : password on source domain
--ssl1: if using ssl
--host2 : destination domain.example.com
--user2 : email address on the destination domain
--password2 : destination email password
--ssl2: if using ssl
4. Next the process will run
5. Then the following displays the folder size before and after synchronization
Before sync
After sync
6. Then the last step can be tried logging into the webmail using an account on the new server
and look at the email folder, if there is already the same email content on the previous account in the new account,
means the migration process is complete.
The conclusion is Imapsync requires the old mailbox account password to be synced to the new mailbox, this is very troublesome because we have to first set the password for each account in the old mailbox and then it can be equated for passwords to be synchronized on the new mailbox. , Imapsync is suitable for use for the number of email accounts that are not too many / few, then imapsync also cannot migrate contacts and calendars that have been set previously, but the advantage is that the process can be done incrementally, regularly and recursively to each mailbox folder.