Imapsync is an IMAP transfer tool used for shifting mail boxes and e-mails from one IMAP server to another IMAP server.
Imapsync program is a comman line tool that allows step-by-step and recursive IMAP exchanges from one mail box to another, both anywhere on the internet or in your LAN.
Step 1 – Install Imapsync
Imapsync package is available under EPEL package repository. First make sure you have added EPEL on your system, if not install it first.
yum install epel-release
Once done, install imapsync package using following command.
yum install imapsync
At this level, your system is ready to migrate all data from one email account to other email accounts using IMAP.
Step 2 – Transfer Emails with IMAP
Before migration make sure both accounts have IMAP running and accessible from your system. After that use following command:
imapsync --host1 imap.source.example.com \ --user1 user@example.com \ --password1 S0urcePassw0rd \ --ssl1 \ --host2 imap.dest.example.com \ --user2 user@example.com \ --password2 Dest1nat10NPassw0rd \ --ssl2
The command can take some time depends upon the size of your source Mailbox. After completing all process, you will see a long list of output. Read the output carefully to see if any error occurred during transfer. If command goes well , you will gte the result as below:
Total bytes transferred : (86.536 KiB) Total bytes duplicate host1 : 0 (0.000 KiB) Total bytes duplicate host2 : 0 (0.000 KiB) Total bytes skipped : 0 (0.000 KiB) Total bytes error : 0 (0.000 KiB) Message rate : 0.1 messages/s Average bandwidth rate : 4.0 KiB/s Memory consumption : 256.0 MiB Biggest message : 57947 bytes (56.589 KiB) Memory/biggest message ratio : 2927.0 Start difference host2 - host1 : -2 messages, -78373 bytes (-76.536 KiB) Final difference host2 - host1 : 0 messages, 0 bytes (0.000 KiB) Detected 0 errors
That’s all we have to do. You also like to know about CentOS / Redhat Boot Partition Full – Remove Old Kernels. Please check and give your opinion below if you experience any issues or to discuss your ideas and experiences.