summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
Diffstat (limited to 'pykolab')
-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 e540bc0..046fdbd 100644
--- a/pykolab/imap/__init__.py
+++ b/pykolab/imap/__init__.py
@@ -385,6 +385,18 @@ class IMAP(object):
self.create_folder(folder_name, server)
+ # In a Cyrus IMAP Murder topology, wait for the murder to have settled
+ if hasattr(self.imap, 'murder') and self.imap.murder:
+ self.disconnect()
+ self.connect()
+
+ created = False
+ while not created:
+ created = self.has_folder(folder_name)
+ if not created:
+ log.info(_("Waiting for the Cyrus IMAP Murder to settle..."))
+ time.sleep(0.5)
+
if not self.domain == None:
if conf.has_option(self.domain, "autocreate_folders"):
_additional_folders = conf.get_raw(