summaryrefslogtreecommitdiffstats
path: root/pykolab/imap
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-01-25 18:52:44 +0000
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-01-25 18:52:44 +0000
commite61f69b7ea6a980b15369103b71e43f17ed74d5a (patch)
treeabe632a107a2eb4022d8717258a92d9ccc7ce834 /pykolab/imap
parent3dcfe802ed1533d928828b70ad0cb8656b450e49 (diff)
downloadpykolab-e61f69b7ea6a980b15369103b71e43f17ed74d5a.tar.gz
Log an error if the administrator password is empty
Subscribe the user to the folders we create despite the namespace
Diffstat (limited to 'pykolab/imap')
-rw-r--r--pykolab/imap/__init__.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/pykolab/imap/__init__.py b/pykolab/imap/__init__.py
index 705e09f..baf7b30 100644
--- a/pykolab/imap/__init__.py
+++ b/pykolab/imap/__init__.py
@@ -135,6 +135,9 @@ class IMAP(object):
admin_login = conf.get(backend, 'admin_login')
admin_password = conf.get(backend, 'admin_password')
+ if admin_password == None or admin_password == '':
+ log.error(_("No administrator password is available."))
+
if not self._imap.has_key(hostname):
if backend == 'cyrus-imap':
import cyrus
@@ -518,6 +521,15 @@ class IMAP(object):
if _folder.startswith(_test):
_subscribe = False
+ # If the namespace prefix for "shared" is "", we need to
+ # catch this.
+ for __test in _tests:
+ if _subscribe:
+ continue
+
+ if _folder.startswith(__test):
+ _subscribe = True
+
if _subscribe:
log.debug(_("Subscribing %s to folder %s") % (folder, _folder), level=8)
self.subscribe(_folder)