From f24b450b36a1c4d41991d54ef9dd169172cbb195 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Sat, 17 Jun 2023 01:28:55 +0100 Subject: [PATCH] dns: fixed some records related to email --- applications/dns.nix | 2 +- applications/email.nix | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/applications/dns.nix b/applications/dns.nix index 2f935b4..52daaec 100644 --- a/applications/dns.nix +++ b/applications/dns.nix @@ -26,7 +26,7 @@ let ;@ MX 5 ${domain}. ; can have multiple mailserves - ;@ MX 20 mail2.${domain}. + @ MX 10 mail.${domain}. ; ------------------------------------------ diff --git a/applications/email.nix b/applications/email.nix index 1e2dad0..e7f3e61 100644 --- a/applications/email.nix +++ b/applications/email.nix @@ -79,21 +79,16 @@ # set up dns record for it skynet_dns.records.external = [ # basic one - "mail A ${cfg.host.ip}" - - "${cfg.domain} MX 10 ${cfg.sub}.${cfg.domain}" - - # reverse pointer - "${builtins.substring 9 3 cfg.host.ip}.99.1.193.in-addr.arpa IN PTR ${cfg.sub}.${cfg.domain}" + "mail A ${cfg.host.ip}" # SPF record - "${cfg.domain} TXT v=spf1 a:${cfg.sub}.${cfg.domain} -all" + ''${cfg.domain}. IN TXT "v=spf1 a:${cfg.sub}.${cfg.domain} -all"'' # DKIM - #"mail._domainkey 10800 TXT v=DKIM1; p=" + ''mail._domainkey.${cfg.domain}. IN TXT "v=DKIM1; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDl8ptSASx37t5sfmU2d2Y6yi9AVrsNFBZDmJ2uaLa4NuvAjxGQCw4wx+1Jui/HOuKYLpntLsjN851wgPR+3i51g4OblqBDvcHn9NYgWRZfHj9AASANQjdsaAbkXuyKuO46hZqeWlpESAcD6a4Evam4fkm+kiZC0+rccb4cWgsuLwIDAQAB"'' # DMARC - "_dmarc TXT v=DMARC1; p=none" + ''_dmarc.${cfg.domain}. IN TXT "v=DMARC1; p=none"'' ]; skynet_dns.records.reverse = [