How to install and use imapsync on Debian

logo_imapsync

imapsync is a convenient CLI tool that allows migration of emails from one inbox / server to another while using the IMAP protocol.

The author of this tool decided to sell the sources for 50 bucks.. someone bought the sources pushes it on Github .. because imapsync isn’t available in Debian’s repositories anymore.

Installing imapsync on Debian is quite straightforward:
apt-get install makepasswd libunicode-string-perl libmail-imapclient-perl libio-tee-perl libterm-readkey-perl git
git clone https://github.com/imapsync/ imapsync.git
cd imapsync
mkdir dist
> ./dist/path_1.644.txt
make install

Using imapsync doesn’t require a complicated tutorial :
To synchronise content from the account “foo” on server “imap.truc.org” to account “bar” on “imap.trac.org” with foo’s password being “secret1” and bar’s being “secret2”:

imapsync \
--host1 imap.truc.org --user1 foo --password1 secret1 \
--host2 imap.trac.org --user2 bar --password2 secret2

If you were to migrate emails between Google accounts, the command line can look as follows :
imapsync --syncinternaldates --host1 imap.gmail.com --port1 993 --ssl1 --user1 [email protected] --password1 MOTDEPASSE1 --host2 imap.gmail.com —port2 993 --ssl2 --user2 [email protected] --password2 MOTDEPASSE2 --useheader 'Message-Id' --skipsize --noauthmd5 --reconnectretry1 1 --reconnectretry2 1 --authmech1 LOGIN --authmech2 LOGIN

Tags: ,

Leave a comment