From ae2ba60049a4e5c4e4ea427dfb59a63547a683ea Mon Sep 17 00:00:00 2001 From: Liutauras Adomaitis Date: Mon, 12 Mar 2018 15:18:56 +0200 Subject: In some cases kolabd fails to cleanly update IMAP mailbox after LDAP changes. That is usual when result_attribute value is in upper case. Mailbox modification seems to follow slightly different code path, by shortcutting to IMAP pykolab function... Summary: ..."has_folder()" instead of going via "user_mailbox_exists()", which has a code to downcase mailbox name. Do not shortcut to "has_folder()" function, use "user_mailbox_exists()" to downcase mailbox name before checking if it exists. Test Plan: none Reviewers: vanmeeuwen, machniak Reviewed By: machniak Subscribers: adomaitis, petersen, machniak, vanmeeuwen Differential Revision: https://git.kolab.org/D571 --- pykolab/auth/ldap/__init__.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py index 39aab5d..5efa9dc 100644 --- a/pykolab/auth/ldap/__init__.py +++ b/pykolab/auth/ldap/__init__.py @@ -2074,12 +2074,7 @@ class LDAP(pykolab.base.Base): cache.get_entry(self.domain, entry) else: - imap_mailbox = "user%s%s" % ( - self.imap.get_separator(), - entry[result_attribute] - ) - - if not self.imap.has_folder(imap_mailbox): + if not self.imap.user_mailbox_exists(entry[result_attribute]): self.imap.user_mailbox_create( entry[result_attribute] ) -- cgit v1.1