Branch 'pykolab-0.5' - 3 commits - kolabd/kolabd.sysvinit pykolab/imap saslauthd/kolab-saslauthd.sysvinit wallace/wallace.sysvinit
Jeroen van Meeuwen
vanmeeuwen at kolabsys.com
Thu Aug 23 16:40:09 CEST 2012
kolabd/kolabd.sysvinit | 12 +++++++++---
pykolab/imap/__init__.py | 4 ++++
pykolab/imap/cyrus.py | 5 +++++
saslauthd/kolab-saslauthd.sysvinit | 12 +++++++++---
wallace/wallace.sysvinit | 12 +++++++++---
5 files changed, 36 insertions(+), 9 deletions(-)
New commits:
commit 03679a41adf3261724836f5aa326f2c2305a790f
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date: Thu Aug 23 15:37:21 2012 +0100
Clause the inclusion of /etc/init.d/functions (it should exist)
Include /etc/default/$service if the file exists
Both changes work towards resolving #972
diff --git a/kolabd/kolabd.sysvinit b/kolabd/kolabd.sysvinit
index 9f452ff..302dfa9 100644
--- a/kolabd/kolabd.sysvinit
+++ b/kolabd/kolabd.sysvinit
@@ -12,8 +12,8 @@
# Provides: kolabd
# Default-Start: -
# Default-Stop: 0 1 2 6
-# Required-Start: $local_fs $network
-# Required-Stop: $local_fs $network
+# Required-Start: $remote_fs $local_fs $network
+# Required-Stop: $remote_fs $local_fs $network
# Short-Description: Start/Stop the Kolab Server daemon
# Description: The Kolab server is a server process which synchronizes
# LDAP, SQL and other authentication databases with Cyrus IMAP,
@@ -21,7 +21,9 @@
### END INIT INFO
# Source function library.
-. /etc/init.d/functions
+if [ -f /etc/init.d/functions ]; then
+ . /etc/init.d/functions
+fi
# Source our configuration file for these variables.
FLAGS="--fork -l warning"
@@ -30,6 +32,10 @@ if [ -f /etc/sysconfig/kolabd ] ; then
. /etc/sysconfig/kolabd
fi
+if [ -f /etc/default/kolabd ]; then
+ . /etc/default/kolabd
+fi
+
RETVAL=0
# Set up some common variables before we launch into what might be
diff --git a/saslauthd/kolab-saslauthd.sysvinit b/saslauthd/kolab-saslauthd.sysvinit
index cc1715e..033bbc7 100644
--- a/saslauthd/kolab-saslauthd.sysvinit
+++ b/saslauthd/kolab-saslauthd.sysvinit
@@ -11,15 +11,17 @@
# Provides: kolab-saslauthd
# Default-Start: -
# Default-Stop: 0 1 2 6
-# Required-Start: $local_fs $network
-# Required-Stop: $local_fs $network
+# Required-Start: $remote_fs $local_fs $network
+# Required-Stop: $remote_fs $local_fs $network
# Short-Description: Start/Stop the Kolab SASL authentication daemon
# Description: The Kolab saslauthd is a server process which handles \
# authentication requests on behalf of the cyrus-sasl library.
### END INIT INFO
# Source function library.
-. /etc/init.d/functions
+if [ -f /etc/init.d/functions ]; then
+ . /etc/init.d/functions
+fi
# Source our configuration file for these variables.
SOCKETDIR=/var/run/saslauthd
@@ -29,6 +31,10 @@ if [ -f /etc/sysconfig/kolab-saslauthd ] ; then
. /etc/sysconfig/kolab-saslauthd
fi
+if [ -f /etc/default/kolab-saslauthd ]; then
+ . /etc/default/kolab-saslauthd
+fi
+
RETVAL=0
# Set up some common variables before we launch into what might be
diff --git a/wallace/wallace.sysvinit b/wallace/wallace.sysvinit
index efdbe2d..4848827 100644
--- a/wallace/wallace.sysvinit
+++ b/wallace/wallace.sysvinit
@@ -10,14 +10,16 @@
# Provides: wallaced
# Default-Start: -
# Default-Stop: 0 1 2 6
-# Required-Start: $local_fs $network
-# Required-Stop: $local_fs $network
+# Required-Start: $remote_fs $local_fs $network
+# Required-Stop: $remote_fs $local_fs $network
# Short-Description: Start/Stop the Kolab Server daemon
# Description: The Kolab Wallace server daemon is a content filtering daemon.
### END INIT INFO
# Source function library.
-. /etc/init.d/functions
+if [ -f /etc/init.d/functions ]; then
+ . /etc/init.d/functions
+fi
# Source our configuration file for these variables.
FLAGS="--fork -l warning"
@@ -28,6 +30,10 @@ if [ -f /etc/sysconfig/wallace ] ; then
. /etc/sysconfig/wallace
fi
+if [ -f /etc/default/wallace ]; then
+ . /etc/default/wallace
+fi
+
RETVAL=0
# Set up some common variables before we launch into what might be
commit e23e8ea12e43dfcf58a90f477ff2be31f21b71ec
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date: Thu Aug 23 15:38:27 2012 +0100
Reconnect after "login as..."
diff --git a/pykolab/imap/__init__.py b/pykolab/imap/__init__.py
index f0cb9be..3eb6de4 100644
--- a/pykolab/imap/__init__.py
+++ b/pykolab/imap/__init__.py
@@ -490,6 +490,8 @@ class IMAP(object):
_tests.append(_shared)
for _folder in self.lm():
+ log.debug(_("Folder %s") % (_folder), level=8)
+
_subscribe = True
for _test in _tests:
@@ -500,9 +502,11 @@ class IMAP(object):
_subscribe = False
if _subscribe:
+ log.debug(_("Subscribing %s to folder %s") % (folder, _folder), level=8)
self.subscribe(_folder)
self.logout()
+ self.connect(domain=self.domain)
def user_mailbox_delete(self, mailbox_base_name):
"""
commit 71bbac8d8f9ee0b4222a373c9c42b4d049dec1ee
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date: Thu Aug 23 15:39:17 2012 +0100
Catch situations in which we have not gotten the appropriate separator yet
diff --git a/pykolab/imap/cyrus.py b/pykolab/imap/cyrus.py
index 9b291bf..02a49b4 100644
--- a/pykolab/imap/cyrus.py
+++ b/pykolab/imap/cyrus.py
@@ -122,6 +122,8 @@ class Cyrus(cyruslib.CYRUS):
imap = IMAP()
imap.connect(uri=uri)
+ if not self.SEP == self.separator:
+ self.separator = self.SEP
def login(self, *args, **kw):
"""
@@ -314,6 +316,9 @@ class Cyrus(cyruslib.CYRUS):
'domain': None
}
+ if len(mailfolder.split('/')) > 1:
+ self.separator = '/'
+
# Split off the virtual domain identifier, if any
if len(mailfolder.split('@')) > 1:
mbox['domain'] = mailfolder.split('@')[1]
More information about the commits
mailing list