end
-- Process all urls
+ local dmarc_dom
+ if task:has_symbol('DMARC_POLICY_ALLOW') then
+ local dsym = task:get_symbol('DMARC_POLICY_ALLOW')[1]
+ dmarc_dom = dsym.options[1]
+ end
+
local urls = task:get_urls() or {}
for _,url in ipairs(urls) do
local function do_loop_iter() -- to emulate continue
return
end
+ if dmarc_dom and tld == dmarc_dom then
+ lua_util.debugm(N, 'exclude phishing from %s -> %s by dmarc domain', tld,
+ ptld)
+ return
+ end
+
-- Now we can safely remove the last dot component if it is the same
local b,_ = string.find(tld, '%.[^%.]+$')
local b1,_ = string.find(ptld, '%.[^%.]+$')
callback = phishing_cb
})
+ -- To exclude from domains for dmarc verified messages
+ rspamd_config:register_dependency(symbol, 'DMARC_CHECK')
+
if opts['generic_service_symbol'] then
generic_service_symbol = opts['generic_service_symbol']
end