diff options
authorJeroen van Meeuwen (Kolab Systems) <>2014-01-14 13:18:12 +0100
committerJeroen van Meeuwen (Kolab Systems) <>2014-01-15 16:20:24 +0100
commit22035823051733b2a5f74b10610139ceaadde421 (patch)
parente771aa6abbc258c13772211028dcdf525cab4ba9 (diff)
Verbose logging about the tests we execute to see if a user needs to be subscribed to a particular (additional) folder.
Attempt to subscribe, but fail without a traceback should subscribing not succeed. Verbose logging on the server address found for a mailbox, for the purpose of troubleshooting deployments that exploit case-sensitivity of server addresses. Conflicts: pykolab/imap/
1 files changed, 11 insertions, 2 deletions
diff --git a/pykolab/imap/ b/pykolab/imap/
index 15eca90..ffba13d 100644
--- a/pykolab/imap/
+++ b/pykolab/imap/
@@ -468,6 +468,10 @@ class IMAP(object):
for _shared in shared:
+ log.debug(_("Using the following tests for folder subscriptions:"), level=8)
+ for _test in _tests:
+ log.debug(_(" %r") % (_test), level=8)
for _folder in self.lm():
log.debug(_("Folder %s") % (_folder), level=8)
@@ -482,7 +486,10 @@ class IMAP(object):
if _subscribe:
log.debug(_("Subscribing %s to folder %s") % (folder, _folder), level=8)
- self.subscribe(_folder)
+ try:
+ self.subscribe(_folder)
+ except Exception, errmsg:
+ log.error(_("Subscribing %s to folder %s failed: %r") % (folder, _folder, errmsg))
@@ -540,7 +547,9 @@ 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)
+ server = self.imap.find_mailfolder_server(mailbox.lower()).lower()
+ log.debug(_("Server for mailbox %r is %r") % (mailbox, server), level=8)
+ return server
def has_folder(self, folder):