diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-04-07 01:51:58 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-04-07 01:51:58 +0200 |
commit | 384ec543ef58e2cd8cafb9dad1c284fbc195144a (patch) | |
tree | 1d8ab53d853fb817bde7df311c8fd4a23581ff41 /nixops | |
parent | bb5e0900614e575e906d164e692c2a34d0be3f61 (diff) | |
download | Nix-384ec543ef58e2cd8cafb9dad1c284fbc195144a.tar.gz Nix-384ec543ef58e2cd8cafb9dad1c284fbc195144a.tar.zst Nix-384ec543ef58e2cd8cafb9dad1c284fbc195144a.zip |
Add some e-mail related records to DNS
Diffstat (limited to 'nixops')
-rw-r--r-- | nixops/modules/dns/default.nix | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/nixops/modules/dns/default.nix b/nixops/modules/dns/default.nix index b5187a8..53d0ece 100644 --- a/nixops/modules/dns/default.nix +++ b/nixops/modules/dns/default.nix | |||
@@ -107,14 +107,21 @@ | |||
107 | 107 | ||
108 | ; Mail sender authentications | 108 | ; Mail sender authentications |
109 | ${n} IN TXT "v=spf1 mx ~all" | 109 | ${n} IN TXT "v=spf1 mx ~all" |
110 | _dmarc${suffix} IN TXT "v=DMARC1; p=none; adkim=r; aspf=r; fo=1; rua=mailto:postmaster@immae.eu; ruf=mailto:postmaster@immae.eu;" | 110 | _dmarc${suffix} IN TXT "v=DMARC1; p=quarantine; adkim=r; aspf=r; fo=1; rua=mailto:postmaster@immae.eu; ruf=mailto:postmaster@immae.eu;" |
111 | ${if e.send then '' | 111 | ${if e.send then '' |
112 | immae_eu._domainkey${suffix} IN TXT ( "v=DKIM1; k=rsa; s=email; " | 112 | immae_eu._domainkey${suffix} IN TXT ( "v=DKIM1; k=rsa; s=email; " |
113 | "p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzl3vLd8W5YAuumC5+ZT9OV7/14Pmh5JYtwyqKI3cfe9NnAqInt3xO4bZ7oqIxRKWN4SD39vm7O/QOvFdBt00ENOOzdP90s5gKw6eIP/4+vPTh0IWltAsmu9B2agzdtWUE7t2xFKIzEn8l9niRE2QYbVaqZv4sub98vY55fIgFoHtjkmNC7325S8fjDJGp6OPbyhAs6Xl5/adjF" | 113 | "p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzl3vLd8W5YAuumC5+ZT9OV7/14Pmh5JYtwyqKI3cfe9NnAqInt3xO4bZ7oqIxRKWN4SD39vm7O/QOvFdBt00ENOOzdP90s5gKw6eIP/4+vPTh0IWltAsmu9B2agzdtWUE7t2xFKIzEn8l9niRE2QYbVaqZv4sub98vY55fIgFoHtjkmNC7325S8fjDJGp6OPbyhAs6Xl5/adjF" |
114 | "0ko4Y2p6RaxLQfjlS0bxmK4Qg6C14pIXHtzVeqOuWrwApqt5+AULSn97iUtqV/IJlEEjC6DUR44t3C/G0G/k46iFclCqRRi0hdPrOHCtZDbtMubnTN9eaUiNpkXh1WnCflHwtjQwIDAQAB" ) | 114 | "0ko4Y2p6RaxLQfjlS0bxmK4Qg6C14pIXHtzVeqOuWrwApqt5+AULSn97iUtqV/IJlEEjC6DUR44t3C/G0G/k46iFclCqRRi0hdPrOHCtZDbtMubnTN9eaUiNpkXh1WnCflHwtjQwIDAQAB" ) |
115 | '' else ""} | 115 | '' else ""} |
116 | '') conf.withEmail)} | 116 | '') conf.withEmail)} |
117 | '' else ""} | 117 | '' + (if conf.name == "immae.eu" then '' |
118 | ; ----------------- Accept DMARC reports ------------------- | ||
119 | ${lib.concatStringsSep "\n" ( | ||
120 | lib.flatten ( | ||
121 | map (z: map (e: "${e.domain}${if builtins.stringLength e.domain > 0 then "." else ""}${z.name}._report._dmarc IN TXT \"v=DMARC1;\"") (z.withEmail or [])) masterZones | ||
122 | ) | ||
123 | )} | ||
124 | '' else "") else ""} | ||
118 | ''; | 125 | ''; |
119 | }) masterZones); | 126 | }) masterZones); |
120 | }; | 127 | }; |