commit a0abf27: [Minor] Add explicit_disable flag to metadata exporter

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Jun 5 15:56:06 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-06-05 15:56:34 +0100
URL: https://github.com/rspamd/rspamd/commit/a0abf274881281f3c7e7d604ab94bf3421b973d5 (HEAD -> master)

[Minor] Add explicit_disable flag to metadata exporter
Issue: #3393
Closes: #3393

---
 src/plugins/lua/force_actions.lua     | 4 ++--
 src/plugins/lua/metadata_exporter.lua | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/plugins/lua/force_actions.lua b/src/plugins/lua/force_actions.lua
index 9654a836e..eca63726e 100644
--- a/src/plugins/lua/force_actions.lua
+++ b/src/plugins/lua/force_actions.lua
@@ -71,7 +71,7 @@ local function gen_cb(expr, act, pool, message, subject, raction, honor, limit,
       if not selector then
         selector_cache[selector_expr] = lua_selectors.create_selector_closure(rspamd_config, selector_expr, '', true)
         selector = selector_cache[selector_expr]
-        if not selector then 
+        if not selector then
           rspamd_logger.errx(task, 'could not create selector [%1]', selector_expr)
           return "((could not create selector))"
         end
@@ -86,7 +86,7 @@ local function gen_cb(expr, act, pool, message, subject, raction, honor, limit,
         extracted = '((error extracting value))'
       end
       return extracted
-    end 
+    end
 
     local cact = task:get_metric_action('default')
     if cact == act then
diff --git a/src/plugins/lua/metadata_exporter.lua b/src/plugins/lua/metadata_exporter.lua
index 27b0b10f6..20457461b 100644
--- a/src/plugins/lua/metadata_exporter.lua
+++ b/src/plugins/lua/metadata_exporter.lua
@@ -612,6 +612,6 @@ for k, r in pairs(settings.rules) do
     type = 'idempotent',
     callback = gen_exporter(r),
     priority = 10,
-    flags = 'empty',
+    flags = 'empty,explicit_disable,ignore_passthrough',
   })
 end


More information about the Commits mailing list