@@ -108,7 +108,8 @@ local function gen_dkim_queries(task, rule) | |||
local dom,res = lpeg.match(gr, opt) | |||
if dom and res then | |||
ret[dom] = res | |||
local tld = rspamd_util.get_tld(dom) | |||
ret[tld] = res | |||
end | |||
end | |||
end |
@@ -162,9 +162,11 @@ local function whitelist_cb(symbol, rule, task) | |||
if dkim_opts then | |||
fun.each(function(val) | |||
if val[2] == '+' then | |||
find_domain(val[1], 'dkim_success') | |||
local tld = rspamd_util.get_tld(val[1]) | |||
find_domain(tld, 'dkim_success') | |||
elseif val[2] == '-' then | |||
find_domain(val[1], 'dkim_fail') | |||
local tld = rspamd_util.get_tld(val[1]) | |||
find_domain(tld, 'dkim_fail') | |||
end | |||
end, | |||
fun.map(function(s) |