summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-09-15 11:49:16 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-09-15 11:49:16 +0100
commit1dad011fd3005577481b359426cebe5fb41743fa (patch)
treefbf23fa2924b8f114f51c72ffca37947ec523ce1
parentb70dafa058433b36a336e22897853f4dce9382d2 (diff)
downloadpykolab-1dad011fd3005577481b359426cebe5fb41743fa.tar.gz
Make sure the user mailbox name is lower-cased when comparing to normalized user mailbox names in IMAP
-rw-r--r--pykolab/auth/ldap/__init__.py4
-rw-r--r--pykolab/imap/__init__.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index e0128cc..e3ca936 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -1184,14 +1184,14 @@ class LDAP(pykolab.base.Base):
self.imap.connect(domain=self.domain)
- if not self.imap.user_mailbox_exists(entry[result_attribute]):
+ if not self.imap.user_mailbox_exists(entry[result_attribute].lower()):
folder = self.imap.user_mailbox_create(
entry[result_attribute],
entry[mailserver_attribute]
)
else:
- folder = "user%s%s" % (self.imap.separator,entry[result_attribute])
+ folder = "user%s%s" % (self.imap.separator,entry[result_attribute].lower())
server = self.imap.user_mailbox_server(folder)
diff --git a/pykolab/imap/__init__.py b/pykolab/imap/__init__.py
index 20e284b..adf0006 100644
--- a/pykolab/imap/__init__.py
+++ b/pykolab/imap/__init__.py
@@ -602,7 +602,7 @@ class IMAP(object):
log.warning(_("Moving INBOX folder %s won't succeed as target folder %s already exists") % (old_name,new_name))
def user_mailbox_server(self, mailbox):
- return self.imap.find_mailfolder_server(mailbox)
+ return self.imap.find_mailfolder_server(mailbox.lower())
def has_folder(self, folder):
"""