summaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-04-09 12:47:40 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-04-09 12:47:40 +0100
commit530e595772bf0a1aa9d8be715da6ab4987d4ecae (patch)
tree61251f95bfebbfa8e0fc3144aba4fe0fd0ad4ca8 /lualib
parent4e9c57b2182b43e60ac8454b0eaadf5b5612e4be (diff)
downloadrspamd-530e595772bf0a1aa9d8be715da6ab4987d4ecae.tar.gz
rspamd-530e595772bf0a1aa9d8be715da6ab4987d4ecae.zip
[Minor] Dkim_signing: Add exclusion for sign networks
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_dkim_tools.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/lualib/lua_dkim_tools.lua b/lualib/lua_dkim_tools.lua
index bdfd8abfc..b996e96a4 100644
--- a/lualib/lua_dkim_tools.lua
+++ b/lualib/lua_dkim_tools.lua
@@ -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')