]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Rmilter headers: deal with missing reasons in DMARC 1446/head
authorAndrew Lewis <nerf@judo.za.org>
Wed, 22 Feb 2017 09:39:09 +0000 (11:39 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Wed, 22 Feb 2017 09:39:09 +0000 (11:39 +0200)
src/plugins/lua/rmilter_headers.lua

index 4e3eee0f8eabfc901bfa226a661e5b6279956980..77eed1785f79a97ab7e9b517ca493a3aadf75e37 100644 (file)
@@ -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'