aboutsummaryrefslogtreecommitdiff
path: root/terraform/dns
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2024-07-27 08:55:19 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2024-07-27 08:55:19 +0200
commit739dbcaa8da80777ae6ba858d16fa0462d5e8504 (patch)
tree11cc472dc77d4dd607400750c21f659bd8c8ac2d /terraform/dns
parentaf08ef32cf17f8791d7d121157c48534ca7a8e0b (diff)
downloadinfra-739dbcaa8da80777ae6ba858d16fa0462d5e8504.tar.gz
infra-739dbcaa8da80777ae6ba858d16fa0462d5e8504.tar.bz2
infra-739dbcaa8da80777ae6ba858d16fa0462d5e8504.tar.xz
infra-739dbcaa8da80777ae6ba858d16fa0462d5e8504.zip
Fastmail SRV records
Diffstat (limited to 'terraform/dns')
-rw-r--r--terraform/dns/trygvis.tf31
1 files changed, 31 insertions, 0 deletions
diff --git a/terraform/dns/trygvis.tf b/terraform/dns/trygvis.tf
index 70e971f..608dd3e 100644
--- a/terraform/dns/trygvis.tf
+++ b/terraform/dns/trygvis.tf
@@ -70,6 +70,37 @@ resource "linode_domain_record" "root-txt-fastmail-spf" {
target = "v=spf1 include:spf.messagingengine.com ?all"
}
+resource "linode_domain_record" "root-txt-fastmail-dmark" {
+ domain_id = linode_domain.root.id
+ name = "_dmarc"
+ record_type = "TXT"
+ target = "v=DMARC1; p=none;"
+}
+
+resource "linode_domain_record" "root-txt-fastmail-srv" {
+ domain_id = linode_domain.root.id
+ record_type = "SRV"
+ service = each.key
+ priority = each.value.priority
+ weight = each.value.weight
+ port = each.value.port
+ target = each.value.target
+
+ for_each = tomap({
+ submission = { priority = 0, weight = 0, port = 0, target = "." },
+ imap = { priority = 0, weight = 0, port = 0, target = "." },
+ submissions = { priority = 0, weight = 1, port = 465, target = "smtp.fastmail.com" },
+ imaps = { priority = 0, weight = 1, port = 993, target = "imap.fastmail.com" },
+ jmap = { priority = 0, weight = 1, port = 443, target = "api.fastmail.com" },
+ autodiscover = { priority = 0, weight = 1, port = 443, target = "autodiscover.fastmail.com" },
+ autodiscover = { priority = 0, weight = 1, port = 443, target = "autodiscover.fastmail.com" },
+ carddav = { priority = 0, weight = 0, port = 0, target = "." },
+ carddavs = { priority = 0, weight = 1, port = 443, target = "carddav.fastmail.com" },
+ caldav = { priority = 0, weight = 0, port = 0, target = "." },
+ caldavs = { priority = 0, weight = 1, port = 443, target = "caldav.fastmail.com" },
+ })
+}
+
resource "linode_domain_record" "root-cname-ses-1" {
domain_id = linode_domain.root.id
name = "k5o5gjadej2kkfncu36i3ef5gt473sxy._domainkey"