mail-server: add dmarcReporting.excludeDomains

The option `exclude_domains` for dmarc reporting in `rspamd`[1] allows
to configure a list of domains and/or eSLDs (external effective second level
domain) to be excluded from dmarc reports.

Helpful because e.g. dmarc reports to hotmail.com always fail for me
with the following undeliverable notification:

    The recipient's mailbox is full and can't accept messages now.

[1] https://www.rspamd.com/doc/modules/dmarc.html
This commit is contained in:
Maximilian Bosch 2023-05-06 11:20:12 +02:00
parent c63f6e7b05
commit 8fe94ec0c6
Failed to generate hash of commit
2 changed files with 11 additions and 0 deletions

View file

@ -851,6 +851,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};
''}
}''} }''}
''; }; ''; };
}; };