Merge branch 'rspamd-dmarc-exclude' into 'master'

mail-server: add `dmarcReporting.excludeDomains`

See merge request simple-nixos-mailserver/nixos-mailserver!297
This commit is contained in:
Maximilian Bosch 2024-03-15 09:33:58 +00:00
commit 876e691685
2 changed files with 11 additions and 0 deletions

View file

@ -868,6 +868,14 @@ in
The sender name for DMARC reports. Defaults to the organization name. 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 { debug = mkOption {

View file

@ -65,6 +65,9 @@ in
org_name = "${cfg.dmarcReporting.organizationName}"; org_name = "${cfg.dmarcReporting.organizationName}";
from_name = "${cfg.dmarcReporting.fromName}"; from_name = "${cfg.dmarcReporting.fromName}";
msgid_from = "dmarc-rua"; msgid_from = "dmarc-rua";
${lib.optionalString (cfg.dmarcReporting.excludeDomains != []) ''
exclude_domains = ${builtins.toJSON cfg.dmarcReporting.excludeDomains};
''}
}''} }''}
''; }; ''; };
}; };