domains: separate into domains and domainsWithoutMailbox

This commit is contained in:
Marcel 2024-08-10 19:05:14 +02:00
parent 61b3a2c5ec
commit e4c6e6e2ee
No known key found for this signature in database
GPG Key ID: 446F3B093DF81C6A
3 changed files with 10 additions and 3 deletions

View File

@ -41,7 +41,14 @@ in
type = types.listOf types.str;
example = [ "example.com" ];
default = [];
description = "The domains that this mail server serves.";
description = "The domains served by this mail server for delivery into mailboxes and forwards.";
};
domainsWithoutMailbox = mkOption {
type = types.listOf types.str;
example = [ "lists.example.com" ];
default = [];
description = "The domains served by this mail server and forwards.";
};
certificateDomains = mkOption {

View File

@ -94,7 +94,7 @@ let
reject_recipients_file = builtins.toFile "reject_recipients" (lib.concatStringsSep "\n" (reject_recipients_postfix)) ;
# vhosts_file :: Path
vhosts_file = builtins.toFile "vhosts" (concatStringsSep "\n" cfg.domains);
vhosts_file = builtins.toFile "vhosts" (concatStringsSep "\n" (cfg.domainsWithoutMailbox ++ cfg.domains));
# vaccounts_file :: Path
# see

View File

@ -165,7 +165,7 @@ in
SupplementaryGroups = [ config.services.redis.servers.rspamd.group ];
}
(lib.optionalAttrs cfg.dkimSigning {
ExecStartPre = map createDkimKeypair cfg.domains;
ExecStartPre = map createDkimKeypair (cfg.domainsWithoutMailbox ++ cfg.domains);
ReadWritePaths = [ cfg.dkimKeyDirectory ];
})
];