summaryrefslogtreecommitdiffstats
path: root/pykolab/plugins
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-02-12 17:06:08 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-02-12 17:06:08 +0100
commita806537852ad1d34a24abddb19be0615209fb055 (patch)
tree69e66bb2502d28e9dc8e285b46dd21f77957d5b2 /pykolab/plugins
parenta07c9bbf99eaf8f6337101cafa559af0e11b8671 (diff)
downloadpykolab-a806537852ad1d34a24abddb19be0615209fb055.tar.gz
Match messages without an X-Spam-Status header set, too
Diffstat (limited to 'pykolab/plugins')
-rw-r--r--pykolab/plugins/sievemgmt/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pykolab/plugins/sievemgmt/__init__.py b/pykolab/plugins/sievemgmt/__init__.py
index 42297a4..ade829d 100644
--- a/pykolab/plugins/sievemgmt/__init__.py
+++ b/pykolab/plugins/sievemgmt/__init__.py
@@ -356,7 +356,9 @@ class KolabSievemgmt(object):
mgmt_script.addfilter(rule_name, ['true'], forward_rules)
else:
- mgmt_script.addfilter(rule_name, [("X-Spam-Status", ":matches", "No,*")], forward_rules)
+ # NOTE: Messages with no X-Spam-Status header need to be matched
+ # too, and this does exactly that.
+ mgmt_script.addfilter(rule_name, [("not", ("X-Spam-Status", ":matches", "Yes,*"))], forward_rules)
if sdf_filter:
mgmt_script.addfilter('spam_delivery_folder', [("X-Spam-Status", ":matches", "Yes,*")], [("fileinto", "INBOX/Spam"), ("stop")])