FAQ.Exchange.txt 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675
  1. $Id: FAQ.Exchange.txt,v 1.80 2022/04/05 13:48:52 gilles Exp gilles $
  2. This documentation is also available online at
  3. https://imapsync.lamiral.info/FAQ.d/
  4. https://imapsync.lamiral.info/FAQ.d/FAQ.Exchange.txt
  5. ======================================================================
  6. Imapsync tips for Exchange 2000 2003 2007 2010 2013 2016 2019
  7. ======================================================================
  8. Questions answered in this FAQ are:
  9. Q. Can I use imapsync to transfer from or to Exchange accounts?
  10. Q. How to sync from XXX to Exchange 2010/2013/2016/2019
  11. Q. I see "NO Maximum size of appendable message has been exceeded"
  12. What can I do with that?
  13. Q. Exchange throttles the sync and says:
  14. "Request is throttled. Suggested Backoff Time: 299961 milliseconds".
  15. What can I do with that?
  16. Q. For Exchange I have double and triple checked the username and
  17. password spelling but I still get a "LOGIN failed". Any clue?
  18. Q. Exchange fails with "User is authenticated but not connected".
  19. Q. Exchange fails with "BAD Command received in Invalid state".
  20. Q. Exchange fails with "NO Server Unavailable. 15" and imapsync says
  21. "could not append ... NO Server Unavailable. 15"
  22. Q. From XXX to Exchange 2013, read receipts are all resent again
  23. after a sync. Even for old messages. How can I fix that?
  24. Q. DEBUG: IO/Socket/SSL.pm:1043: local error: SSL read error
  25. DEBUG: IO/Socket/SSL.pm:1043: local error: SSL read error
  26. Q. From XXX to Exchange 2010/2013 I get this error message
  27. sometimes: "BAD Command Argument Error 11". What does it mean?
  28. Q. From XXX to Exchange 2010 or 2013, the flag Flagged does
  29. not seem to be well synced. What can I do?
  30. Q. How to migrate from or to Exchange 2007/2010/2013 with an
  31. admin/authuser account?
  32. Q. How to migrate from or to Exchange 2016 with an admin/authuser account?
  33. Q. How to migrate from or to Exchange 2003 with an admin/authuser account?
  34. Q. Couldn't create folder [trash] "Mailbox already exists".
  35. Q. Migrating to Exchange 201O, messages get date of the transfer,
  36. this is bad for sorting and listing. What can I do?
  37. Q. How to sync from any to Exchange 2007?
  38. Q. Exchange 2007 folders ending with a space cause an imapsync crash.
  39. "Could not select: socket closed while reading data from server"
  40. Q. How to sync from Microsoft Exchange 2000 IMAP4rev1 server?
  41. Now the questions again with their answers.
  42. ======================================================================
  43. Q. Can I use imapsync to transfer from or to Exchange accounts?
  44. R. Yes. But IMAP access to an Exchange account is not always
  45. allowed by default so it has to be allowed in the server configuration
  46. part.
  47. Exchange: https://docs.microsoft.com/en-us/exchange/enable-imap4-in-exchange-2013-exchange-2013-help
  48. ======================================================================
  49. Q. How to sync from XXX to Exchange 2010/2013/2016/2019
  50. R0. IMAP is not enable by default on Exchange, see how to enable it:
  51. https://docs.microsoft.com/en-us/exchange/enable-imap4-in-exchange-2013-exchange-2013-help
  52. Also read
  53. http://clintboessen.blogspot.com/2018/03/binding-certificate-breaks-imap-or-pop.html
  54. R1. Following is a command line resume that solves most encountered
  55. issues when migrating to Exchange. To fully understand or change
  56. the details you have to read the next Q/R sections.
  57. On Windows, use:
  58. imapsync.exe ... --exchange2
  59. which is equivalent in imapsync release 1.970 to:
  60. imapsync.exe ... ^
  61. --maxsize 10_000_000 ^
  62. --maxmessagespersecond 4 ^
  63. --disarmreadreceipts ^
  64. --regexflag "s/\\Flagged//g" ^
  65. --regexmess "s,(.{10239}),$1\r\n,g"
  66. On Unix, use:
  67. imapsync ... --exchange2
  68. which is equivalent in imapsync release 1.970 to:
  69. imapsync ... \
  70. --maxsize 10_000_000 \
  71. --maxmessagespersecond 4 \
  72. --maxlinelength 10239 \
  73. --regexflag 's/\\Flagged//g' \
  74. --disarmreadreceipts \
  75. --regexmess 's,(.{10239}),$1\r\n,g'
  76. On Linux, you can also try the "reformime" command
  77. that can be used like:
  78. imapsync ... --maxlinelengthcmd "reformime -r7"
  79. To get reformime, install the "maildrop" package.
  80. On Linux again, there is a good Python script in the tarball that can
  81. fix several things that Exchange or O365 have issues with.
  82. Use it like this:
  83. ./imapsync ... --pipemess W/tools/fix_email_for_exchange.py
  84. It often does some miracles on messages.
  85. ======================================================================
  86. Q. For Exchange I have double and triple checked the username and
  87. password spelling but I still get a "LOGIN failed". Any clue?
  88. R1. Disable double-step authentication, also known as 2-factor,
  89. 2-step authentication on the Azure/Active Directory portal.
  90. R2. Microsoft introduced something called "security defaults" which is
  91. enabled by default for new tenants. One of the rules blocks IMAP
  92. access as of imapsync. The funny thing is that you can't disable
  93. single rules of this security package without buying additional
  94. licenses. Switching the whole thing off allows the login.
  95. Also, disable double-step authentication on the Azure/Active Directory
  96. portal.
  97. See here:
  98. https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/concept-fundamentals-security-defaults
  99. Thanks to Stephan Buhre for this R2 answer.
  100. R3. I want to migrate to Exchange 2019. I haven't been able to sync
  101. using admin credentials even if I've tried and made all the
  102. configuration mentioned in the FAQ.Exchange.
  103. The error was always "LOGIN failed".
  104. My problem was that I have been used an admin account which haven’t
  105. attached a mailbox in Exchange. This is my admin account which I use
  106. only for configuration in Exchange, not for emails.
  107. So, after I’ve created in Exchange a mailbox for this user, the sync
  108. started to work. I can confirm that imapsync is working for Exchange
  109. 2019, with plain authentication, and full permissions of admin account
  110. (this account must have mailbox attached) applied to regular user
  111. mailbox account.
  112. It doesn't work with the --authuser2 parameter. The syntax that
  113. works for me is:
  114. imapsync ... --host2 192.168.xxx.yyy --user2 domain.local\admin.account\regular.user --password2 "xxxxxxx"
  115. or
  116. imapsync ...--host2 192.168.xxx.yyy --user2 admin.account@mycompany.com\regular.user --password2 "xxxxxxx"
  117. Thanks to Ioan Nechita for this R3 answer.
  118. R4. Are there special characters in the password?
  119. https://imapsync.lamiral.info/FAQ.d/FAQ.Authentication_failure.txt
  120. https://imapsync.lamiral.info/FAQ.d/FAQ.Passwords_on_Windows.txt
  121. https://imapsync.lamiral.info/FAQ.d/FAQ.Passwords_on_Unix.txt
  122. https://imapsync.lamiral.info/FAQ.d/FAQ.Passwords_on_Mac.txt
  123. ======================================================================
  124. Q. Exchange fails with "User is authenticated but not connected".
  125. R1. "The message User is authenticated but not connected is due to a
  126. bug in the Exchange server's IMAP implementation. If the client
  127. presents a valid user name but an invalid password, the server
  128. accepts the login, but subsequent commands fail with the
  129. aforementioned error message." Source:
  130. https://unix.stackexchange.com/questions/164823/user-is-authenticated-but-not-connected-after-changing-my-exchange-password
  131. Thanks to James Abbottsmith for this link and explanation at
  132. https://github.com/imapsync/imapsync/issues/32#issuecomment-153561647
  133. R2. Miguel Alameda reported understanding and solving this issue
  134. like this, the context was admin/authuser:
  135. "The admin user had not permission in the target mailbox."
  136. R3. Jason from magiclamp.net adds this tip (2021_11_23).
  137. "In GoDaddy Exchange admin center, under recipients, you can
  138. double click on a mailbox, and in the "mailbox delegation" scrolling
  139. down to the bottom it shows a input field named "Full Access".
  140. Add the admin account there."
  141. ======================================================================
  142. Q. I see "NO Maximum size of appendable message has been exceeded"
  143. What can I do with that?
  144. R1. With Exchange 2019
  145. Change the recipient Receive/Send size:
  146. Set-mailbox -Identity user@contoso.com -MaxReceiveSize 100mb -MaxSendSize 100mb
  147. Thanks to Pasternak Denis for this Exchange 2019 tip.
  148. R2. With Exchange 2016
  149. Thanks to Torsten Bergemann from Germany:
  150. In order to have exchange accept big e-mails via imap, several size
  151. limitations have to be removed on several levels of the exchange
  152. software: For the organization (within exchange admin panel),
  153. for each connector (with exchange admin panel), for each Postfach
  154. (using exchange management shell).
  155. For details and instructions, check
  156. https://docs.microsoft.com/en-us/Exchange/mail-flow/message-size-limits?view=exchserver-2019
  157. https://docs.microsoft.com/en-us/Exchange/architecture/client-access/client-message-size-limits?view=exchserver-2019
  158. Unfortunately, the second link does not give instructions to remove the limit from imap4 service.
  159. To solve it for Exchange 2013/2016, add the line
  160. <add key="MaxReceiveSize" value="1024000000" />
  161. to the file
  162. C:\Program Files\Microsoft\Exchange Server\V14 [or V15]\ClientAccess\PopImap\Microsoft.Exchange.Imap4.exe.config
  163. Please note that this change may be lost each time you install an
  164. cumulative update. After the change, restart the services exchange
  165. transport role, exchange information store and exchange imap4 Backend.
  166. Source in Deutch:
  167. https://social.technet.microsoft.com/Forums/de-DE/2c07cf43-fe0e-4d22-b061-676a67c6d58d/exchange-2013-max-mailgre-per-imap?forum=exchange_serverde
  168. This change made our Exchange installation accept bigger e-mails
  169. in order to remove the imapsync Exchange error message
  170. "NO Maximum size of appendable message has been exceeded"
  171. ======================================================================
  172. Q. Exchange throttles the sync and says:
  173. "Request is throttled. Suggested Backoff Time: 299961 milliseconds".
  174. What can I do with that?
  175. R0. Exchange have throttle mechanisms to limit any huge
  176. usage. Sometimes imapsync transfers are too stressful for servers.
  177. The message
  178. "Request is throttled. Suggested Backoff Time: 299961 milliseconds"
  179. comes from the imap Office365 server, imapsync just reports it
  180. before being disconnected from it.
  181. R1. Play with options --maxbytespersecond or --maxmessagespersecond
  182. or --exitwhenover
  183. imapsync ... --maxbytespersecond 100_000
  184. imapsync ... --maxmessagespersecond 2
  185. imapsync ... --exitwhenover 1_000_000_000
  186. I don't know the upper value that avoid the default throttling from 0365
  187. and I guess it changes over time.
  188. R2. For Exchange, in case throttle appears anyway, fix them with:
  189. https://docs.microsoft.com/en-us/exchange/change-user-throttling-settings-for-specific-users-exchange-2013-help
  190. See also:
  191. http://linux-france.tk/prj/imapsync_list/msg02072.html
  192. (Subject: Re: [imapsync] From Exchange to Dovecot. Speed
  193. Date: Mon, 03 Nov 2014 00:14:59 +0100)
  194. Sometimes restarting the Exchange server is needed to take
  195. into account the change in the configuration.
  196. ======================================================================
  197. Q. Exchange fails with "BAD Command received in Invalid state".
  198. R1. This message might happen when authenticating without ssl nor tls,
  199. wich is rare now since imapsync tries to do ssl then tls by default.
  200. Add --tls1 or else --ssl1 if this error message comes from host1.
  201. Add --tls2 or else --ssl2 if this error message comes from host2.
  202. R2. This message might also happen when authenticating with ssl and tls.
  203. Don't use --tlsX and --sslX on the same side X (1 or 2), since it
  204. asks for a double encryption, an encryption inside an encryption.
  205. It won't work, you can't do a direct double encryption, few
  206. servers allow that.
  207. ======================================================================
  208. Q. Exchange fails with "NO Server Unavailable. 15" and imapsync says
  209. "could not append ... NO Server Unavailable. 15"
  210. R1. The problem could be a mailbox quota limitation.
  211. In the Exchange log file, if you see many
  212. "Microsoft.Exchange.Data.Storage.QuotaExceededException",
  213. it looks like "Quota Exceeded" could be the issue.
  214. The solution is to increase the quota for this mailbox.
  215. Quoting
  216. https://docs.microsoft.com/en-us/exchange/recipients/user-mailboxes/storage-quotas?view=exchserver-2019
  217. In the Exchange admin center (EAC), navigate to Recipients > Mailboxes.
  218. In the list of user mailboxes, click the mailbox that you want to change the storage quotas for,
  219. and then click Edit icon, then change "Prohibit send and receive at (GB)", then save your changes.
  220. Or use the Exchange Management Shell, aka PowerShell:
  221. Set-Mailbox -Identity "Joe Healy" -IssueWarningQuota 499gb -ProhibitSendQuota 500gb -ProhibitSendReceiveQuota 500gb -UseDatabaseQuotaDefaults $false
  222. R2. A user fixed it by enabling IMAP logging on Exchange which is
  223. quite crazy as a solution. But why not, here it is:
  224. https://www.mantisbt.org/forums/viewtopic.php?p=68835&sid=8b1ecd2d976e85218fbf33fcd38c209d#p68835
  225. by TerranceM
  226. Set-ImapSettings -Server <server-name> -ProtocolLogEnabled $true
  227. ======================================================================
  228. Q. From XXX to Exchange 2013, read receipts are all resent again
  229. after a sync. Even for old messages. How can I fix that?
  230. R. imapsync can remove the header containing this read receipt request.
  231. On Unix or Windows use:
  232. imapsync ... --disarmreadreceipts
  233. Since read receipts should be sent for unseen messages that will go
  234. to a seen state after the migration, you could be strict and apply
  235. the regex only to seen messages.
  236. Selecting seen message can be done with:
  237. imapsync ... --search1 "SEEN" --disarmreadreceipts
  238. Of course a second run has to be run without the --disarmreadreceipts
  239. for unseen messages:
  240. imapsync ... --search1 "UNSEEN"
  241. If fact --disarmreadreceipts is just an option equivalent to:
  242. --regexmess 's{\A(.*?(?! ^$))^Disposition-Notification-To:(.*?)$}{$1X-Disposition-Notification-To:$2}igxms'
  243. That regex changes the header Disposition-Notification-To. It prefixes
  244. it with an X- so that it becomes inactive.
  245. Disposition-Notification-To: blabla
  246. becomes
  247. X-Disposition-Notification-To: blabla
  248. Thanks to David Karnowski for pointing and solving this issue.
  249. ======================================================================
  250. Q. DEBUG: IO/Socket/SSL.pm:1043: local error: SSL read error
  251. DEBUG: IO/Socket/SSL.pm:1043: local error: SSL read error
  252. R1. "SSL read or write error" happens sometimes, it isn't related to
  253. imapsync directly but to the ssl underlying library when communicating
  254. with Exchange in TLS/SSL encrypted mode.
  255. Next runs should put the sync further, so rerun the syncs
  256. until it is well completed.
  257. R2. Another solution is to remove --tls or --ssl options for Exchange
  258. and accept a clear text sync.
  259. R3. See also the FAQ FAQ.SSL_errors.txt
  260. https://imapsync.lamiral.info/FAQ.d/FAQ.SSL_errors.txt
  261. ======================================================================
  262. Q. From XXX to Exchange 2010/2013 I get this error message
  263. sometimes: "BAD Command Argument Error 11". What does it mean?
  264. R. This error message comes from Exchange IMAP server when it
  265. encounters any problem. Most of the time it is one of the following:
  266. * Some messages are bigger than the size limit. 10 MB by default
  267. on Exchange. It can be upped by configuration for Exchange.
  268. Sometimes a reboot is needed to take configuration changes
  269. into account.
  270. If you can't fix this limit on Exchange then use option
  271. --maxsize 10000000 for 10 MB, change it if needed) to tell
  272. imapsync to skip those messages.
  273. imapsync ... --maxsize 10000000 # 10 MB for Exchange
  274. * Quota reached. The whole account is full.
  275. It can be upped by configuration.
  276. * Some messages have some lines too long. Use option --maxlinelength
  277. to skip messages whose max line length is over a number of bytes.
  278. --maxlinelength 1000 is a RFC2822 must but most server support
  279. higher values. Exchange supports 9900 characters line length:
  280. imapsync ... --maxlinelength 9900
  281. In case you prefer fixing messages with long lines the hard way,
  282. instead of skipping them with --maxlinelength 9900, just use:
  283. On Windows
  284. imapsync ... --regexmess "s,(.{9900}),$1\r\n,g"
  285. On Unix
  286. imapsync ... --regexmess 's,(.{9900}),$1\r\n,g'
  287. Have also in mind that Exchange closes the connection after 10 errors
  288. encountered so you might also see "BYE Connection closed" errors from
  289. Exchange, which means Exchange leaves the session and say goodbye,
  290. come back later. Rerun a sync then.
  291. On Linux, there is a good Python script in the tarball that can
  292. fix several things that Exchange have issues with.
  293. Use it like this:
  294. ./imapsync ... --pipemess W/tools/fix_email_for_exchange.py
  295. It often does some miracles on messages.
  296. ======================================================================
  297. Q. From XXX to Exchange 2010 or 2013, the flag Flagged does
  298. not seem to be well synced. What can I do?
  299. R. Use the following trick. Run imapsync twice, one with --regexflag
  300. and one without, like this:
  301. 1) imapsync ... --regexflag "s/\\Flagged//g"
  302. 2) imapsync ...
  303. You can add --debugflags if you want to see what imapsync gets and
  304. does in details with flags.
  305. The magic of this trick is on ignoring the \Flagged flag on the first
  306. sync and setting it on the second sync, with STORE instead of APPEND.
  307. This Exchange bug seems that Exchange gets and sets well the Flagged
  308. flag with APPEND in IMAP but then it forgets it with other protocols;
  309. With STORE it sets and gets the "\Flagged" flag everywhere.
  310. Thanks to Dave Murray and Simon Savva for reporting and solving
  311. this issue.
  312. ======================================================================
  313. Q. How to migrate from or to Exchange 2007/2010/2013 with an
  314. admin/authuser account?
  315. R. The tricks comes from Michele Marcionelli and Benjamin Priestman:
  316. This may works:
  317. imapsync ... --user2 user2 --authuser2 admin2 --password2 adminpassword2 ...
  318. or
  319. imapsync ... --user2 "domain\admin2\user2" --password2 adminpassword2 ...
  320. or
  321. imapsync ... --user2 "admin2@domain\user2" --password2 adminpassword2 ...
  322. where "domain" is set be the user's UPN in Active Directory
  323. or the NETBIOS or DNS name of the domain.
  324. The exact format might vary depending on local configuration and you
  325. should experiment with the different formats.
  326. PLAIN authentication is the only way to go with --authuser1 for now.
  327. So don't use --authmech1 SOMETHING with --authuser1 admin_user,
  328. it will not work.
  329. Same behavior with the --authuser2 option.
  330. A little note from Michael Scherer.
  331. The previous workaround in the FAQ seems to be obsolete.
  332. I can confirm that
  333. imapsync ... --host2 exchange_server \
  334. --authuser2 admin@domain --user2 user_alias
  335. is working without any glitches, running Exchange 2010 SP2 here.
  336. Explanation, Exchange knows a) about a username
  337. and b) about a mailNickname which can be different to the username.
  338. As it seems you need to use the mailNickname (e.g. alias) defined
  339. for user2, not the username itself.
  340. https://techcommunity.microsoft.com/t5/exchange-team-blog/understanding-login-strings-with-pop3-imap/ba-p/610683
  341. https://web.archive.org/web/20191014050543/https://techcommunity.microsoft.com/t5/Exchange-Team-Blog/Understanding-login-strings-with-POP3-IMAP/ba-p/610683
  342. the second link has the same content, I give it in case the first disappears,
  343. thanks to archive.org!
  344. A little note from John Becker.
  345. After you pointed out that I had issues with authorization, I realized that
  346. as an admin user I don't have all the rights on the mailboxes.
  347. So I added myself to the user mailbox with full rights.
  348. I also changed the login type on the Exchange CAS to type 1, plain text.
  349. The command that I used for imapsync is:
  350. imapsync ... ^
  351. --host2 exchange-server ^
  352. --user2 "windows-domain\admin-user\aaaa" ^
  353. --password2 admin-password ...
  354. ======================================================================
  355. Q. How to migrate from or to Exchange 2016 with an admin/authuser account?
  356. R. This might work:
  357. imapsync ... --user2 user2 --authuser2 admin2 --password2 adminpassword2 ...
  358. Note from
  359. https://github.com/imapsync/imapsync/issues/136#issuecomment-397020248
  360. The key is to not use the built-in Administrator account which
  361. Microsoft seems to have blocked access to in imap.
  362. I'm doing a sync to Exchange 2016 accounts and this works:
  363. imapsync ... --ssl2 --user2 account@domain.com ^
  364. --authuser2 accountwfullaccess@domain.com ^
  365. --password2 "accountwfullaccesspw"
  366. The admin account you use needs to have full access to the account(s)
  367. you want to sync which you can setup in the gui or via powershell
  368. and again - don't use administrator@domain.com - as that will never
  369. work because IMAP LOGIN is disabled for that account apparently
  370. under all circumstances.
  371. Note from Noxyron
  372. https://github.com/imapsync/imapsync/issues/136#issuecomment-543761463
  373. Hi guys. For a long time I could not start synchronization, I use admin rights
  374. and the --authuser2 switch when I migrated from Mdaemon to Exchange2016.
  375. I always got the error:
  376. "Host2 failure: Error login on [my.exchange.com] with user [mydomainuser] auth [PLAIN]: 2 NO AUTHENTICATE failed."
  377. In order for ImapSync to login to the user's mailbox using administrator rights,
  378. you need to give for the administrator the permissions to the mailbox of this
  379. user with the command:
  380. Add-MailboxPermission -Identity DomainUser -User DomainAdmin -AccessRights FullAccess -InheritanceType All -AutoMapping $false
  381. using Exchange Management Shell.
  382. Without this, synchronization will not work.
  383. Please, add this comment to the FAQ.Exchange.txt
  384. (done!)
  385. ======================================================================
  386. Q. How to migrate from or to Exchange 2003 with an admin/authuser account?
  387. R. Thomas Edgar wrote the following
  388. In case you can glean something from this snippet which allowed us
  389. to migrate from Exchange 2003 t0 Cyrus Imap 2.4 (you would reverse
  390. the flow to go the other way):
  391. imapsync --dry --host1 ExchangeServer.mycompany.com \
  392. --user1 Some.User@mycompany.com --authuser1 ExchangeAdminAccount \
  393. --proxyauth1 --password1 '$pass_with_dollars$' \
  394. --host2 cyrusimapbackend.mycompany.com \
  395. --user2 SameOrDiffererentUser@mycompany.com \
  396. --authuser2 CyrusAdminAccount --password2 CyrusAdminPassword
  397. We also needed to:
  398. - Ensure the Exchange Admin Acct had IMAP4 enabled in it's
  399. profile (it initially didn't!)
  400. - Ensure the Some.User Exchange Acct had IMAP4 enabled
  401. in it's profile (it initially didn't!)
  402. - Add the CyrusAdminAccount to admins line in /etc/imapd.conf
  403. - Give CyrusAdminAccount lrswipkxtecda to the Cyrus Imap account
  404. being migrated to (- or in your case, from)
  405. In case you are not aware:
  406. - It will prompt for a password if you don't supply it
  407. - the domain part of the fully-qualified email could be
  408. omitted in our case
  409. - Use --debugimap when testing initial connectivity, if necessary
  410. ======================================================================
  411. Q. Couldn't create folder [trash] "Mailbox already exists".
  412. R. Some servers take care about character case in folder names,
  413. some servers do not, like Exchange. Since non-respecting case
  414. can merge two different folders into one then imapsync respects case.
  415. For example, if a host1 server has a folder name called "trash"
  416. and the host2 server already has a folder "Trash" or "TRASH"
  417. then imapsync will try to create the folder "trash" on host2,
  418. because trash and Trash are different strings. But if host2
  419. does not respect character case it will consider folder "trash"
  420. already exists and will say it, that's the error message
  421. reported by imapsync: "Mailbox already exists", message coming
  422. from the server.
  423. The folder creation fails but messages are well transferred in
  424. so take a look at this warning, understand why it happens
  425. and it should be fine most of the time.
  426. To avoid this warning use --regextrans2 to map the folder names
  427. imapsync ... --regextrans2 "s/^trash$/Trash/"
  428. If there are two folders Trash and trash on host1 then both
  429. will be merge into only one Trash folder on host2.
  430. In case option --delete2 is used the regextans2 above becomes
  431. mandatory, otherwise imapsync will sync messages from the
  432. first Trash and then delete them when syncing trash.
  433. In order to avoid merging folders that are considered different
  434. on host1 but the same on destination host2 because of case
  435. sensitivities and insensitivities, use --nomixfolders
  436. ======================================================================
  437. Q. Migrating to Exchange 201O, messages get date of the transfer,
  438. this is bad for sorting and listing. What can I do?
  439. R1. Be sure to have at least Exchange 2010 SP2 Rollup 5
  440. https://tribalchicken.net/imap-sync-issues-with-exchange-2010/
  441. R2. See also the Outlook side (thanks to Martin Hochreiter for this solution)
  442. by changing Archive to sent/receive date
  443. https://www.howto-outlook.com/faq/archivenotworking.htm
  444. https://web.archive.org/web/20190914063435/http://www.howto-outlook.com/faq/archivenotworking.htm
  445. It's often shorter to change one server than thousands clients
  446. so R1 might be easier to do.
  447. ======================================================================
  448. Q. How to sync from any to Exchange 2007?
  449. Several problems:
  450. - Big messages: increase the "send- and receive-connector"
  451. in exchange2007 to 40 MB.
  452. R. 2 solutions
  453. R1. With imapsync (only partial success)
  454. --skipheader 'Received' \
  455. --regexmess 's{\A(.*?(?!^$))^Date:(.*?)$}{$1Date:$2\nReceived: From; $2}gxms'
  456. Any user having time to spend to debug Exchange 2007 with imapsync
  457. is welcome.
  458. R2. Other solution
  459. Two users succeeded by using "MS Transporter Suite" (which is closed
  460. expensive non-free software).
  461. ======================================================================
  462. Q. Exchange 2007 folders ending with a space cause an imapsync crash.
  463. "Could not select: socket closed while reading data from server"
  464. R. Using another imap tool like Thunderbird or Outlook, change the
  465. folder name to exclude the trailing space.
  466. See https://github.com/imapsync/imapsync/issues/154
  467. ======================================================================
  468. Q. How to sync from Microsoft Exchange 2000 IMAP4rev1 server?
  469. R. imapsync ... --prefix1 "INBOX."
  470. ======================================================================
  471. ======================================================================