commit 5cdb5cd: [Minor] Add no soft reject selector for metadata exporter

Jean-Louis Dupond jean-louis at dupond.be
Mon Jan 3 22:00:04 UTC 2022


Author: Jean-Louis Dupond
Date: 2022-01-03 13:42:49 +0100
URL: https://github.com/rspamd/rspamd/commit/5cdb5cd3dcb33bab801328ed8073c858c16a120a (refs/pull/4031/head)

[Minor] Add no soft reject selector for metadata exporter
I think its quite common to not export soft rejects via the metadata
exporter. Because when its not spam, the sender will most likely try to
redeliver it again anyway.

---
 src/plugins/lua/metadata_exporter.lua | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/plugins/lua/metadata_exporter.lua b/src/plugins/lua/metadata_exporter.lua
index b6ad3363d..118d3eda1 100644
--- a/src/plugins/lua/metadata_exporter.lua
+++ b/src/plugins/lua/metadata_exporter.lua
@@ -245,6 +245,10 @@ local selectors = {
     local action = task:get_metric_action('default')
     return (action == 'reject')
   end,
+  is_not_soft_reject = function(task)
+    local action = task:get_metric_action('default')
+    return (action ~= 'soft reject')
+  end,
 }
 
 local function maybe_defer(task, rule)


More information about the Commits mailing list