Define blacklists in mail-server

This commit is contained in:
niten 2023-09-25 09:16:40 -07:00
parent 2cdb1d8c67
commit 8ea389947a
2 changed files with 23 additions and 1 deletions

View File

@ -41,6 +41,28 @@ in {
default = [ ];
};
blacklist = {
senders = mkOption {
type = listOf str;
description =
"List of email addresses for which we will never send email.";
default = [ ];
};
recipients = mkOption {
type = listOf str;
description =
"List of email addresses for which we will not accept email.";
default = [ ];
};
dns = mkOption {
type = listOf str;
description = "List of DNS spam blacklists to use.";
default = [ ];
};
};
aliases = {
user-aliases = mkOption {
type = attrsOf (listOf str);

View File

@ -247,7 +247,7 @@ in {
enableSubmission = true;
# useSrs = true;
dnsBlacklists = cfg.blacklist.dns;
# dnsBlacklists = cfg.blacklist.dns;
mapFiles = let
writeEntries = filename: entries: