summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pykolab/setup/setup_imap.py14
-rw-r--r--share/templates/imapd.conf.tpl6
2 files changed, 17 insertions, 3 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
diff --git a/share/templates/imapd.conf.tpl b/share/templates/imapd.conf.tpl
index 6437949..72269fb 100644
--- a/share/templates/imapd.conf.tpl
+++ b/share/templates/imapd.conf.tpl
@@ -1,7 +1,7 @@
-configdirectory: /var/lib/imap
-partition-default: /var/spool/imap
+configdirectory: $configdirectory
+partition-default: $partition_default
admins: $admins
-sievedir: /var/lib/imap/sieve
+sievedir: $sievedir
sendmail: /usr/sbin/sendmail
sasl_pwcheck_method: saslauthd
sasl_mech_list: PLAIN LOGIN