Migrating emails from one mailbox to another could be a very frustrating task.
Luckily there is a free tool called “imapsync” which uses as a proxy that will fetch your emails from the old mailbox and will push them to the new one, and that’s basically a straightforward IMAP-based migration.
Let’s start with installing –
yum install epel-release yum install imapsync
Execute it from the shell with the appropriate variables –
imapsync --host1 OLD_HOST_IP \ --user1 OLD_MAIL_BOX \ --password1 OLD_MAIL_BOX_PASSWORD \ --ssl1 \ --host2 NEW_HOST_IP \ --user2 NEW_MAIL_BOX \ --password2 NEW_MAIL_BOX_PASSWORD \ --ssl2
If the connection is using SSL/TLS, use the flag “ssl”. This will default to port 993.
If the connection is using STARTTLS, use the flag “tls”. This will default to port 143.Tags: Emails, IMAP