diff options
Diffstat (limited to 'modules/private/websites/tools/mail')
-rw-r--r-- | modules/private/websites/tools/mail/mta-sts.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/private/websites/tools/mail/mta-sts.nix b/modules/private/websites/tools/mail/mta-sts.nix index a401b41..ed3fce8 100644 --- a/modules/private/websites/tools/mail/mta-sts.nix +++ b/modules/private/websites/tools/mail/mta-sts.nix | |||
@@ -13,13 +13,15 @@ let | |||
13 | ) | 13 | ) |
14 | config.myEnv.dns.masterZones | 14 | config.myEnv.dns.masterZones |
15 | ))); | 15 | ))); |
16 | mxes = lib.mapAttrsToList | ||
17 | (n: v: v.mx.subdomain) | ||
18 | (lib.attrsets.filterAttrs (n: v: v.mx.enable) config.myEnv.servers); | ||
16 | # FIXME: increase the id number in modules/private/dns.nix when this | 19 | # FIXME: increase the id number in modules/private/dns.nix when this |
17 | # file change (date -u +'%Y%m%d%H%M%S'Z) | 20 | # file change (date -u +'%Y%m%d%H%M%S'Z) |
18 | file = domain: pkgs.writeText "mta-sts-${domain.domain}.txt" '' | 21 | file = domain: pkgs.writeText "mta-sts-${domain.domain}.txt" '' |
19 | version: STSv1 | 22 | version: STSv1 |
20 | mode: testing | 23 | mode: testing |
21 | mx: mx-1.${domain.mail} | 24 | ${builtins.concatStringsSep "\n" (map (v: "mx: ${v}.${domain.mail}") mxes)} |
22 | mx: mx-2.${domain.mail} | ||
23 | max_age: 604800 | 25 | max_age: 604800 |
24 | ''; | 26 | ''; |
25 | root = pkgs.runCommand "mta-sts_root" {} '' | 27 | root = pkgs.runCommand "mta-sts_root" {} '' |