summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2019-10-08 13:16:22 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2019-10-08 13:16:22 +0200
commit90b53863e43c568f9ed1fcfa932f8ace558ebe34 (patch)
tree2f0b5566a963fb5029b054c054f811f71bc9d365 /pykolab
parent894df668e96af15b172eff9b0e4ffcb42aa76084 (diff)
downloadpykolab-90b53863e43c568f9ed1fcfa932f8ace558ebe34.tar.gz
Fix configuration compability with stock Debian cyrus imapd
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/setup/setup_imap.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/pykolab/setup/setup_imap.py b/pykolab/setup/setup_imap.py
index 584787c..5b6747d 100644
--- a/pykolab/setup/setup_imap.py
+++ b/pykolab/setup/setup_imap.py
@@ -49,6 +49,17 @@ def execute(*args, **kw):
Apply the necessary settings to /etc/imapd.conf
"""
+ configdirectory = "/var/lib/imap/"
+ partition_default = "/var/spool/imap/"
+ sievedir = "/var/lib/imap/sieve/"
+
+ if os.path.isdir("/var/lib/cyrus/"):
+ configdirectory = "/var/lib/cyrus/"
+ sievedir = "/var/lib/cyrus/sieve/"
+
+ if os.path.isdir("/var/spool/cyrus/"):
+ partition_default = "/var/spool/cyrus/"
+
imapd_settings = {
"ldap_servers": conf.get('ldap', 'ldap_uri'),
"ldap_base": conf.get('ldap', 'base_dn'),
@@ -64,6 +75,9 @@ def execute(*args, **kw):
"ldap_member_attribute": "nsrole",
"admins": conf.get('cyrus-imap', 'admin_login'),
"postuser": "shared",
+ "configdirectory": configdirectory,
+ "partition_default": partition_default,
+ "sievedir": sievedir
}
template_file = None