aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-08-30 20:33:41 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-08-30 20:33:41 +0100
commitd0d697b41d04f434bafdfe35713b8501fc5f850a (patch)
tree01ead0ea79c06aad6a2e21408bc8df0fe10ee3f6
parent9a34311af7fc23f030540993a607e1370ed9c74f (diff)
downloadrspamd-d0d697b41d04f434bafdfe35713b8501fc5f850a.tar.gz
rspamd-d0d697b41d04f434bafdfe35713b8501fc5f850a.zip
[Fix] Treat 'rewrite subject' as spam action
Issue: #1803 Closes: #1803
-rw-r--r--src/plugins/lua/metadata_exporter.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/lua/metadata_exporter.lua b/src/plugins/lua/metadata_exporter.lua
index 128da3dc8..90ec8a4fd 100644
--- a/src/plugins/lua/metadata_exporter.lua
+++ b/src/plugins/lua/metadata_exporter.lua
@@ -189,20 +189,24 @@ local formatters = {
end
}
+local function is_spam(action)
+ return (action == 'reject' or action == 'add header' or action == 'rewrite subject')
+end
+
local selectors = {
default = function(task)
return true
end,
is_spam = function(task)
local action = task:get_metric_action('default')
- return (action == 'reject' or action == 'add header')
+ return is_spam(action)
end,
is_spam_authed = function(task)
if not task:get_user() then
return false
end
local action = task:get_metric_action('default')
- return (action == 'reject' or action == 'add header')
+ return is_spam(action)
end,
is_reject = function(task)
local action = task:get_metric_action('default')