Bug 56648 - 40_mail.43_dovecot_shared_folder_create_subfolder_with_acls.py test fails
40_mail.43_dovecot_shared_folder_create_subfolder_with_acls.py test fails
Status: REOPENED
Product: UCS
Classification: Unclassified
Component: Mail
UCS 5.2
Other Linux
: P5 normal (vote)
: UCS 5.2
Assigned To: Juan Carlos
Mail maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2023-09-25 11:05 CEST by Juan Carlos
Modified: 2024-03-08 11:10 CET (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
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 Juan Carlos univentionstaff 2023-09-25 11:05:35 CEST
402023-08-31 20:34:47.66743141 Traceback (most recent call last):
402023-08-31 20:34:47.66744641   File "/usr/share/ucs-test/40_mail/43_dovecot_shared_folder_create_subfolder_with_acls.py", line 140, in <module>
402023-08-31 20:34:47.67137641     main()
402023-08-31 20:34:47.67141741   File "/usr/share/ucs-test/40_mail/43_dovecot_shared_folder_create_subfolder_with_acls.py", line 81, in main
402023-08-31 20:34:47.67142841     imap1.copy('1', 'INBOX', folder_name)
402023-08-31 20:34:47.67143941   File "/usr/share/ucs-test/40_mail/essential/mail.py", line 170, in copy
402023-08-31 20:34:47.67144941     rv, data = self.connection.copy(message_set, new_mailbox)
402023-08-31 20:34:47.67147041                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
402023-08-31 20:34:47.67148041   File "/usr/lib/python3.11/imaplib.py", line 486, in copy
402023-08-31 20:34:47.67149541     return self._simple_command('COPY', message_set, new_mailbox)
402023-08-31 20:34:47.67150541            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
402023-08-31 20:34:47.67151641   File "/usr/lib/python3.11/imaplib.py", line 1230, in _simple_command
402023-08-31 20:34:47.67152541     return self._command_complete(name, self._command(name, *args))
402023-08-31 20:34:47.67153541            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
402023-08-31 20:34:47.67154541   File "/usr/lib/python3.11/imaplib.py", line 1055, in _command_complete
402023-08-31 20:34:47.67155441     raise self.error('%s command error: %s %s' % (name, typ, data))
402023-08-31 20:34:47.67156641 imaplib.IMAP4.error: COPY command error: BAD [b'Error in IMAP command COPY: Invalid messageset (0.001 + 0.000 secs).']


https://git.knut.univention.de/univention/ucs/-/issues/1738
Comment 1 Florian Best univentionstaff 2023-10-11 13:23:52 CEST
We have a workaround in the tests currently.
The description of 3 failing tests is:

commit 7a83c0617f0096552f734c30476486b64f0c33a5
Author: Soenke Schwardt-Krummrich <schwardt@univention.de>
Date:   Sun Apr 30 17:09:36 2023 +0200

    DRPOME: Flush postfix queue and dovecot auth cache
    
    For some currently unknown reason, the dovecot's auth cache contains
    wrong information. The test mails are correctly delivered to
    /var/spool/dovecot/private///Maildir/....
    via SMTP and LMTP into the IMAP mailbox.
    But when ucs-test is accessing the mailbox via IMAP, the user
    information seem to be invalid/unknown/not yet correct, so dovecot
    is looking for the requested mailbox in
    /var/spool/dovecot/private//...
    which is obviously incorrect. This commit fixes the failure of the
    test but not the actual problem in/with dovecot.
    
    Bug #56648
 test/ucs-test/tests/40_mail/42_dovecot_rename_mail_primary_address.py              | 8 +++++---
 test/ucs-test/tests/40_mail/42_dovecot_rename_user.py                              | 6 ++++++
 test/ucs-test/tests/40_mail/43_dovecot_shared_folder_create_subfolder_with_acls.py | 6 ++++++

So I set this bug to REOPENED so that we fix the real issue in dovecot.
Comment 2 Florian Best univentionstaff 2024-02-13 15:15:40 CET
The latest analysis was, that there was a change in UCS 5.2 that it takes ~5 minutes so that the cache is invalidated.
That sounds too long. If we cannot fix this by config and restore the UCS 5.0 behavior, we could create a listener module which calls "doveadm auth cache flush" when a user changed his password or a user was removed.
Comment 3 Florian Best univentionstaff 2024-03-08 11:10:55 CET
ucs-test (12.0.9)
9531f36a279d | DROPME: disable dovecot auth cache in tests