aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-09-24 22:09:51 +0600
committerGitHub <noreply@github.com>2024-09-24 22:09:51 +0600
commitf8700e56ec5659f331f0aca0b28eec43a4e7cb33 (patch)
tree999c6c7bd2ea52fc5352ed03275f4cef0cfa80c7 /src/plugins
parent3dda59641af8826d50dd07bc82d67c9ffecef403 (diff)
parent464045f814b78b2d4f9ca20cc9e0a0a1b323ad8e (diff)
downloadrspamd-f8700e56ec5659f331f0aca0b28eec43a4e7cb33.tar.gz
rspamd-f8700e56ec5659f331f0aca0b28eec43a4e7cb33.zip
Merge branch 'master' into vstakhov-utf8-mimevstakhov-utf8-mime
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/lua/dmarc.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua
index 792672bd0..28b3db867 100644
--- a/src/plugins/lua/dmarc.lua
+++ b/src/plugins/lua/dmarc.lua
@@ -264,6 +264,13 @@ local function dmarc_validate_policy(task, policy, hdrfromdom, dmarc_esld)
end
if policy.rua and redis_params and settings.reporting.enabled then
+ if settings.reporting.only_domains then
+ if not (settings.reporting.only_domains:get_key(policy.domain) or
+ settings.reporting.only_domains:get_key(rspamd_util.get_tld(policy.domain))) then
+ rspamd_logger.info(task, 'DMARC reporting suppressed for sender domain %s', policy.domain)
+ return
+ end
+ end
if settings.reporting.exclude_domains then
if settings.reporting.exclude_domains:get_key(policy.domain) or
settings.reporting.exclude_domains:get_key(rspamd_util.get_tld(policy.domain)) then
@@ -527,6 +534,11 @@ if type(settings.reporting) == 'table' then
type = 'map',
description = 'Recipients not to store DMARC reports for'
},
+ only_domains = {
+ optional = true,
+ type = 'map',
+ description = 'Domains to store DMARC reports about'
+ },
})
end