aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/dmarc.lua
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2017-05-19 17:38:34 +0200
committerAndrew Lewis <nerf@judo.za.org>2017-05-29 11:15:11 +0200
commit5f7d94353bbc32d75c02a75a1fed99cc4001187d (patch)
tree2010cdb77f1aab3620168c8b2d1a058b4a8bb8e6 /src/plugins/lua/dmarc.lua
parent27b68824c6f847ef506095887f8ae7912603b42b (diff)
downloadrspamd-5f7d94353bbc32d75c02a75a1fed99cc4001187d.tar.gz
rspamd-5f7d94353bbc32d75c02a75a1fed99cc4001187d.zip
[Minor] DMARC: fix runaway processing in reporting address verification
Diffstat (limited to 'src/plugins/lua/dmarc.lua')
-rw-r--r--src/plugins/lua/dmarc.lua22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua
index 4b4f4c33d..b712d0f53 100644
--- a/src/plugins/lua/dmarc.lua
+++ b/src/plugins/lua/dmarc.lua
@@ -957,22 +957,24 @@ if opts['reporting'] == true then
to_verify[test_addr] = nil
reporting_addr[test_addr] = true
end
- if not next(to_verify) then
- if next(reporting_addr) then
- make_report()
- else
- rspamd_logger.infox(rspamd_config, 'No valid reporting addresses for %s', reporting_domain)
- delete_reports()
- end
+ end
+ local t, vdom = next(to_verify)
+ if not t then
+ if next(reporting_addr) then
+ make_report()
+ else
+ rspamd_logger.infox(rspamd_config, 'No valid reporting addresses for %s', reporting_domain)
+ delete_reports()
end
+ else
+ verifier(t, vdom)
end
end
rspamd_config:get_resolver():resolve_txt(nil, pool,
string.format('%s._report._dmarc.%s', reporting_domain, vdom), verify_cb)
end
- for t, vdom in pairs(to_verify) do
- verifier(t, vdom)
- end
+ local t, vdom = next(to_verify)
+ verifier(t, vdom)
end
local function get_reporting_address()
local function check_addr_cb(resolver, to_resolve, results, err, _, authenticated)