]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Add no soft reject selector for metadata exporter 4031/head
authorJean-Louis Dupond <jean-louis@dupond.be>
Mon, 3 Jan 2022 12:42:49 +0000 (13:42 +0100)
committerJean-Louis Dupond <jean-louis@dupond.be>
Mon, 3 Jan 2022 12:42:49 +0000 (13:42 +0100)
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

index b6ad3363d8deea37c431e2f7c636086775b27eee..118d3eda1727caaf7136a8e4f1bbe01cddb20de2 100644 (file)
@@ -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)