Transfer mailboxes between IMAP servers with imapsync
imapsync is a tool for facilitating incremental recursive IMAP transfers from one mailbox to another. It is useful for mailbox migration, 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.
1. Install imapsync
apt-get install imapsync
Installing Dovecot IMAP and POP daemon with MySql backend
Dovecot is an open source IMAP and POP3 server for Linux/UNIX-like systems, written primarily with security in mind. Dovecot primarily aims to be a lightweight, fast and easy to set up open source mailserver.
It's assumed that you have already installed and configured Postfix according to this tutorial:
Installing Postfix with MySql backend and SASL for SMTP authentication
1. Install required packages
apt-get install dovecot-imapd dovecot-pop3d
Installing Courier POP3 and IMAP daemon with MySql backend
The Courier mail transfer agent (MTA) is an integrated mail/groupware server based on open commodity protocols, such as ESMTP, IMAP, POP3, LDAP, SSL, and HTTP. Courier provides ESMTP, IMAP, POP3, webmail, and mailing list services within a single, consistent, framework. In this tutorial we'll only use the Courier POP3 and IMAP services.
It's assumed that you have already installed and configured Postfix according to this tutorial: Installing Postfix with MySql backend and SASL for SMTP authentication
1. Install required packages
apt-get install courier-authdaemon courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl
Installing Courier POP3 and IMAP services with MySql backend
This tutorial assumes you already have Postfix installed with MySql backend as described in this tutorial: Installing Postfix with MySql backend and TLS
1. Install required packages
apt-get install courier-authdaemon courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl