From: Vsevolod Stakhov Date: Mon, 24 Sep 2018 11:32:35 +0000 (+0100) Subject: [Minor] More changes to the arc signing logic X-Git-Tag: 1.8.0~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e821b005fe3f575496ef025ca58096609f494283;p=thirdparty%2Frspamd.git [Minor] More changes to the arc signing logic --- diff --git a/lualib/lua_dkim_tools.lua b/lualib/lua_dkim_tools.lua index 7b0852d495..c9c969f4fc 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