Projects
Kolab:3.4
pykolab
pykolab-0.6.11-match-messages-with-no-xspamhead...
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pykolab-0.6.11-match-messages-with-no-xspamheader-too.patch of Package pykolab (Revision 60)
Currently displaying revision
60
,
Show latest
commit 4aa15736969edcf354155f36d99cd53f17be66c1 Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Date: Wed Feb 12 17:06:08 2014 +0100 Match messages without an X-Spam-Status header set, too 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")]) 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")])
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.