]> git.openstreetmap.org Git - dns.git/blobdiff - src/switch2osm.js
Add fafnir to SPF records
[dns.git] / src / switch2osm.js
index 71cae23abc52aef68b50f05c251ca838699564e9..fa425c129f290fe595864945454b00b13b87734c 100644 (file)
@@ -2,9 +2,28 @@ 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: "@",
+    iodef: "mailto:hostmaster@openstreetmap.org",
+    issue: [
+      "letsencrypt.org",
+    ],
+    issuewild: [
+      "letsencrypt.org",
+    ],
+  }),
+
+  // Delegate SPF policy to the main domain
+
+  SPF_BUILDER({
+    label: "@",
+    ttl: "1h",
+    parts: [
+      "v=spf1",
+      "include:openstreetmap.org",  // main openstreetmap.org spf record
+      "-all"
+    ]
+  }),
 
   // Main web server and it's aliases