[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [imapsync] Migration with IMAPSync


From Gilles LAMIRAL <gilles dot lamiral at laposte dot net>
Subject Re: [imapsync] Migration with IMAPSync
Date Mon, 23 Jun 2014 19:10:18 +0200

Hi Julien,

http://imapsync.lamiral.info/FAQ

======================================================================
Q. How to migrate from or to Exchange 2003 with an admin/authuser
   account?

R. Thomas Edgar wrote the following

In case you can glean something from this snippet which allowed us
to migrate from Exchange 2003 t0 Cyrus Imap 2.4 (you would reverse
the flow to go the other way):

  imapsync --dry --host1 ExchangeServer.mycompany.com \
    --user1 Some dot User at mycompany dot com --authuser1 ExchangeAdminAccount \
    --proxyauth1 --password1  PWCHANGED \
    --host2 cyrusimapbackend.mycompany.com \
    --user2 SameOrDiffererentUser at mycompany dot com \
    --authuser2 CyrusAdminAccount --proxyauth2

We also needed to:

- Ensure the Exchange Admin Acct had IMAP4 enabled in it's
  profile (it initially didn't!)
- Ensure the Some.User Exchange Acct had IMAP4 enabled
  in it's profile (it initially didn't!)
- Add the CyrusAdminAccount to admins line in /etc/imapd.conf
- Give CyrusAdminAccount lrswipkxtecda to the Cyrus Imap account
  being migrated to (- or in your case, from)

In case you are not aware:

- It will prompt for a password if you don't supply it
- the domain part of the fully-qualified email could be
  omitted in our case
- Use --debugimap when testing initial connectivity, if necessary

======================================================================
Q. How to migrate from or to Exchange 2007/2010 with an
   admin/authuser account?

R. The tricks comes from Michele Marcionelli and Benjamin Priestman:

This doesn't work:
  imapsync ... --user2 user2 --authuser2 admin2 --password2  PWCHANGED ...

This might works:
  imapsync ... --user2 "domain\admin2\user2" --password2  PWCHANGED ...
or
  imapsync ... --user2 "admin2 at domain\user2" --password2  PWCHANGED ...

where "domain" is set be the user's UPN in Active Directory
or the NETBIOS or DNS name of the domain.

The exact format might vary depending on local configuration and you
should experiment with the different formats.

A little note from Michael Scherer.
The previous workaround in the FAQ seems to be obsolete.
I can confirm that

  imapsync ... --host2 exchange_server --authmech2 PLAIN \
               --authuser2 admin at domain --user2 user_alias

is working without any glitches, running Exchange 2010 SP2 here.
Explanation, Exchange knows a) about a username
and b) about a mailNickname which can be different to the username.
As it seems you need to use the mailNickname (e.g. alias) defined
for user2, not the username itself.
http://blogs.technet.com/b/exchange/archive/2004/03/31/105275.aspx


A little note from John Becker. After you pointed out that I had issues with authorization, I realized that as an admin user I don't have all the rights on the mailboxes. So I added myself to the user mailbox with full rights. I also changed the login type on the Exchange CAS to type 1, plain text. The command that I used for imapsync is: imapsync ... ^ --host2 exchange-server ^ --user2 "windows-domain\admin-user\aaaa" ^ --password2 PWCHANGED ...

======================================================================
Q. How to migrate from or to Office 365 with an admin/authuser account?

Note from Yago Torres Fernandez:
(a working command using admin/authuser on host2 Office 365)

  imapsync ... --authuser2 user_admin at domain dot com --user2 user_to_be_migrated at domain dot com  ^
               --password2  PWCHANGED --ssl2 --exclude "Shared Folders"     ^
               --regextrans2 "s#Trash$#Papelera#"  --regextrans2 "s#^Deleted Items$#Papelera#"

but previous in Office365 you must do something like that, using powershell:

Add-MailboxPermission -identity user_to_be_migrated at domain dot com -user user_admin at domain dot com -accessrights fullaccess -inheritancetype all

======================================================================


Le 23/06/2014 15:35, Julien_Chaussidon at DELL dot com a écrit :
Hello,

I’m using the IMAPSYNC tool in order to migrate mailboxes from IMAP Cyrus server toward Exchange 2013 server.

I tried these commands line from the example :

/.\imapsync.exe --host1 MyCyrusServer --user1 mailbox at domain dot com --authuser1 AdminAccount --password1 PWCHANGED ^/

/ --host2 MyExchangeServer --user2 mailbox at domain dot com --authuser2 AdminAccount2 --password2 PWCHANGED MyPassword " --ssl2/

The result seems to work well, but it doesn’t find any messages to transfer, does anyone has an idea ?

/Transfer started at Mon Jun 23 15:11:50 2014/

/PID is 836/

/Log file is LOG_imapsync/2014_06_23_15_11_50_ mailbox at domain dot com dot txt/

/$RCSfile: imapsync,v $ $Revision: 1.592 $ $Date: 2014/05/22 10:03:17 $ /

/Here is a [MSWin32] system (Windows NT mymachine 6.1 Build 7601 (Service Pack 1) amd64)/

/With perl 5.18.2 Mail::IMAPClient 3.35/

/Command line used:/

/C:\imapsync-master_1.592\imapsync-master\imapsync.exe --host1 MyCyrusServer --user1 mailbox at domain dot com --authuser1 AdminAccount --password1 PWCHANGED --host2 MyExchangeServer --user2 mailbox at domain dot com --authuser2 AdminAccount2 at domain dot com --password2 PWCHANGED --ssl2/

/Temp directory is C:\Users\ADMINI~1\AppData\Local\Temp\2/

/PID file is C:\Users\ADMINI~1\AppData\Local\Temp\2/imapsync.pid/

/Modules version list:/

/Mail::IMAPClient 3.35/

/IO::Socket 1.36/

/IO::Socket::IP 0.29/

/IO::Socket::INET 1.33/

/IO::Socket::SSL 1.993/

/Net::SSLeay 1.64/

/Digest::MD5 2.53/

/Digest::HMAC_MD5 1.01/

/Digest::HMAC_SHA1 1.03/

/Term::ReadKey 2.31/

/Authen::NTLM 1.09/

/File::Spec 3.40/

/Time::HiRes 1.9726/

/URI::Escape 3.31/

/Data::Uniqid 0.12/

//

/Info: turned ON syncinternaldates, will set the internal dates (arrival dates) on host2 same as host1./

/Info: will try to use PLAIN authentication on host1/

/Info: will try to use PLAIN authentication on host2/

/Info: imap connexions timeout is 120 seconds/

/Host1: IMAP server [MyCyrusServer] port [143] user [mailbox at domain dot com ]/

/Host2: IMAP server [MyExchangeServer] port [993] user [mailbox at domain dot com ]/

/Host1: * OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS AUTH=LOGIN AUTH=PLAIN SASL-IR COMPRESS=DEFLATE] MyCyrusServer Cyrus IMAP v2.3.16-Fedora-RPM-2.3.16-6.el6_2.5 server ready/

//

/Host1: MyCyrusServer says it has CAPABILITY for AUTHENTICATE PLAIN/

/Host1: success login on [MyCyrusServer] with user [mailbox at domain dot com ] auth [PLAIN]/

/Host2: * OK The IMAP4 service is ready./

//

/Host2: MyExchangeServer says it has CAPABILITY for AUTHENTICATE PLAIN/

/Host2: success login on [MyExchangeServer] with user [mailbox at domain dot com ] auth [PLAIN]/

/Host1: state Authenticated/

/Host2: state Authenticated/

/Host1 capability: IMAP4 IMAP4rev1 LITERAL+ ID LOGINDISABLED COMPRESS=DEFLATE ACL RIGHTS=kxte QUOTA MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT SORT=MODSEQ THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE CATENATE CONDSTORE SCAN IDLE LISTEXT LIST-SUBSCRIBED X-NETSCAPE URLAUTH/

/Host2 capability: IMAP4 IMAP4rev1 AUTH=PLAIN UIDPLUS CHILDREN IDLE NAMESPACE LITERAL+/

/Host1: separator given by NAMESPACE: [.]/

/Host2: separator given by NAMESPACE: [/]/

/Host1: prefix given by NAMESPACE: [user.]/

/Host2: prefix given by NAMESPACE: []/

/Host1 separator and prefix: [.][user.]/

/Host2 separator and prefix: [/][]/

/++++ Calculating sizes on Host1/

*/Host1 Nb messages: 0 messages/**//*

/Host1 Total size: 0 bytes (0.000 KiB)/

/Host1 Biggest message: 0 bytes (0.000 KiB)/

/Host1 Time spent: 1.9 seconds/

/++++ Calculating sizes on Host2/

/Host2 Nb messages: 0 messages/

/Host2 Total size: 0 bytes (0.000 KiB)/

/Host2 Biggest message: 0 bytes (0.000 KiB)/

/Host2 Time spent: 0.0 seconds/

/++++ Listing folders/

/Host1 folders list:/

//

/Host2 folders list:/

/[&AMk-l&AOk-ments envoy&AOk-s]/

/[&AMk-l&AOk-ments supprim&AOk-s]/

/[Bo&AO4-te d'envoi]/

/[Brouillons]/

/[Calendrier]/

/[Contacts]/

/[Courrier ind&AOk-sirable]/

/[INBOX]/

/[Journal]/

/[Notes]/

/[T&AOI-ches]/

//

/Folders in host2 not in host1:/

/[T&AOI-ches]/

/[Notes]/

/[Journal]/

/[INBOX]/

/[Courrier ind&AOk-sirable]/

/[Contacts]/

/[Calendrier]/

/[Brouillons]/

/[Bo&AO4-te d'envoi]/

/[&AMk-l&AOk-ments supprim&AOk-s]/

/[&AMk-l&AOk-ments envoy&AOk-s]/

//

/++++ Looping on each folder/

/++++ End looping on each folder/

/++++ Calculating sizes on Host1/

/Host1 Nb messages: 0 messages/

/Host1 Total size: 0 bytes (0.000 KiB)/

/Host1 Biggest message: 0 bytes (0.000 KiB)/

/Host1 Time spent: 0.0 seconds/

/++++ Calculating sizes on Host2/

/Host2 Nb messages: 0 messages/

/Host2 Total size: 0 bytes (0.000 KiB)/

/Host2 Biggest message: 0 bytes (0.000 KiB)/

/Host2 Time spent: 0.0 seconds/

/++++ Statistics/

/Transfer started on : Mon Jun 23 15:11:50 2014/

/Transfer ended on : Mon Jun 23 15:11:54 2014/

/Transfer time : 4.0 sec/

/Messages transferred : 0 /

/Messages skipped : 0/

/Messages found duplicate on host1 : 0/

/Messages found duplicate on host2 : 0/

/Messages void (noheader) on host1 : 0/

/Messages void (noheader) on host2 : 0/

/Messages deleted on host1 : 0/

/Messages deleted on host2 : 0/

/Total bytes transferred : 0 (0.000 KiB)/

/Total bytes duplicate host1 : 0 (0.000 KiB)/

/Total bytes duplicate host2 : 0 (0.000 KiB)/

/Total bytes skipped : 0 (0.000 KiB)/

/Total bytes error : 0 (0.000 KiB)/

/Message rate : 0.0 messages/s/

/Average bandwidth rate : 0.0 KiB/s/

/Reconnections to host1 : 0/

/Reconnections to host2 : 0/

/Memory consumption : 51.9 MiB/

/Biggest message : 0 bytes/

/Initial difference host2 - host1 : 0 messages, 0 bytes (0.000 KiB)/

/Final difference host2 - host1 : 0 messages, 0 bytes (0.000 KiB)/

/Detected 0 errors/

//

//

/Homepage: http://imapsync.lamiral.info//

/Log file is LOG_imapsync/2014_06_23_15_11_50_mailbox at domain dot com .txt/

Best regards / Cordialement,

**

*Julien CHAUSSIDON*



Dell S.A, Siège Social 1 rond point Benjamin Franklin 34000 Montpellier.
Capital 1,782,769 Euros, 351 528 229 RCS Montpellier –APE 4651Z -TVA Intracommunautaire FR 20 351 528 229, SIRET 351 528 229 00088
Vat Number : FR 20351528229 (France) /  IT00001709997 (Italy) / ESN0012622G (Spain)


-- Au revoir, 09 51 84 42 42 Gilles Lamiral. France, Baulon (35580) 06 20 79 76 06