Synchronize emails with imapsync


There is a way to have two or more Imap servers synchronized, an example would be: If the email [email protected] receives an email, the email [email protected] also receives it, which is on a completely different server, in a few words will duplicate the mail on both servers, in case some are down, the others will work.

The first thing you should do is install imapsync, we recommend installing it on a Ubuntu or Debian computer, NEVER ON PRODUCTION SERVERS, unless you know what you do

The commands for its installation will be:

log in as administrator user

its

enter the folder in which it will be installed

cd / usr / src /

update repositories and make sure we have git

apt-get update && apt-get install git-core

download the git repository where the imapsync code is

git clone https://github.com/imapsync/imapsync.git

enter imapsync

cd / usr / src / imapsync /

Install the necessary packages (they could vary depending on the system or version)

apt-get install libauthen-ntlm-perl libcrypt-ssleay-perl libdigest-hmac-perl libfile-copy-recursive-perl libyan-compress-perl \ libyan-socket-inet6-perl libyan-socket-ssl-perl libyan-tee- perl libmail-imapclient-perl libmodule-scandeps-perl libnet-ssleay-perl \ libpar-packer-perl libterm-readkey-perl libtest-pod-perl libtest-simple-perl libunicode-string-perl liburi-perl

the installation is done with perl

cpan Data :: Uniqid

we make sure that imapsync is available from any directory

cp / usr / src / imapsync / imapsync / usr / bin /

we verify the version

imapsync -v

We already have the application ready, here is an example of execution:

Example

imapsync --host1 imap.host1.com --user1 [email protected] --password1 XXX --host2 imap.host2.com --user2 [email protected] --password2 XXX --port2 993 --ssl1 - ssl2
Previous Use DNS to optimize migrations
Next Install Zabbix

No Comment

Leave a reply

Your email address will not be published. Required fields are marked *