aboutsummaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorJohn McKay <adenosine3p@gmail.com>2019-01-26 06:34:41 +0000
committerJohn McKay <adenosine3p@gmail.com>2019-02-02 05:41:41 +0000
commitbbabe7c61ca8403cf332fbfa6a0f23997f8cb92d (patch)
treedf3333ba324d8ed7d25e9349564d640b7004262b /lualib
parent875f80ee9aa1ff58463f32864ec5fcd57558b0a5 (diff)
downloadrspamd-bbabe7c61ca8403cf332fbfa6a0f23997f8cb92d.tar.gz
rspamd-bbabe7c61ca8403cf332fbfa6a0f23997f8cb92d.zip
Add multiple signature support.
Configuration is not clean and milter doesn't support it yet
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_dkim_tools.lua14
1 files changed, 13 insertions, 1 deletions
diff --git a/lualib/lua_dkim_tools.lua b/lualib/lua_dkim_tools.lua
index 5469ac138..5e38b2b85 100644
--- a/lualib/lua_dkim_tools.lua
+++ b/lualib/lua_dkim_tools.lua
@@ -211,11 +211,23 @@ local function prepare_dkim_signing(N, task, settings)
end
end
- local p = {}
+ local p = {
+ keys = {}
+ }
if settings.domain[dkim_domain] then
p.selector = settings.domain[dkim_domain].selector
p.key = settings.domain[dkim_domain].path
+ for _, s in ipairs(settings.domain[dkim_domain].selectors) do
+ lua_util.debugm(N, task, 'adding selector: %1', s)
+ local k = {}
+ k.selector = s.selector
+ k.key = s.path
+ --bit of a hack to make other code play nice
+ p.selector = s.selector
+ p.key = s.path
+ table.insert(p.keys, k)
+ end
end
if not p.key and p.selector then