diff --git a/default.nix b/default.nix index 3abdfbc..d294b99 100644 --- a/default.nix +++ b/default.nix @@ -868,6 +868,14 @@ in The sender name for DMARC reports. Defaults to the organization name. ''; }; + + excludeDomains = mkOption { + type = types.listOf types.str; + default = []; + description = '' + List of domains or eSLDs to be excluded from DMARC reports. + ''; + }; }; debug = mkOption { diff --git a/mail-server/rspamd.nix b/mail-server/rspamd.nix index ee1b8a5..28bd7a1 100644 --- a/mail-server/rspamd.nix +++ b/mail-server/rspamd.nix @@ -65,6 +65,9 @@ in org_name = "${cfg.dmarcReporting.organizationName}"; from_name = "${cfg.dmarcReporting.fromName}"; msgid_from = "dmarc-rua"; + ${lib.optionalString (cfg.dmarcReporting.excludeDomains != []) '' + exclude_domains = ${builtins.toJSON cfg.dmarcReporting.excludeDomains}; + ''} }''} ''; }; };