diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py --- a/pykolab/auth/ldap/__init__.py +++ b/pykolab/auth/ldap/__init__.py @@ -1859,10 +1859,8 @@ ) elif not entry_changes[result_attribute] == old_canon_attr: - self.imap.user_mailbox_rename( - old_canon_attr, - entry_changes[result_attribute] - ) + # do not rename an existing mailbox + entry_changes[result_attribute] = old_canon_attr cache.get_entry(self.domain, entry) @@ -2011,10 +2009,8 @@ ) else: - self.imap.user_mailbox_rename( - old_canon_attr, - entry_changes[result_attribute] - ) + # do not rename an existing mailbox + entry_changes[result_attribute] = old_canon_attr entry[result_attribute] = entry_changes[result_attribute] cache.get_entry(self.domain, entry) @@ -2026,10 +2022,8 @@ ) else: - self.imap.user_mailbox_rename( - old_canon_attr, - entry[result_attribute] - ) + # do not rename an existing mailbox + entry[result_attribute] = old_canon_attr cache.get_entry(self.domain, entry) else: @@ -2199,10 +2193,8 @@ if entry_changes.has_key(result_attribute) and not old_canon_attr == None: if not entry_changes[result_attribute] == old_canon_attr: - self.imap.user_mailbox_rename( - old_canon_attr, - entry_changes[result_attribute] - ) + # do not rename an existing mailbox + entry_changes[result_attribute] = old_canon_attr for key in entry_changes.keys(): entry[key] = entry_changes[key]