From 961fa70163a7322f0aa6b466f6da77ea6dda0bcf Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Wed, 22 Feb 2017 11:39:09 +0200 Subject: [PATCH] [Minor] Rmilter headers: deal with missing reasons in DMARC --- src/plugins/lua/rmilter_headers.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/lua/rmilter_headers.lua b/src/plugins/lua/rmilter_headers.lua index 4e3eee0f8..77eed1785 100644 --- a/src/plugins/lua/rmilter_headers.lua +++ b/src/plugins/lua/rmilter_headers.lua @@ -237,7 +237,9 @@ local function rmilter_headers(task) local t = rspamd_str_split(common.symbols[auth_types['dmarc'][key]][1]['options'][1], ' : ') local dom = t[1] local rsn = t[2] - hdr = hdr .. ' reason="' .. rsn .. '"' + if rsn then + hdr = hdr .. ' reason="' .. rsn .. '"' + end hdr = hdr .. ' header.from=' .. dom if key == 'softfail' then hdr = hdr .. ' policy=none' -- 2.39.5