]> git.openstreetmap.org Git - dns.git/blobdiff - src/openstreetmap-town.js
Add special handling for openstreetmap.town
[dns.git] / src / openstreetmap-town.js
diff --git a/src/openstreetmap-town.js b/src/openstreetmap-town.js
new file mode 100644 (file)
index 0000000..0d56540
--- /dev/null
@@ -0,0 +1,40 @@
+D(DOMAIN, REGISTRAR, DnsProvider(PROVIDER),
+
+  // Publish CAA records indicating that only letsencrypt should issue certificates
+
+  CAA_BUILDER({
+    label: "@",
+    iodef: "mailto:hostmaster@openstreetmap.org",
+    issue: [
+      "letsencrypt.org",
+    ],
+    issuewild: [
+      "letsencrypt.org",
+    ],
+  }),
+
+  // Let the main domain handle the email
+
+  MX("@", 10, "a.mx.openstreetmap.org."),
+
+  // Delegate SPF policy to the main domain
+
+  SPF_BUILDER({
+    label: "@",
+    parts: [
+      "v=spf1",
+      "include:openstreetmap.org",      // main openstreetmap.org spf record
+      "-all"
+    ]
+  }),
+
+  // Delegate MTA-STS policy to the main domain
+
+  CNAME("_mta-sts", "_mta-sts.openstreetmap.org."),
+
+  // Redirect en.openstreetmap.town to en.osm.town
+
+  A("en", NAGA_IPV4),
+  AAAA("en", NAGA_IPV6)
+
+);
\ No newline at end of file