User Migration: Difference between revisions

No edit summary
 
(291 intermediate revisions by 45 users not shown)
Line 1: Line 1:
Migration from one mail system to another is often painful. It can result in a user having to look in two different places to find mail, or in the worst case mail disappearing.
{{BC|Community Sandbox}}
__FORCETOC__
<div class="col-md-12 ibox-content">
=User Migration=
{{KB|{{Unsupported}}|{{ZCS 8.0}}|{{ZCS 7.0}}|}}
{{WIP}}


Copying the contents of one mail system to another often seems like a good idea, that way if anything goes wrong at least the old mail is still available. Ideally you know exactly what you are going to do at the start, you move everything across, and then you kill the old mail system (or at least make it not visible from mail clients).  That way users are not confused by having two sets of identical folders.
{{Archive}}{{WIP}}


In reality you may have to learn on the job. After user data has been migrated to Zimbra, users can access their mail via the web client without any additional setup until their mail client has been configured to access the Zimbra server.
First, note that you'll want to create accounts in Zimbra first before you do the migration. If you want to do it in one shot, read [[Bulk Provisioning]].


Migrating your users means you're going to have to deal with [[Mail Migration|mail]],  [[Calendar and Contacts Migration|calendar, contacts]]  and [[Password Migration|passwords]]. This page used to be one monolithic monstrosity -- but has now been broken down into separate pages:


== Bulk Creating the Accounts ==
* [[Mail Migration]]
* [[Outlook NK2 Cache Rebuild]]
* [[Calendar and Contacts Migration]]
* [[Password Migration]]
* [[Email Rules Migration]]
* [[Aliases file Migration]]
* [[Migrating_from_Postfix_and_MySQL_with_bash|Postfix+MySQL aliases and accounts migration]]
* [[Migrating_from_Dovecot_passwd_with_bash|Migrating from Dovecot passwd]]
* [[Zimbra to Zimbra Server Migration]]
* [[Prevent duplicates messages for POP3 users post migration]]


The first step in migrating users is to create the accounts, this is a topic of its own at [[Bulk Create]]
Please see [http://wiki.zimbra.com/index.php?title=User_Migration_Troubleshooting User Migration Troubleshooting] if you are having problems migrating data to your Zimbra installation.


== Migrating from an existing IMAP server (Recommended Method) ==
[[Category:Migration]]
 
{{Article_Footer|Zimbra Collaboration Suite 7.0|3/7/2006}}
Currently, the recommended method for migrating users to Zimbra from an existing IMAP server is with the [http://freshmeat.net/projects/imapsync/ imapsync] tool written by Gilles Lamiral. The following guide to imapsync was originally posted to the forums by GertThiel:
 
Before you can use imapsync you must have both the source IMAP message store and ZCS up running and accessible to user accounts via IMAP. You can check that using an email client before starting the migration. You will need the login names (i.e. email addresses) and passwords for the users to be migrated. In addition, imapsync will not be able to authenticate to the Zimbra server until you enable clear text login for the IMAP service. You can set that option under the IMAP tab of the Global Settings or individual Server settings in the Zimbra Admin Console UI.  There are also a few Perl module dependances, including; Digest::MD5, IO::Socket::SSL,Term::ReadKey, Digest:HMAC. You can install these with your favorite package manager, from RPM's or with cpan. Finally, consider that imapsync will be a heavy load on your CPU and memory; the system running the migration will be less responsive.
 
For this example my existing IMAP server is running on server.gtds.lan and I set up Zimbra on a new machine named zimbra.gtds.lan.
 
    imapsync --nosyncacls --syncinternaldates \
    --host1 server.gtds.lan --user1 yourAccount --password1 yourPassword \
    --host2 zimbra.gtds.lan --user2 yourZimbraAccount --password2 yourZimbraPassword
 
Of course the complete command belongs on one line (signified by the backslashes: \).
 
A slightly more secure method is to write each password into a seperate file, and then use the --passfile{1|2} options intead of the --password{1|2} options:
 
    imapsync --nosyncacls --syncinternaldates \
    --host1 server.gtds.lan --user1 yourAccount --passfile1 yourPasswordFile \
    --host2 zimbra.gtds.lan --user2 yourZimbraAccount --passfile2 yourZimbraPasswordFile
 
If your old IMAP server doesen't support NAMESPACE you have to also add appropriate options for example on iMail 6.0 --sep1 . --prefix1 INBOX. are required. 
 
You may interrupt imapsync at any time with CTRL-C. Simply restart the same command again to resume the migration. You can also run it more than once to sync changes for a staged migration.
 
I used imapsync to migrate from a Cyrus IMAPd to Zimbra. The [http://www.linux-france.org/prj/imapsync/README ReadMe] lists a number of other IMAP servers compatible with imapsync.
 
=== SSL ===
 
You can also do SSL version of imapsync, by calling the "imapsync-ssl" and providing "--ssl1" and/or "--ssl2" for each of the accounts you wish to migrate.
 
=== Batch Proccessing ===
 
You can automate multiple users by using this script.
 
    #!/bin/bash
   
    logfile="sinklog.txt"
   
    host1=123.123.123.123
    #host1 is Source
   
    host2=321.321.321.321
    #host2 is Dest
   
    domain=xyz.com
    #domain is where email account is
    #everything after @ symbol
   
    ###### Do not modify past here
    #######################################
   
    date=`date +%X_-_%x`
   
    echo "" >> $logfile
    echo "------------------------------------" >> $logfile
    echo "IMAPSync started..  $date" >> $logfile
    echo "" >> $logfile
   
    { while IFS=';' read  u1 p1; do
            user=$u1"@"$domain   
        echo "Syncing User $user"
            date=`date +%X_-_%x`
            echo "Start Syncing User $u1"
            echo "Starting $u1 $date" >> $logfile
    imapsync --nosyncacls --syncinternaldates --host1 $host1 --user1 "$user" --password1 \
    "$p1"--host2 $host2 --user2 "$user" --password2 "$p1"
            date=`date +%X_-_%x`
            echo "User $user done"
            echo "Finished $user $date" >> $logfile
            echo "" >> $logfile
   
            done ; } < userlist.txt
   
    date=`date +%X_-_%x`
   
    echo "" >> $logfile
    echo "IMAPSync Finished..  $date" >> $logfile
    echo "------------------------------------" >> $logfile
 
Now create a CSV file with the user names and passwords in the following format.
 
    user;password
    user2;password2
 
== Migrating from POP3 ==
 
pop2imap is a tool used to get a pop inbox and syncronise it to an IMAP folder. You can get it from [http://freshmeat.net/projects/pop2imap/]
 
It is very similar to imapsync above.
 
    pop2imap  \
    --host1 some.pop.com.au --user1 yourAccount --passfile1 yourPasswordFile \
    --host2 zimbra.imap.com.au --user2 yourZimbraAccount --passfile2 yourZimbraPasswordFile \
    --folder MyOldPOPMail
 
Will copy the INBOX on your pop account to MyOldPOPMail folder.
 
There are some problems with pop2imap though.
 
* It will not create the folder, you must have that manually created
* It does not support SLL, however this is easy to do with "stunnel" - providing the SSL tunnel to the server
* It downloads all of the messages first to get headers, although some pop servers do this well, many do not and this is a very time consuming operation. Modifications to the script are simple to skip this step and force a copy of the mail (technically no longer a sync, but a straight copy).
 
 
== Migrating from Dovecot ==
See [[User_Migration_From_Dovecot_With_External_LDAP]]
 
== Migrating from iMail  ==
 
The first step is to export the users information including the password. I used [http://www.stalker.com/CGMigration/CGIMail.html this] utility
for CommuniGate Pro which creates a fixed length file. I then coverted it to a Tab-Delimited file with [http://files.twihd.com/EDC.exe this utility] so that I could use the [[Bulk Create]] process. After you create your Domains and provision the accounts, turn on IMAP4 for iMail and use the IMAP migration process.
 
== Migrating from Exchange ==
 
There are a least two ways to migrate the content of the individual MS Exchange user. First, is to use Zimbra Wizard. Second, is to export the content of MS Exchange to .pst file and restore it once Zimbra profile is created for a corresponding Zimbra user.
 
== Migrating from Lotus Notes/Domino ==

Latest revision as of 03:11, 11 July 2015

User Migration

   KB 1340        Last updated on 2015-07-11  




0.00
(0 votes)



First, note that you'll want to create accounts in Zimbra first before you do the migration. If you want to do it in one shot, read Bulk Provisioning.

Migrating your users means you're going to have to deal with mail, calendar, contacts and passwords. This page used to be one monolithic monstrosity -- but has now been broken down into separate pages:

Please see User Migration Troubleshooting if you are having problems migrating data to your Zimbra installation.

Verified Against: Zimbra Collaboration Suite 7.0 Date Created: 3/7/2006
Article ID: https://wiki.zimbra.com/index.php?title=User_Migration Date Modified: 2015-07-11



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Jump to: navigation, search