Mail migration with ImapSync
The following guide describes how to migrate mail from the server to the console server using ImapSync
It all comes down to issuing one command in the console!
First, how to install ImapSync itself on our system.
CentOS system
In the console, issue the command:
1 | yum install epel-release |
1 | yum install imapsync |
The next step is the e-mail migration itself, and here it is really easy! Just give a command in the console:
1 | /usr/bin/imapsync --host1 test1.lamiral.info --user1 test1 --password1 secret1 --host2 test2.lamiral.info --user2 test2 --password2 secret2 |
And exactly:
1 | /usr/bin/imapsync --host1 Obecny_host_poczty --user1 źródłowy_adres_email --password1 Hasło_źródłowego_email --host2 Host_nowego_serwera_poczty --user2 Docelowy_adres_email --password2 Hasło_docelowego_email |
We run it all in the console and wait.
After the operation, we have a log available. We also use the same command to sync the mail.
We can also add variables:
1 | --ssl1 i --ssl2 |
If the mail is encrypted.
The command can be scripted nicely in bash so that we do the migration not only 1 boxes a 10 at once.