summaryrefslogtreecommitdiffstats
path: root/pykolab/imap
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-09-07 13:12:42 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-09-07 13:12:42 +0100
commitf49cc6d32a36c51b4eb1932b65ad5d2f0780bb9c (patch)
tree9c6249a33987eabd79bde8427af4be28a546c11a /pykolab/imap
parent24a4151e195881da224c870dd505e2963fb770b9 (diff)
downloadpykolab-f49cc6d32a36c51b4eb1932b65ad5d2f0780bb9c.tar.gz
Make sure quota changes propagate from LDAP to IMAP
Diffstat (limited to 'pykolab/imap')
-rw-r--r--pykolab/imap/__init__.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/pykolab/imap/__init__.py b/pykolab/imap/__init__.py
index c6e3889..391714d 100644
--- a/pykolab/imap/__init__.py
+++ b/pykolab/imap/__init__.py
@@ -416,9 +416,11 @@ class IMAP(object):
)
if len(folder.split('@')) > 1:
+ localpart = folder.split('@')[0]
domain = folder.split('@')[1]
domain_suffix = "@%s" % (domain)
else:
+ localpart = folder
domain = None
domain_suffix = ""
@@ -465,7 +467,14 @@ class IMAP(object):
self.connect(domain=self.domain)
for additional_folder in additional_folders.keys():
- folder_name = additional_folder
+ folder_name = "user%s%s%s%s%s" % (
+ self.imap.separator,
+ localpart,
+ self.imap.separator,
+ additional_folder,
+ domain_suffix
+ )
+
if additional_folders[additional_folder].has_key("quota"):
self.imap.sq(
folder_name,