Exchangetoox: Difference between revisions

From Open-Xchange
Line 6: Line 6:


# a cyrus IMAP server and a admin account
# a cyrus IMAP server and a admin account
#: the admin accounts for cyrus are defined in the parameter "admins:" in the configuration file "/etc/imapd.conf". IMAP login for that user must be possible. In this examples, the admin user name is "cyrus" and it's password "cpass".
#: the admin accounts for cyrus are defined in the parameter '''admins:''' in the configuration file '''/etc/imapd.conf'''. In this examples, the admin user name is '''cyrus'' with password '''cpass'''.
# Microsoft Exchange 2003
# Microsoft Exchange 2003
#:others might work, too. 2003 was the version this howto was written with.
#:others Exchange versions might work, too. 2003 was the version this howto was written with.
# postmaster account for MS Exchange  
# postmaster account for MS Exchange  
#:the exchange account for migration needs to have the rights to access all mailboxes on the Exchange server. In the examples the user name is "migration" with password "mpass". The user can be created following these steps:
#:the exchange account for migration needs to have the rights to access all mailboxes on the Exchange server. In the examples the user name is '''migration''' with password '''mpass'''. The user can be created following these steps:
## create a new "DWORD" in "HKEY_Current_User\Software\ Microsoft\Exchange\ExAdmin" with the name "ShowSecurityPage" and set this to "1".
## create a new '''DWORD''' in '''HKEY_Current_User\Software\ Microsoft\Exchange\ExAdmin''' with the name '''ShowSecurityPage''' and set this to '''1'''.
## open the Active Directory User and Computer console and create a new user with the name "migration", password "mpass" and a exchange account
## open the Active Directory User and Computer console and create a new user with the name '''migration''', password '''mpass''' and a exchange account
## reopen the Exchange System Manger and give that new user full access to the entire mail organization (right click on the most upper entry naming your organization -> properties -> security -> add)
## reopen the Exchange System Manger and give that new user full access to the entire mail organization (right click on the most upper entry naming your organization -> properties -> security -> add)



Revision as of 13:39, 4 August 2009

Introduction

The document describes a way how mailboxes can be migrated from MS Exchange to a cyrus IMAP server using imapsync without the need to know the users passwords.

Pre requirements

  1. a cyrus IMAP server and a admin account
    the admin accounts for cyrus are defined in the parameter admins:' in the configuration file /etc/imapd.conf. In this examples, the admin user name is cyrus with password cpass.
  2. Microsoft Exchange 2003
    others Exchange versions might work, too. 2003 was the version this howto was written with.
  3. postmaster account for MS Exchange
    the exchange account for migration needs to have the rights to access all mailboxes on the Exchange server. In the examples the user name is migration with password mpass. The user can be created following these steps:
    1. create a new DWORD in HKEY_Current_User\Software\ Microsoft\Exchange\ExAdmin with the name ShowSecurityPage and set this to 1.
    2. open the Active Directory User and Computer console and create a new user with the name migration, password mpass and a exchange account
    3. reopen the Exchange System Manger and give that new user full access to the entire mail organization (right click on the most upper entry naming your organization -> properties -> security -> add)

Testing the admin users

Those two sessions descibe a telnet session where a succesfull IMAP connections gets created and closed (cyrus is running on localhost and the Exchange server on 10.20.30.170)

[]# telnet localhost imap
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
Escape character is '^]'.
* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS AUTH=LOGIN AUTH=PLAIN SASL-IR] servera Cyrus IMAP4 v2.3.7-Invoca-RPM-OX-2.3.7-3.OX server ready
. login cyrus cpass
. OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID LOGINDISABLED 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 IDLE LISTEXT LIST-SUBSCRIBED X-NETSCAPE URLAUTH] User logged in
. logout
* BYE LOGOUT received
. OK Completed
Connection closed by foreign host.
[]#
 []# telnet 10.20.30.170 imap
Trying 10.20.30.170...
Connected to mastercane.open-xchange.com (10.20.30.170).
Escape character is '^]'.
* OK Der Microsoft Exchange Server 2003 IMAP4rev1-Server, Version 6.5.6944.0 (win2003.perf.open-xchange.local), steht zur Verf�gung.
. login migration mpass
. OK LOGIN completed.
. logout
* BYE Der Microsoft Exchange Server 2003 IMAP4rev1-Server, Version 6.5.6944.0, meldet sich ab.
. OK LOGOUT completed.
Connection closed by foreign host.
[]#


Migrating a single user

Access to the Exchange mailbox is done via <domain>/migration/<user to migrate> and the password of the migration account. In cyrus the Data is stored as user with the credentials of the admin account. The imapsync command is as follows:

imapsync --host1 <ms exchange> --user1 <domain>/migration/<user to migrtate> --password1 \
         mpass --host2 <cyrus server> --user2 <user to migrate> --authuser2 cyrus \
         --password2 cpass --authmech2 PLAIN --prefix1 "INBOX." --regextrans2 \
         's/INBOX.INBOX/INBOX/'  --noauthmd5 --subscribe \
         --exclude "&ANY-ffentliche Ordner|Aufgaben|Journal|Kalender|Kontakte|Notizen"