]> git.openstreetmap.org Git - dns.git/commitdiff
Add NZ specific zone
authorGrant Slater <github@firefishy.com>
Mon, 24 Feb 2025 22:24:08 +0000 (22:24 +0000)
committerGrant Slater <github@firefishy.com>
Mon, 24 Feb 2025 22:24:31 +0000 (22:24 +0000)
dnsconfig.js
src/openstreetmap-nz.js [new file with mode: 0644]

index b3f5efbb2cb9aa79300bdbd3b94f94ba6f78b012..25f32e04fc4b0145152b4898bd4b1d063202cc3b 100644 (file)
@@ -70,14 +70,12 @@ OPENSTREETMAP("openstreetmap.fi", REG_GANDI);
 OPENSTREETMAP("openstreetmap.gr", REG_GANDI);
 OPENSTREETMAP("openstreetmap.me", REG_GANDI);
 OPENSTREETMAP("openstreetmap.mx", REG_GANDI);
-OPENSTREETMAP("openstreetmap.nz", REG_GANDI);
 OPENSTREETMAP("openstreetmap.pe", REG_GANDI);
 OPENSTREETMAP("openstreetmap.ph", REG_GANDI);
 OPENSTREETMAP("openstreetmap.sg", REG_GANDI);
 OPENSTREETMAP("openstreetmap.tv", REG_GANDI);
 OPENSTREETMAP("openstreetmap.wales", REG_GANDI);
 OPENSTREETMAP("openstreetmapdata.org", REG_GANDI);
-OPENSTREETMAP("openstreetmap.org.nz", REG_GANDI);
 
 // Disable due to registration issue
 // OPENSTREETMAP("openstreetmap.al", REG_NONE);
@@ -116,6 +114,11 @@ var OSM_LI = loadTemplate("osm-li");
 
 OSM_LI("osm.li", REG_GANDI);
 
+var OPENSTREETMAP_NZ = loadTemplate("openstreetmap-nz");
+
+OPENSTREETMAP_NZ("openstreetmap.nz", REG_GANDI);
+OPENSTREETMAP_NZ("openstreetmap.org.nz", REG_GANDI);
+
 var OPENSTREETMAP_UK = loadTemplate("openstreetmap-uk");
 
 OPENSTREETMAP_UK("openstreetmap.uk", REG_GANDI);
diff --git a/src/openstreetmap-nz.js b/src/openstreetmap-nz.js
new file mode 100644 (file)
index 0000000..e2b903d
--- /dev/null
@@ -0,0 +1,41 @@
+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."),
+
+  // Main web site
+
+  ALIAS("@", "www.openstreetmap.org."),
+  CNAME("www", "www.openstreetmap.org."),
+  CNAME("api", "api.openstreetmap.org.")
+
+);