Browse Source
Merge pull request #5653 from croessner/patch-1
Feat: Added rua address exclusion in dmarc.lua
pull/5667/head
Vsevolod Stakhov
1 month ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
12 additions and
0 deletions
-
src/plugins/lua/dmarc.lua
|
|
|
@ -284,6 +284,13 @@ local function dmarc_validate_policy(task, policy, hdrfromdom, dmarc_esld) |
|
|
|
return |
|
|
|
end |
|
|
|
end |
|
|
|
if policy.rua:match("^mailto:") and settings.reporting.exclude_rua_addresses then |
|
|
|
local rua = policy.rua:gsub("^mailto:", "") |
|
|
|
if settings.reporting.exclude_rua_addresses:get_key(rua) then |
|
|
|
rspamd_logger.info(task, 'DMARC reporting suppressed for rua recipient %s', rua) |
|
|
|
return |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
local function dmarc_report_cb(err) |
|
|
|
if not err then |
|
|
|
@ -533,6 +540,11 @@ if type(settings.reporting) == 'table' then |
|
|
|
type = 'map', |
|
|
|
description = 'Recipients not to store DMARC reports for' |
|
|
|
}, |
|
|
|
exclude_rua_addresses = { |
|
|
|
optional = true, |
|
|
|
type = 'map', |
|
|
|
description = 'RUA recipients not to store DMARC reports for' |
|
|
|
}, |
|
|
|
only_domains = { |
|
|
|
optional = true, |
|
|
|
type = 'map', |
|
|
|
|