Skip to content

Commit

Permalink
dns: adjust Fastmail DNS setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsgruk committed Mar 4, 2024
1 parent 83efcdb commit cc917c0
Showing 1 changed file with 16 additions and 26 deletions.
42 changes: 16 additions & 26 deletions dns-sgrs-uk.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,46 +26,36 @@ resource "digitalocean_record" "sgrsuk-ns3" {
ttl = 1800
}

# A Records

resource "digitalocean_record" "sgrsuk-mail-1" {
domain = digitalocean_domain.sgrsuk.id
type = "A"
name = "mail"
value = "66.111.4.147"
ttl = 3600
}
# CNAME Records

resource "digitalocean_record" "sgrsuk-mail-2" {
resource "digitalocean_record" "sgrsuk-mail" {
domain = digitalocean_domain.sgrsuk.id
type = "A"
type = "CNAME"
name = "mail"
value = "66.111.4.148"
value = "mail.fastmail.com."
ttl = 3600
}

# CNAME Records

resource "digitalocean_record" "sgrsuk-dkim1" {
domain = digitalocean_domain.sgrsuk.id
type = "CNAME"
name = "fm1._domainkey"
name = "fm1._domainkey.sgrs.uk"
value = "fm1.sgrs.uk.dkim.fmhosted.com."
ttl = 3600
}

resource "digitalocean_record" "sgrsuk-dkim2" {
domain = digitalocean_domain.sgrsuk.id
type = "CNAME"
name = "fm2._domainkey"
name = "fm2._domainkey.sgrs.uk"
value = "fm2.sgrs.uk.dkim.fmhosted.com."
ttl = 3600
}

resource "digitalocean_record" "sgrsuk-dkim3" {
domain = digitalocean_domain.sgrsuk.id
type = "CNAME"
name = "fm3._domainkey"
name = "fm3._domainkey.sgrs.uk"
value = "fm3.sgrs.uk.dkim.fmhosted.com."
ttl = 3600
}
Expand All @@ -75,7 +65,7 @@ resource "digitalocean_record" "sgrsuk-dkim3" {
resource "digitalocean_record" "sgrsuk-fastmail-spf" {
domain = digitalocean_domain.sgrsuk.id
type = "TXT"
name = "@"
name = "sgrs.uk"
value = "v=spf1 include:spf.messagingengine.com ?all"
ttl = 3600
}
Expand Down Expand Up @@ -114,7 +104,7 @@ resource "digitalocean_record" "sgrsuk-fastmail-2" {
resource "digitalocean_record" "sgrsuk-smtp-auto" {
domain = digitalocean_domain.sgrsuk.id
type = "SRV"
name = "_submission._tcp"
name = "_submission._tcp.sgrs.uk"
value = "smtp.fastmail.com."
port = 587
weight = 1
Expand All @@ -126,7 +116,7 @@ resource "digitalocean_record" "sgrsuk-smtp-auto" {
resource "digitalocean_record" "sgrsuk-imap-auto" {
domain = digitalocean_domain.sgrsuk.id
type = "SRV"
name = "_imap._tcp"
name = "_imap._tcp.sgrs.uk"
value = "."
port = 0
weight = 0
Expand All @@ -137,7 +127,7 @@ resource "digitalocean_record" "sgrsuk-imap-auto" {
resource "digitalocean_record" "sgrsuk-imaps-auto" {
domain = digitalocean_domain.sgrsuk.id
type = "SRV"
name = "_imaps._tcp"
name = "_imaps._tcp.sgrs.uk"
value = "imap.fastmail.com."
port = 993
weight = 1
Expand All @@ -149,7 +139,7 @@ resource "digitalocean_record" "sgrsuk-imaps-auto" {
resource "digitalocean_record" "sgrsuk-jmap-auto" {
domain = digitalocean_domain.sgrsuk.id
type = "SRV"
name = "_jmap._tcp"
name = "_jmap._tcp.sgrs.uk"
value = "jmap.fastmail.com."
port = 443
weight = 1
Expand All @@ -161,7 +151,7 @@ resource "digitalocean_record" "sgrsuk-jmap-auto" {
resource "digitalocean_record" "sgrsuk-carddav-auto" {
domain = digitalocean_domain.sgrsuk.id
type = "SRV"
name = "_carddav._tcp"
name = "_carddav._tcp.sgrs.uk"
value = "."
port = 0
weight = 0
Expand All @@ -172,7 +162,7 @@ resource "digitalocean_record" "sgrsuk-carddav-auto" {
resource "digitalocean_record" "sgrsuk-carddavs-auto" {
domain = digitalocean_domain.sgrsuk.id
type = "SRV"
name = "_carddavs._tcp"
name = "_carddavs._tcp.sgrs.uk"
value = "carddav.fastmail.com."
port = 443
weight = 1
Expand All @@ -184,7 +174,7 @@ resource "digitalocean_record" "sgrsuk-carddavs-auto" {
resource "digitalocean_record" "sgrsuk-caldav-auto" {
domain = digitalocean_domain.sgrsuk.id
type = "SRV"
name = "_caldav._tcp"
name = "_caldav._tcp.sgrs.uk"
value = "."
port = 0
weight = 0
Expand All @@ -195,7 +185,7 @@ resource "digitalocean_record" "sgrsuk-caldav-auto" {
resource "digitalocean_record" "sgrsuk-caldavs-auto" {
domain = digitalocean_domain.sgrsuk.id
type = "SRV"
name = "_caldavs._tcp"
name = "_caldavs._tcp.sgrs.uk"
value = "caldav.fastmail.com."
port = 443
weight = 1
Expand Down

0 comments on commit cc917c0

Please sign in to comment.