]> git.openstreetmap.org Git - dns.git/blobdiff - src/osmfoundation.js
Use SPF and CAA builder. Normalise TTL
[dns.git] / src / osmfoundation.js
index a6a8bcd9c7c30f38595073c89e81a76d87ca042d..b0c7d8a157148d7773766e8e50b4e695444afa15 100644 (file)
@@ -2,9 +2,17 @@ D(DOMAIN, REGISTRAR, DnsProvider(PROVIDER),
 
   // Publish CAA records indicating that only letsencrypt should issue certificates
 
-  CAA("@", "issue", "letsencrypt.org", CF_TTL_ANY),
-  CAA("@", "issuewild", "letsencrypt.org", CF_TTL_ANY),
-  CAA("@", "iodef", "mailto:hostmaster@openstreetmap.org"),
+  CAA_BUILDER({
+    label: "@",
+    ttl: "1h",
+    iodef: "mailto:hostmaster@openstreetmap.org",
+    issue: [
+      "letsencrypt.org",
+    ],
+    issuewild: [
+      "letsencrypt.org",
+    ],
+  }),
 
   // Let google handle email
 
@@ -20,7 +28,17 @@ D(DOMAIN, REGISTRAR, DnsProvider(PROVIDER),
 
   // SPF policy
 
-  TXT("@", "v=spf1 ip4:212.110.172.32 ip6:2001:41c9:1:400::32 a mx include:_spf.google.com -all"),
+  SPF_BUILDER({
+    label: "@",
+    ttl: "1h",
+    parts: [
+      "v=spf1",
+      "include:_spf.google.com",  // Google GSuite
+      "ip4:212.110.172.32",       // shenron ipv4
+      "ip6:2001:41c9:1:400::32",  // shenron ipv6
+      "-all"
+    ]
+  }),
 
   // DKIM keys