User Tools

Site Tools


internet:mail:moving_to_new_mailserver

This is an old revision of the document!


Migrating to a New Mail Server

From a POP Server to an IMAP Server

From IMAP to IMAP

imapcopy

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

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

See also Configure EPEL Repository

yum install imapsync --enablerepo=epel

:!: Imapsync is also available from the RPMForge repository if you already have that repo configured.

Documentation

man imapsync
imapsync --help

General Use

Migrate from 'host1' to 'host2':

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

IMAP to Zimbra Example

:!: The delete2 option deletes messages from the destination that are no longer on the source.

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

Zimbra Administration → Configure → Global Settings → IMAP

imapsync --buffersize 8192000 --nosyncacls --subscribe --syncinternaldates --addheader --delete2 \
   --host1 old.server.tld --ssl1 --port1 993 \
   --user1 oldusername --password1 'oldpassword' \
   --host2 new.server.tld --ssl2 --port2 993 \
   --user2 newemailaddr --password2 'newpassword'

Zimbra to Exchange

  1. For mail message use imapsync
  2. For Contacts in Zimbra web client → Preferences → Import/Export → Outloook Contacts → Choose Source Contacts folder(s) → Export
  3. For Calendars in Zimbra Web Client → Preferences → Import/Export → Calendar → Select Calendar folder(s) - Export
Import Contacts and Calendar to Exchange

In Outlook 2013 with Exchange Account configured

  1. File → Open and Export → Import/Export → Import from another program or file → Comma Separated Values
  2. Browse to csv file, Next → choose duplicates option, Next → Select Contacts folder, Next → Map Custom Fields
  3. In the left pane scroll about halfway down to “EmailAddress”, In the right pane scroll about halfway down to E-mail click + sign E-mail Address.
  4. In left pane drag EmailAddress and drop in right pane on E-mail Address, OK → Finish
internet/mail/moving_to_new_mailserver.1488392226.txt.gz · Last modified: 2017/03/01 11:17 by gcooper