From: Christian Rößner Date: Thu, 2 Oct 2025 15:53:51 +0000 (+0200) Subject: Feat: Added rua address exclusion in dmarc.lua X-Git-Tag: 3.13.2~2^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a13598d1bcfc662cd3e96cffcfa78bbd4fdbd76c;p=thirdparty%2Frspamd.git Feat: Added rua address exclusion in dmarc.lua Added a new configuration option exclude_rua_addresses in the dmarc reporting section. See #5220 --- diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua index 630bb6bbda..cc1a67661c 100644 --- a/src/plugins/lua/dmarc.lua +++ b/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',