From 270862fedadfd2fb45ef3874b0e0798726dbeadf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Janne=20He=C3=9F?= Date: Tue, 2 Jun 2020 16:15:14 +0200 Subject: [PATCH] Fix some DMARC issues These issues were reported in #2872 which was closed by the stale bot. This addresses the first two issues by getting rid of the string "softfail" and by fixing the reason. --- src/plugins/lua/dmarc.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua index 4a68026c2..635e6c1d0 100644 --- a/src/plugins/lua/dmarc.lua +++ b/src/plugins/lua/dmarc.lua @@ -218,9 +218,10 @@ local function dmarc_report(task, spf_ok, dkim_ok, disposition, local dkim_fail = table.concat(dres.fail or E, '|') local dkim_temperror = table.concat(dres.temperror or E, '|') local dkim_permerror = table.concat(dres.permerror or E, '|') + local disposition_to_return = if disposition == "softfail" then "none" else disposition local res = table.concat({ ip:to_string(), spf_ok, dkim_ok, - disposition, (sampled_out and 'sampled_out' or ''), hfromdom, + disposition_to_return, (sampled_out and 'sampled_out' or ''), hfromdom, dkim_pass, dkim_fail, dkim_temperror, dkim_permerror, spfdom, spf_result}, ',') return res @@ -817,7 +818,7 @@ if opts['reporting'] == true then }), } if data.override ~= '' then - table.insert(buf, string.format('%s', data.override)) + table.insert(buf, string.format('%s', data.override)) end table.insert(buf, table.concat({ '', data.header_from, -- 2.39.5