Bug 47699 - Cyrus2Dovecot Migration ignores shared folders without mail address as well as OX shared folders
Cyrus2Dovecot Migration ignores shared folders without mail address as well a...
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: Mail
UCS 4.3
Other Linux
: P5 normal (vote)
: ---
Assigned To: Nico Stöckigt
Daniel Tröder
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-08-30 13:42 CEST by Nico Stöckigt
Modified: 2021-05-14 16:33 CEST (History)
7 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.143
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2018082721000194, 2019030721000363
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Stöckigt univentionstaff 2018-08-30 13:42:21 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
Comment 1 Nico Stöckigt univentionstaff 2018-08-30 13:55:09 CEST
the error messages above might result from Bug#34129 which is not related to the behavior described here!
Comment 2 Stefan Gohmann univentionstaff 2018-10-16 16:49:49 CEST
Is 'Waiting support' correct here? The ticket was closed successfully and the issue is defined as 'Development Internal'.
Comment 3 Nico Stöckigt univentionstaff 2018-10-16 17:05:05 CEST
I removed the 'waiting Support' Flag due to the ticket was closed using a workaround and there is no urgent action needed.
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2018-10-17 10:24:05 CEST
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
Comment 5 Christian Völker univentionstaff 2019-03-13 09:08:07 CET
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?
Comment 6 Erik Damrose univentionstaff 2019-03-13 10:00:30 CET
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?
Comment 7 Christian Völker univentionstaff 2019-03-13 11:55:12 CET
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!"
Comment 8 Sönke Schwardt-Krummrich univentionstaff 2019-03-13 14:03:55 CET
(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.
Comment 9 Christian Völker univentionstaff 2019-03-15 15:18:02 CET
(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!
Comment 10 Sönke Schwardt-Krummrich univentionstaff 2019-03-18 11:12:36 CET
(In reply to Christian Völker from comment #9)
> Could you give an example?

At first glance, the intial comment looks correct.
Comment 11 Christian Völker univentionstaff 2019-03-21 10:40:25 CET
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.
Comment 12 Daniel Tröder univentionstaff 2019-03-21 11:15:05 CET
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.
Comment 13 Nico Stöckigt univentionstaff 2019-03-26 17:51:01 CET
The knowledge base articles have been updated to reflect the differences mentioned in #1.
Comment 14 Daniel Tröder univentionstaff 2019-04-17 13:47:48 CEST
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.
Comment 15 Ingo Steuwer univentionstaff 2021-05-14 15:41:07 CEST
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.