Debian Tutorials Copy/Paste tutorials for Debian based Linux distros

27Apr/101

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

2. Sync the mailboxes

imapsync --host1 {host1} --user1 {user1} --password1 {password1} --host2 {host2} --user2 {user2} --password2 {password2} --subscribe

{host1}: The source mail server's host or ip address
{user1}: User name on the source mail server
{password1}: Password on the source mail server
{host2}: The destination mail server's host or ip address
{user2}: User name on the destination mail server
{password2}: Password on the destination mail server

When moving between different server software you may need to add or remove prefixes. For example when moving from dovecot to courier you need to add this parameter to remove the INBOX. prefix from the folder names: --prefix1 INBOX.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Reddit
  • StumbleUpon
  • Technorati
  • email
  • Live
  • Slashdot
  • LinkedIn
  • Print
  • Tumblr
  • Twitter
  • Netvibes
  • Netvouz
  • PDF
  • Yahoo! Bookmarks
Tagged as: , Leave a comment
Comments (1) Trackbacks (0)
  1. NB: imapsync is no longer distributed by Debian, see bug 609845

    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=609845


Leave a comment


No trackbacks yet.