summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-01-09 14:01:28 +0000
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-01-09 14:01:28 +0000
commit567b82e0cdd8359a02730fd4ab6921636b7d82f5 (patch)
treefce18f3c7b180e0834cb368d7bb493932864f3cb /pykolab
parent8adf015a4dd7944ee4e8c6d29b4578da496ae2ad (diff)
downloadpykolab-567b82e0cdd8359a02730fd4ab6921636b7d82f5.tar.gz
Require at least one extension (that does not hurt)
Fix indentation of user defined script inclusion
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/cli/sieve/cmd_refresh.py4
-rw-r--r--pykolab/plugins/sievemgmt/__init__.py4
2 files changed, 7 insertions, 1 deletions
diff --git a/pykolab/cli/sieve/cmd_refresh.py b/pykolab/cli/sieve/cmd_refresh.py
index 226fb93..8d5703f 100644
--- a/pykolab/cli/sieve/cmd_refresh.py
+++ b/pykolab/cli/sieve/cmd_refresh.py
@@ -257,6 +257,8 @@ def execute(*args, **kw):
for required_extension in mgmt_required_extensions:
mgmt_script.require(required_extension)
+ mgmt_script.require('fileinto')
+
if vacation_active:
if not vacation_react_domains == None and len(vacation_react_domains) > 0:
mgmt_script.addfilter(
@@ -349,6 +351,8 @@ def execute(*args, **kw):
mgmt_script = mgmt_script.__str__()
+ log.debug(_("MANAGEMENT Script contents: %r") % (mgmt_script), level=9)
+
result = sieveclient.putscript("MANAGEMENT", mgmt_script)
if not result:
diff --git a/pykolab/plugins/sievemgmt/__init__.py b/pykolab/plugins/sievemgmt/__init__.py
index 1e22a47..e87381c 100644
--- a/pykolab/plugins/sievemgmt/__init__.py
+++ b/pykolab/plugins/sievemgmt/__init__.py
@@ -270,6 +270,8 @@ class KolabSievemgmt(object):
for required_extension in mgmt_required_extensions:
mgmt_script.require(required_extension)
+ mgmt_script.require('fileinto')
+
if vacation_active:
if not vacation_react_domains == None and len(vacation_react_domains) > 0:
mgmt_script.addfilter(
@@ -381,7 +383,7 @@ require ["include"];
print "Including script %s in USER" % (script)
user_script = """%s
- include :personal "%s";
+include :personal "%s";
""" % (user_script, script)
result = sieveclient.putscript("USER", user_script)