Messages found in host2 not in host1 : 5 messages Messages found in host1 not in host2 : 49 messages Messages found crossduplicate on host2 : 0 Messages transferred : 0 (could be 49 without dry mode) At the end of each imapsync run (with or without –dry), statistics of the migration will be shown. This also helps to verify the given credentials for the mailboxes. The parameter –dry allows to simulate an IMAP migration. It is always wise to first start a mailbox migration with a simulation a.k.a. Additional options (such as verbose output) are available, too. The target is defined by, you guessed it already, by the parameters –host2, –user2 and –password2. A source is defined by using the parameters –host1, –user1 and –password1. Just as rsync, imapsync transfers (migrates) the mails from a source to a target.
If you know rsync, you quickly know how to use imapsync, too. host1 -user1 test1 -password1 secret1 \
"test2" on server "" with password "secret2" "test1" on server "" with password "secret1"
This documentation refers to Imapsync $Revision: 1.977 $ Imapsync - Email IMAP tool for syncing, copying, migrating and archivingĮmail mailboxes between two imap servers, one way, and without duplicates. Once all the required Perl modules are installed, imapsync can be launched and will by default show the help/usage information: ~/build/imapsync-1.977 $. If there are still Perl modules missing, imapsync will exit with an error pointing to the missing module.
Besides already having had a few Perl modules installed, the following modules needed to be installed additionally (package names for Debian and Ubuntu): ~ $ sudo apt-get install libio-tee-perl libmail-imapclient-perl libterm-readkey-perl libunicode-string-perl libreadonly-perl libsys-meminfo-perl libregexp-common-perl libfile-tail-perl libencode-imaputf7-perl However there are a lot of Perl modules which must be installed as requirements of imapsync. The most important file is already existing: imapsync, the program (a Perl script) itself. rw-rw-r- 1 ckadm ckadm 5800 README_Windows.txt Lrwxrwxrwx 1 ckadm ckadm 6 README.txt -> README Lrwxrwxrwx 1 ckadm ckadm 25 INSTALL -> INSTALL.d/ rw-rw-r- 1 ckadm ckadm 29958 index.shtml rwxrwxr-x 1 ckadm ckadm 647598 imapsync* Lrwxrwxrwx 1 ckadm ckadm 21 FAQ -> FAQ.d/ Inside the extracted imapsync folder there are a couple of sub directories and files: ~/build/imapsync-1.977 $ llĭrwxrwxr-x 7 ckadm ckadm 4096 Dec 29 13:53. ~ $ mkdir ~ $ cd ~/build $ wget ~/build $ tar -xzf ~/build $ cd imapsync-1.977/ The newest tar.gz release is downloaded using wget into a directory called "build" and is then extracted using tar. At the time of this writing 1.977 was the newest available released version. It is recommended to use the latest release. Imapsync can be downloaded right from the public git repository on GitHub.
Windows users without knowledge how to build an executable exe file from a Perl source might want to consider this.Īs this tutorial focuses on using imapsync on Linux, we won't cover the usage on Windows or on macOS. However theauthor, Gilles Lamiral, offers additional support and quickly available imapsync for Windows (imapsync.exe), too. The best thing: imapsync is developed as Open Source Software. IMAP, IMAP4 in fact (started December 1994), is one of the three current standard protocols used to access mailboxes, the two other being POP3 (started November 1988) and HTTP (started May 1996) with webmails, webmails are often tied to an IMAP server. The purpose of imapsync is to migrate IMAP accounts or to backup IMAP accounts. On the official website, imasync is described as:
Imapsync is a migration tool for mailboxes using the IMAP protocol.