From 6c62589dd8f87e9ebfa35cd1f3023b1939b5cdf6 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sat, 21 Jan 2023 23:20:30 +0100 Subject: [PATCH] Update DNS records The pub.solar website and www record now live on flora-6 mail.greenbaum.cloud -> mx2.greenbaum.cloud Remove non-functional mail, imap and smtp records. mx2.greenbaum.cloud is responsible for mails as per MX record Namecheap likes to add the root dot to DNS records, let's follow its preference --- terraform/lev-1/dns.tf | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/terraform/lev-1/dns.tf b/terraform/lev-1/dns.tf index b586aba..452fbf1 100644 --- a/terraform/lev-1/dns.tf +++ b/terraform/lev-1/dns.tf @@ -7,27 +7,27 @@ resource "namecheap_domain_records" "pub-solar" { record { hostname = "flora-6" type = "CNAME" - address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone" + address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone." } record { hostname = "auth" type = "CNAME" - address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone" + address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone." } record { hostname = "git" type = "CNAME" - address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone" + address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone." } record { hostname = "obs-portal" type = "CNAME" - address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone" + address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone." } record { hostname = "vpn" type = "CNAME" - address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone" + address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone." } record { hostname = "cache" @@ -39,15 +39,10 @@ resource "namecheap_domain_records" "pub-solar" { type = "A" address = "95.217.225.160" } - record { - hostname = "mail" - type = "A" - address = "85.88.23.19" - } record { hostname = "@" type = "ALIAS" - address = "www.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.cgn-1.greenbaum.zone." + address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone." ttl = 300 } record { @@ -75,11 +70,6 @@ resource "namecheap_domain_records" "pub-solar" { type = "CNAME" address = "mastodon-proxy.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.cgn-1.greenbaum.zone." } - record { - hostname = "imap" - type = "CNAME" - address = "mail.pub.solar." - } record { hostname = "mastodon" type = "CNAME" @@ -90,20 +80,15 @@ resource "namecheap_domain_records" "pub-solar" { type = "CNAME" address = "matrix.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.cgn-1.greenbaum.zone." } - record { - hostname = "smtp" - type = "CNAME" - address = "mail.pub.solar." - } record { hostname = "www" type = "CNAME" - address = "www.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.cgn-1.greenbaum.zone." + address = "flora-6.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.greenbaum.zone." } record { hostname = "@" type = "TXT" - address = "v=spf1 a:mail.greenbaum.cloud ?all" + address = "v=spf1 a:mx2.greenbaum.cloud ?all" } record { hostname = "_dmarc" @@ -113,7 +98,7 @@ resource "namecheap_domain_records" "pub-solar" { record { hostname = "@" type = "MX" - address = "mail.greenbaum.cloud" + address = "mx2.greenbaum.cloud." mx_pref = "0" } # SRV records can only be changed via NameCheap Web UI