====== Migrating to a New Mail Server ====== ===== From Exchange to Exchange ===== **Walkthrough**: https://www.petenetlive.com/KB/Article/0000788 ===== From a POP Server to an IMAP Server ===== http://www.linux-france.org/prj/pop2imap/ ===== From IMAP to IMAP ===== ==== imapcopy ==== ''imapcopy'' is a very small and simple tool. It does **not** support SSL or TLS, limiting its usefulness on modern IMAP servers. 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 SourcePort 143 DestServer 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://www.howtoforge.com/how-to-migrate-mailboxes-between-imap-servers-with-imapsync http://www.linux-france.org/prj/imapsync/ Imapsync is a great 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 Ubuntu === ''imapsync'' is a fantastic tool, but it is **not trivial to install on Ubuntu**. While it is very convenient to have ''imapsync'' installed and run from your mail server, it might be better to install it on a separate workstation due to the large number of dependencies. https://gist.github.com/nosmall/1306659d714e2c07810ba2cfc511fee5 https://github.com/imapsync/imapsync/blob/master/INSTALL.d/INSTALL.Ubuntu.txt === Install on CentOS 6 === See also **[[computing:linux:epel|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 === - For **mail messages** * Use imapsync - For **contacts** * Use Zimbra Web Client (ZWC) * Preferences -> Import/Export -> Outloook Contacts -> Choose Source Contacts folder(s) -> Export - For **calendars** * Use ZWC * Preferences -> Import/Export -> Calendar -> Select Calendar folder(s) -> Export == Import Contacts and Calendar to Exchange == In Outlook 2013 with Exchange Account configured: - File -> Open and Export -> Import/Export -> Import from another program or file -> Comma Separated Values - Browse to ''csv'' file, Next -> choose duplicates option, Next -> Select Contacts folder, Next -> Map Custom Fields - 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. - In left pane drag EmailAddress and drop in right pane on E-mail Address, OK -> Finish