summaryrefslogtreecommitdiffstats
path: root/pykolab/cli
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/cli
parenta07c9bbf99eaf8f6337101cafa559af0e11b8671 (diff)
downloadpykolab-a806537852ad1d34a24abddb19be0615209fb055.tar.gz
Match messages without an X-Spam-Status header set, too
Diffstat (limited to 'pykolab/cli')
-rw-r--r--pykolab/cli/sieve/cmd_refresh.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pykolab/cli/sieve/cmd_refresh.py b/pykolab/cli/sieve/cmd_refresh.py
index 6c10dfa..b610e2d 100644
--- a/pykolab/cli/sieve/cmd_refresh.py
+++ b/pykolab/cli/sieve/cmd_refresh.py
@@ -344,7 +344,9 @@ def execute(*args, **kw):
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")])