aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Louis Dupond <jean-louis@dupond.be>2022-01-03 13:42:49 +0100
committerJean-Louis Dupond <jean-louis@dupond.be>2022-01-03 13:42:49 +0100
commit5cdb5cd3dcb33bab801328ed8073c858c16a120a (patch)
treebf04a558139d35f00e1da9076bc0ca2de20e4906
parent4b969396176c98f75fff76d811e4c9f6b21432a3 (diff)
downloadrspamd-5cdb5cd3dcb33bab801328ed8073c858c16a120a.tar.gz
rspamd-5cdb5cd3dcb33bab801328ed8073c858c16a120a.zip
[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.
-rw-r--r--src/plugins/lua/metadata_exporter.lua4
1 files changed, 4 insertions, 0 deletions
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)