From: Vsevolod Stakhov Date: Wed, 30 Aug 2017 19:33:41 +0000 (+0100) Subject: [Fix] Treat 'rewrite subject' as spam action X-Git-Tag: 1.6.4~21 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e5220b19cf48315e108e03b16ab92d7bb014851f;p=rspamd.git [Fix] Treat 'rewrite subject' as spam action Issue: #1803 Closes: #1803 --- diff --git a/src/plugins/lua/metadata_exporter.lua b/src/plugins/lua/metadata_exporter.lua index 2268c86f5..9c883a22b 100644 --- a/src/plugins/lua/metadata_exporter.lua +++ b/src/plugins/lua/metadata_exporter.lua @@ -154,20 +154,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')