summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-07-06 10:06:48 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-07-06 10:07:00 (GMT)
commit84f8fc974e7847ab325fbefa40041d97fe5cc216 (patch)
treef0959603c9787b616b4c6d149c16f610c00389cc
parenta35735afa63e61fd49d7cc80f0001988414edbaa (diff)
downloadpykolab-84f8fc974e7847ab325fbefa40041d97fe5cc216.tar.gz
Use utf-7 names when deleting folders by wildcard match as well
-rw-r--r--pykolab/imap/cyrus.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/pykolab/imap/cyrus.py b/pykolab/imap/cyrus.py
index 079c4dc..9a8e97c 100644
--- a/pykolab/imap/cyrus.py
+++ b/pykolab/imap/cyrus.py
@@ -193,6 +193,14 @@ class Cyrus(cyruslib.CYRUS):
return server
+ def folder_utf7(self, folder):
+ from pykolab import imap_utf7
+ return imap_utf7.encode(folder)
+
+ def folder_utf8(self, folder):
+ from pykolab import imap_utf7
+ return imap_utf7.decode(folder)
+
def _setquota(self, mailfolder, quota):
"""
Login to the actual backend server.
@@ -355,7 +363,7 @@ class Cyrus(cyruslib.CYRUS):
if not mbox['domain'] == None:
verify_folder_search = "%s@%s" % (verify_folder_search, mbox['domain'])
- folders = self.lm(verify_folder_search)
+ folders = self.lm(self.folder_utf7(verify_folder_search))
# NOTE: Case also covered is valid hexadecimal folders; won't be the
# actual check as intended, but doesn't give you anyone else's data