Univention Bugzilla – Bug 47699
Cyrus2Dovecot Migration ignores shared folders without mail address as well as OX shared folders
Last modified: 2021-05-14 16:33:59 CEST
The cyrus2dovecot migration manual (https://help.univention.com/t/6680) ignores public shared folders as well as ox shared folders at all. Because there are probably 10 code blocks we really should provide the migration via script. ====================================================================== # private shared folders (with number) root@master-42-113:~# for sharedchar in $(univention-ldapsearch -LLLo ldif-wrap=no \ "(&(mailPrimaryAddress=*)(objectClass=oxSharedFolder))" \ dn cn | grep "^cn" | cut -f2 -d" " | grep "^[0-9]"); do [ -n "${sharedchar}" ] && ./cyrus2dovecot -C /var/spool/cyrus/mail/domain/%g/%d/q/shared/%U -U /var/lib/cyrus/domain/%g/%d/shared/q/%U.sub -S /var/lib/cyrus/domain/%g/%d/shared/q/%U.seen -D /var/spool/dovecot/public/%d/%P -u "${sharedchar}" | tee ./cyrus2dovecot_pub-shared-number.log; done cyrus2dovecot [1drive@univention.ox]: 0 messages in 1 folders (0.0 MiB, 0 s), 0 expunged mails skipped # private shared folders (without number) root@master-42-113:~# for sharedchar in $(univention-ldapsearch -LLLo ldif-wrap=no \ "(&(mailPrimaryAddress=*)(objectClass=oxSharedFolder))" \ dn cn | grep "^cn" | cut -f2 -d" " | grep "^[^0-9]"); do [ -n "${sharedchar}" ] && ./cyrus2dovecot -C /var/spool/cyrus/mail/domain/%g/%d/q/shared/%U -U /var/lib/cyrus/domain/%g/%d/shared/q/%U.sub -S /var/lib/cyrus/domain/%g/%d/shared/q/%U.seen -D /var/spool/dovecot/public/%d/%P -u "${sharedchar}" | tee ./cyrus2dovecot_pub-shared-number.log; done cyrus2dovecot [test@univention.ox]: (error) No Cyrus INBOX at: /var/spool/cyrus/mail/domain/u/univention.ox/q/shared/test cyrus2dovecot [test2@univention.ox]: (error) No Cyrus INBOX at: /var/spool/cyrus/mail/domain/u/univention.ox/q/shared/test2 cyrus2dovecot [info@univention.ox]: (error) No Cyrus INBOX at: /var/spool/cyrus/mail/domain/u/univention.ox/q/shared/info cyrus2dovecot [mitmail@univention.ox]: (error) No Cyrus INBOX at: /var/spool/cyrus/mail/domain/u/univention.ox/q/shared/mitmail cyrus2dovecot [projekte@univention.ox]: (error) No Cyrus INBOX at: /var/spool/cyrus/mail/domain/u/univention.ox/q/shared/projekte cyrus2dovecot [info/foo2@univention.ox]: (error) No Cyrus INBOX at: /var/spool/cyrus/mail/domain/u/univention.ox/q/shared/info/foo2 # public shared folders (with number) root@master-42-113:~# for pubsharednumber in $(univention-ldapsearch -LLLo ldif-wrap=no \ "(&(!(mailPrimaryAddress=*))(objectClass=oxSharedFolder))" \ dn cn | grep "^cn" | cut -f2 -d" " | grep "^[0-9]"); do [ -n "${pubsharednumber}" ] && ./cyrus2dovecot -C /var/spool/cyrus/mail/domain/%g/%d/q/shared/%U -U /var/lib/cyrus/domain/%g/%d/shared/q/%U.sub -S /var/lib/cyrus/domain/%g/%d/shared/q/%U.seen -D /var/spool/dovecot/public/%d/%P -u "${pubsharednumber}" | tee ./cyrus2dovecot_pub-shared.log; done cyrus2dovecot [2drive@univention.ox]: 1 messages in 1 folders (0.0 MiB, 0 s), 0 expunged mails skipped # public shared folders (without number) root@master-42-113:~# for pubsharedchar in $(univention-ldapsearch -LLLo ldif-wrap=no \ "(&(!(mailPrimaryAddress=*))(objectClass=oxSharedFolder))" \ dn cn | grep "^cn" | cut -f2 -d" " | grep "^[^0-9]"); do [ -n "${pubsharedchar}" ] && ./cyrus2dovecot -C /var/spool/cyrus/mail/domain/%g/%d/q/shared/%U -U /var/lib/cyrus/domain/%g/%d/shared/q/%U.sub -S /var/lib/cyrus/domain/%g/%d/shared/q/%U.seen -D /var/spool/dovecot/public/%d/%P -u "${pubsharedchar}" | tee ./cyrus2dovecot_pub-shared-number.log; done cyrus2dovecot [ohnemail@univention.ox]: (error) No Cyrus INBOX at: /var/spool/cyrus/mail/domain/u/univention.ox/q/shared/ohnemail cyrus2dovecot [info/foo1@univention.ox]: (error) No Cyrus INBOX at: /var/spool/cyrus/mail/domain/u/univention.ox/q/shared/info/foo1
the error messages above might result from Bug#34129 which is not related to the behavior described here!
Is 'Waiting support' correct here? The ticket was closed successfully and the issue is defined as 'Development Internal'.
I removed the 'waiting Support' Flag due to the ticket was closed using a workaround and there is no urgent action needed.
The main problem is this part: > The cyrus2dovecot migration manual (https://help.univention.com/t/6680) ignores > public shared folders as well as ox shared folders at all. This blocks OX installations from updating to UCS 4.3 with dovecot and there are still several OX installations with UCS 4.1/4.2. → I set the scoring accordingly
A customer with around 300 public folders has this issue. Manually tranfering the folders with an external email program is obviously not suitable. So currently no workaround available. How can these folders be migrated?
Please clarify: If i understand ticket 2018082721000194 correctly the help article was fixed to support public shared folders. The remaining issue now is to support ox shared folders?
This is what the current ticket #2019030721000363 is about, yes. Running OX shared folders which need to be migrated. The mentioned article claims: "Beachten Sie, dass die hier beschriebene Anleitung nicht für Umgebungen mit Open Xchange Public Shared Folders ausreichend ist!"
(In reply to Christian Völker from comment #5) > So currently no workaround available. > > How can these folders be migrated? use the correct LDAP filter when calling the migration tool. OX uses different LDAP object classes for it's shared folders That should be the only difference.
(In reply to Sönke Schwardt-Krummrich from comment #8) > use the correct LDAP filter when calling the migration tool. > OX uses different LDAP object classes for it's shared folders Could you give an example? Thanks!
(In reply to Christian Völker from comment #9) > Could you give an example? At first glance, the intial comment looks correct.
Got it finally! The mentioned article uses objectClass=univentionMailSharedFolder which will not convert OX folders. By using objectClass=oxSharedFolder in the six blocks (in the article) instead of previous univentionMailSharedFolder the commands should convert all OX folders properly.
Maybe use a shell variable to store the LDAP filter, in the article. That'll make it more readable and will allow to switch the filter easily for OX users.
The knowledge base articles have been updated to reflect the differences mentioned in #1.
Please clone the repository https://github.com/a-schild/cyrus2dovecot/ in case the author decides to make changes incompatible to the article or to withdraw the entire project. Continue to observe the original (upstream) repository for changes we wish to incorporate. Optional: link in the article to the script in our repository or a specific upstream version. "Dovecot lässt nur Anmeldungen mit der vollen Mail-Adresse zu (user1@example.org)" is not true. Usernames are also accepted. We do prefer that email addresses are used though. So I'm fine with this little lie. "Außerdem wird die" / "Außerdem werden die" "befinden als in folgenden" / "befinden als im folgenden" Ganz am Ende ist etwas mit der Formatierung kaputt.
This issue has been filed against UCS 4.3. UCS 4.3 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.