openSUSE/SLES Tips : Imapsync installation for Email Backup & Synchronization

Imapsync is a tool for facilitating incremental recursive IMAP transfers from one mailbox to another. It is useful for mailbox migration or backup, and reduces the amount of data transferred by only copying messages that are not present on both servers. Read, unread, and deleted flags are preserved, and the process can be stopped and resumed. The original messages can optionally be deleted after a successful transfer.

imapsyncImapsync is one very useful tool because it can be used to perform backup and synchronization of all email content, both structure and content. For example, if we have an inbox, sent items, drafts, trash, etc in the old mail server, we can copy the structure and content seamlessly into the new mail server. Imapsync even able to backup a folder other than the default folder, such as copying a folder called “Vavai” and “Urgent”, etc inside my inbox folder.

The following tutorial is the process of installation and usage of Imapsync on SUSELinux Enterprise Server 11 SP 1, although Imapsync can be run in almost all Linux systems.


Run the following command via the console / terminal:

1.zypper ar perl
2. imapsync
3.zypper ref
4.zypper in imapsync perl-Date-Manip perl-Mail-IMAPClient

Note : I’m using package on openSUSE Build Services to install Imapsync. Do not forget to change the version and type of openSUSE distribution in accordance with your running system.


Here is an example of using Imapsync to synchronize a mailbox from the mail server with an IP to the mail server with an IP (Imapsync can also use server hostname instead of ip address):

1.imapsync - host1 - user1 - passwordbudi password1 - host2 - user2 - password2 passwordvavai - noauthmd5 -ssl1 -ssl2

The above command will copy the mailbox on server to the mailbox on server

Let’s see the user account between primary server and secondary server. As you may notices, Imapsync can be used to copy the email user A to the same mailbox on another server or to a different mailbox on another server


  1. – – follows by words are Imapsync parameters. –user1 means that user account in first server is
  2. Imapsync can be used to synchronize all mail server that supports the IMAP protocol (as the name implies, Imapsync, not POPsync especially lipsync), so it can be used on Postfix+Imap, Sendmail + Imap, Qmail+Imap, MDaemon,Microsoft Exchange etc
  3. Imapsync requires a password for each account to be successfully synchronized.
  4. Imapsync is able to synchronize the password if we know both accounts and password. We have to equate all the passwords if you want to easily synchronize with the command above. Oon some mail servers, we can use Imapsync with the – -authuser to access user mailboxes by using admin privileges.

Leave a Reply

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