aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nixops/modules/dns/default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/nixops/modules/dns/default.nix b/nixops/modules/dns/default.nix
index 53d0ece..7937714 100644
--- a/nixops/modules/dns/default.nix
+++ b/nixops/modules/dns/default.nix
@@ -95,7 +95,9 @@
95 95
96 ${if lib.attrsets.hasAttr "withEmail" conf && lib.lists.length conf.withEmail > 0 then '' 96 ${if lib.attrsets.hasAttr "withEmail" conf && lib.lists.length conf.withEmail > 0 then ''
97 mail IN A ${myconfig.env.servers.immaeEu.ips.main.ip4} 97 mail IN A ${myconfig.env.servers.immaeEu.ips.main.ip4}
98 mx-1 IN A ${myconfig.env.servers.eldiron.ips.main.ip4}
98 ${builtins.concatStringsSep "\n" (map (i: "mail IN AAAA ${i}") myconfig.env.servers.immaeEu.ips.main.ip6)} 99 ${builtins.concatStringsSep "\n" (map (i: "mail IN AAAA ${i}") myconfig.env.servers.immaeEu.ips.main.ip6)}
100 ${builtins.concatStringsSep "\n" (map (i: "mx-1 IN AAAA ${i}") myconfig.env.servers.eldiron.ips.main.ip6)}
99 ${lib.concatStringsSep "\n\n" (map (e: 101 ${lib.concatStringsSep "\n\n" (map (e:
100 let 102 let
101 n = if e.domain == "" then "@" else "${e.domain} "; 103 n = if e.domain == "" then "@" else "${e.domain} ";
@@ -104,6 +106,7 @@
104 '' 106 ''
105 ; ------------------ mail: ${n} --------------------------- 107 ; ------------------ mail: ${n} ---------------------------
106 ${if e.receive then "${n} IN MX 10 mail.${conf.name}." else ""} 108 ${if e.receive then "${n} IN MX 10 mail.${conf.name}." else ""}
109 ${if e.receive then "${n} IN MX 50 mx-1.${conf.name}." else ""}
107 110
108 ; Mail sender authentications 111 ; Mail sender authentications
109 ${n} IN TXT "v=spf1 mx ~all" 112 ${n} IN TXT "v=spf1 mx ~all"