From 8cc7cb6bebeb227c5f9405c05e953f15f949cfff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Thu, 2 Jul 2020 13:05:44 +0200 Subject: Follow recommendations for mta-sts formatting --- modules/private/websites/tools/mail/mta-sts.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'modules/private/websites/tools') diff --git a/modules/private/websites/tools/mail/mta-sts.nix b/modules/private/websites/tools/mail/mta-sts.nix index c5d4306..c5f71f0 100644 --- a/modules/private/websites/tools/mail/mta-sts.nix +++ b/modules/private/websites/tools/mail/mta-sts.nix @@ -18,12 +18,11 @@ let (lib.attrsets.filterAttrs (n: v: v.mx.enable) config.myEnv.servers); # FIXME: increase the id number in modules/private/dns.nix when this # file change (date -u +'%Y%m%d%H%M%S'Z) - file = domain: pkgs.writeText "mta-sts-${domain.domain}.txt" '' - version: STSv1 - mode: testing - ${builtins.concatStringsSep "\n" (map (v: "mx: ${v}.${domain.mail}") mxes)} - max_age: 604800 - ''; + file = domain: pkgs.writeText "mta-sts-${domain.domain}.txt" ( + builtins.concatStringsSep "\r\n" ([ "version: STSv1" "mode: testing" ] + ++ (map (v: "mx: ${v}.${domain.mail}") mxes) + ++ [ "max_age: 604800" ] + )); root = pkgs.runCommand "mta-sts_root" {} '' mkdir -p $out ${builtins.concatStringsSep "\n" (map (d: -- cgit v1.2.3