User Tools

Site Tools


internet:mail:moving_to_new_mailserver

This is an old revision of the document!


Moving to a New Mail Server

From a POP Server to an IMAP Server

From One IMAP Server to Another

imapcopy Notes

http://home.arcor.de/armin.diehl/imapcopy/imapcopy.html

IMAPcopy is a small utility that will help you migrate from one IMAP e-mail message store to a another one. I generally try to use this utility from the command line of one of the servers involved in the transfer in order to minimize traffic and time. You can copy many users at once, if you wish.

Installation

IMAPCopy doesn't really require any installation.

wget http://home.arcor.de/armin.diehl/imapcopy/imapcopy.tar.gz
tar -xzvf imapcopy.tar.gz
cd imapcopy

Use

Edit the configuration file for each job:

vi  ImapCopy.cfg

Make it look like:

SourceServer <source-server>
SourcePort 143
DestServer <destination-server>
DestPort 143

# CreateEmptyFolders

skipfolder INBOX.Trash
skipfolder INBOX.Sent
skipfolder "INBOX.Deleted Items"
skipfolder "INBOX.Sent Items"
skipfolder "INBOX.Junk E-Mail"
skipfolder Trash
skipfolder Sent
skipfolder "Sent Items"
skipfolder "Junk E-Mail"
skipfolder "Deleted Items"

DenyFlags "\Recent"

#        SrcUser       SrcPasswd           DestUser        DestPasswd
#        ==========    =============       =============   ==============
#Copy    "bar"         "barsrcpw"          "bar"           "bardestpw"
Copy     "username"    "password"          "newuser"       "newpassword"

Now verify that all users and passwords are correct:

./imapcopy -t

Then transfer the messages if all is well:

./imapcopy

imapsync Notes

http://wiki.zimbra.com/wiki/Guide_to_imapsync

http://wiki.contribs.org/Imapsync

http://www.howtoforge.com/how-to-migrate-mailboxes-between-imap-servers-with-imapsync

http://www.linux-france.org/prj/imapsync/

Imapsync is another tool for migrating IMAP message stores from one server to another.

  • no duplicates
  • restart failed copy
  • command line - no GUI required
  • requires Perl and various modules
  • preferably install on new mail server to minimize network transfers

Install on CentOS 6

Configure EPEL Repository

yum install imapsync --enablerepo=epel

imapsync is also available from the RPMForge repository if you already have that configured.

Documentation

man imapsync
imapsync --help

Use

Migrate from 'host1' to 'host2':

imapsync \
--buffersize 8192000 \
--noauthmd5 \
--host1 old.mail.server \
--user1 olduser \
--password1 oldpassword \
--host2 localhost \
--user2 newuser \
--password2 newpassword

From IMAP to Zimbra example:

:!: You must Enable clear text login in Zimbra and restart the server:

Zimbra Administration → Configure → Global Settings → IMAP

imapsync --buffersize 8192000 --nosyncacls --subscribe --syncinternaldates \
   --host1 old.server.tld --ssl1 --port1 993 \
   --user1 oldusername --password1 oldpassword \
   --host2 new.server.tld --ssl2 --port2 993 \
   --user2 newemailaddr --password2 newpassword
internet/mail/moving_to_new_mailserver.1415585971.txt.gz · Last modified: 2014/11/09 19:19 by gcooper