From: Andrew Lewis Date: Wed, 22 Feb 2017 09:39:09 +0000 (+0200) Subject: [Minor] Rmilter headers: deal with missing reasons in DMARC X-Git-Tag: 1.5.0~60^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=961fa70163a7322f0aa6b466f6da77ea6dda0bcf;p=rspamd.git [Minor] Rmilter headers: deal with missing reasons in DMARC --- 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'