]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Treat 'rewrite subject' as spam action
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 30 Aug 2017 19:33:41 +0000 (20:33 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 30 Aug 2017 19:33:41 +0000 (20:33 +0100)
Issue: #1803
Closes: #1803
src/plugins/lua/metadata_exporter.lua

index 128da3dc8e00a33d75c8d7c69109708543b51b33..90ec8a4fd67293e7ca60958fcdd836aecfa3b0ae 100644 (file)
@@ -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')