]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Dkim_signing: Add exclusion for sign networks
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 9 Apr 2019 11:47:40 +0000 (12:47 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 9 Apr 2019 11:47:40 +0000 (12:47 +0100)
lualib/lua_dkim_tools.lua

index bdfd8abfc43a266abaf378c80c5ce18f4e430900..b996e96a482b12236a7ef0c1dd05ac4774bf572e 100644 (file)
@@ -204,6 +204,12 @@ local function prepare_dkim_signing(N, task, settings)
 
   if settings.signing_table and settings.key_table then
     -- OpenDKIM style
+    if settings.sign_networks and not is_sign_networks then
+      lua_util.debugm(N, task,
+          'signing_table: sign networks specified but IP is not from that network, skip signing')
+      return false,{}
+    end
+
     if not hfrom or not hfrom[1] or not hfrom[1].addr then
       lua_util.debugm(N, task,
           'signing_table: cannot get data when no header from is presented')