From e821b005fe3f575496ef025ca58096609f494283 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 24 Sep 2018 12:32:35 +0100 Subject: [PATCH] [Minor] More changes to the arc signing logic --- lualib/lua_dkim_tools.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lualib/lua_dkim_tools.lua b/lualib/lua_dkim_tools.lua index 7b0852d49..c9c969f4f 100644 --- a/lualib/lua_dkim_tools.lua +++ b/lualib/lua_dkim_tools.lua @@ -45,12 +45,15 @@ local function parse_dkim_http_headers(N, task, settings) -- Now check if we need to check the existing auth local hdr = task:get_request_header(headers.sign_on_reject_header) - if not hdr then + if not hdr or tostring(hdr) == '0' or tostring(hdr) == 'false' then -- Check for DKIM_REJECT - if task:has_symbol('R_DKIM_REJECT') then - local sym = task:get_symbol('R_DKIM_REJECT') - logger.infox(task, 'skip signing for %s:%s: R_DKIM_REJECT found: %s', - domain, selector, sym.options) + local sym_check = 'R_DKIM_REJECT' + + if N == 'arc' then sym_check = 'ARC_REJECT' end + if task:has_symbol(sym_check) then + local sym = task:get_symbol(sym_check) + logger.infox(task, 'skip signing for %s:%s: %s found: %s', + domain, selector, sym_check, sym.options) return false,{} end end -- 2.39.5