]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] More changes to the arc signing logic
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 24 Sep 2018 11:32:35 +0000 (12:32 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 24 Sep 2018 11:32:35 +0000 (12:32 +0100)
lualib/lua_dkim_tools.lua

index 7b0852d4953a84cde91505982c645ff27143b35b..c9c969f4fc05682acefaec6d390721a8a5b6e618 100644 (file)
@@ -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