How to install and use IMAPSYNC on Ubuntu

IMAPSYNC is an incredible utility to migrate email accounts between different servers. It just works.

Problem is the installation is slightly more cumbersome than usual, and the syntax for the uninitiated rather intense.

This article aims to address these two issues.

Let’s kick of with the installation. There’s no official guide except an INSTALL.Ubuntu.txt file on their Github repo. This appears to be outdated since when running the final make install command it actually already copies the binary to the correct place. So our reduced instruction set combines what we see on the Github repo with a beautiful article from Tecadmin.net

Please note the elaborate apt-get command below actually needs to be used as is. All those backslashes are natural bash command line breaks and included to nicely split the screen per library.

sudo apt-get install \
libauthen-ntlm-perl \
libclass-load-perl \
libcrypt-ssleay-perl \
libdata-uniqid-perl \
libdigest-hmac-perl \
libdist-checkconflicts-perl \
libencode-imaputf7-perl \
libfile-copy-recursive-perl \
libfile-tail-perl \
libio-compress-perl \
libio-socket-inet6-perl \
libio-socket-ssl-perl \
libio-tee-perl \
libmail-imapclient-perl \
libmodule-scandeps-perl \
libnet-dbus-perl \
libnet-ssleay-perl \
libpar-packer-perl \
libreadonly-perl \
libregexp-common-perl \
libsys-meminfo-perl \
libterm-readkey-perl \
libtest-fatal-perl \
libtest-mock-guard-perl \
libtest-mockobject-perl \
libtest-pod-perl \
libtest-requires-perl \
libtest-simple-perl \
libunicode-string-perl \
liburi-perl \
libtest-nowarnings-perl \
libtest-deep-perl \
libtest-warn-perl \
make \

Next we install quite a few Perl libraries

sudo cpanm Crypt::OpenSSL::RSA Crypt::OpenSSL::Random --force
sudo cpanm Mail::IMAPClient JSON::WebToken Test::MockObject 
sudo cpanm Unicode::String Data::Uniqid

Please note the --force If you get errors on that line, run it without --force because there is a good chance the library is already installed first time around in spite of an error.

Our last few steps download IMAPSYNC from Github, and compiles it.

git clone https://github.com/imapsync/imapsync.git
cd imapsync
mkdir -p dist
sudo make install

Viola! Installation done. Now for some use cases:

imapsync --host1 imap.source.example.com \
--user1 [email protected] \
--password1 S0urcePassw0rd \
--ssl1 \
--host2 imap.dest.example.com \
--user2 [email protected] \
--password2 Dest1nat10NPassw0rd \

If that’s a bit baffling and cumbersome, use our easy peasy spreadsheet which allows you to generate these commands for a number of users at once by only filling in the usernames and passwords.

Vander Host IMAPSync Demo Spreadsheet



Share this article

Share on facebook
Share on twitter
Share on linkedin

Leave a Reply

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

Scroll to Top