From 1ce4d0574302d3991b37da2b13c5e7cdfc322fb7 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Sun, 23 Nov 2025 17:59:13 +0000 Subject: [PATCH] Add osm-minimal template, use for ccTLDs --- dnsconfig.js | 31 ++++++++++++++-------------- src/openstreetmap-minimal.js | 40 ++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 15 deletions(-) create mode 100644 src/openstreetmap-minimal.js diff --git a/dnsconfig.js b/dnsconfig.js index 666c70e..024e849 100644 --- a/dnsconfig.js +++ b/dnsconfig.js @@ -134,6 +134,7 @@ for (var name in IPV6) { } var OPENSTREETMAP = loadTemplate("openstreetmap"); +var OPENSTREETMAP_MINIMAL = loadTemplate("openstreetmap-minimal"); require("include/sshfp.js"); require("include/nominatim.js"); @@ -147,33 +148,33 @@ try { OPENSTREETMAP("openstreetmap.org", REG_GANDI); OPENSTREETMAP("openstreetmap.com", REG_GANDI); OPENSTREETMAP("openstreetmap.net", REG_GANDI); -OPENSTREETMAP("openstreetmap.ca", REG_GANDI); // Richard Weait managed the registration +OPENSTREETMAP_MINIMAL("openstreetmap.ca", REG_GANDI); // Richard Weait managed the registration OPENSTREETMAP("openstreetmap.eu", REG_NONE); // fossgis.de manages the registration OPENSTREETMAP("openstreetmap.pro", REG_GANDI); -OPENSTREETMAP("openstreetmap.gay", REG_GANDI); +OPENSTREETMAP_MINIMAL("openstreetmap.gay", REG_GANDI); OPENSTREETMAP("openstreetmaps.org", REG_GANDI); OPENSTREETMAP("osm.org", REG_GANDI); OPENSTREETMAP("openmaps.org", REG_GANDI); OPENSTREETMAP("openstreetmap.io", REG_GANDI); OPENSTREETMAP("osm.io", REG_GANDI); -OPENSTREETMAP("openstreetmap.li", REG_GANDI); +OPENSTREETMAP_MINIMAL("openstreetmap.li", REG_GANDI); OPENSTREETMAP("openworldmap.org", REG_GANDI); OPENSTREETMAP("freeosm.org", REG_GANDI); OPENSTREETMAP("open-maps.org", REG_GANDI); OPENSTREETMAP("open-maps.com", REG_GANDI); OPENSTREETMAP("osmbugs.org", REG_GANDI); -OPENSTREETMAP("openstreetmap.ai", REG_GANDI); -OPENSTREETMAP("openstreetmap.am", REG_GANDI); -OPENSTREETMAP("openstreetmap.fi", REG_GANDI); -OPENSTREETMAP("openstreetmap.gr", REG_GANDI); -OPENSTREETMAP("openstreetmap.me", REG_GANDI); -OPENSTREETMAP("openstreetmap.mx", REG_GANDI); -OPENSTREETMAP("openstreetmap.pe", REG_GANDI); -OPENSTREETMAP("openstreetmap.ph", REG_GANDI); -OPENSTREETMAP("openstreetmap.se", REG_GANDI); // Transfer to OSMF care 23 Sept 2025 -OPENSTREETMAP("openstreetmap.sg", REG_GANDI); -OPENSTREETMAP("openstreetmap.tv", REG_GANDI); -OPENSTREETMAP("openstreetmap.wales", REG_GANDI); +OPENSTREETMAP_MINIMAL("openstreetmap.ai", REG_GANDI); +OPENSTREETMAP_MINIMAL("openstreetmap.am", REG_GANDI); +OPENSTREETMAP_MINIMAL("openstreetmap.fi", REG_GANDI); +OPENSTREETMAP_MINIMAL("openstreetmap.gr", REG_GANDI); +OPENSTREETMAP_MINIMAL("openstreetmap.me", REG_GANDI); +OPENSTREETMAP_MINIMAL("openstreetmap.mx", REG_GANDI); +OPENSTREETMAP_MINIMAL("openstreetmap.pe", REG_GANDI); +OPENSTREETMAP_MINIMAL("openstreetmap.ph", REG_GANDI); +OPENSTREETMAP_MINIMAL("openstreetmap.se", REG_GANDI); // Transfer to OSMF care 23 Sept 2025 +OPENSTREETMAP_MINIMAL("openstreetmap.sg", REG_GANDI); +OPENSTREETMAP_MINIMAL("openstreetmap.tv", REG_GANDI); +OPENSTREETMAP_MINIMAL("openstreetmap.wales", REG_GANDI); OPENSTREETMAP("openstreetmapdata.org", REG_GANDI); // Disable due to registration issue diff --git a/src/openstreetmap-minimal.js b/src/openstreetmap-minimal.js new file mode 100644 index 0000000..6ed789f --- /dev/null +++ b/src/openstreetmap-minimal.js @@ -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."), + + // Main web site + + ALIAS("@", "www.openstreetmap.org."), + CNAME("www", "www.openstreetmap.org."), + +); \ No newline at end of file -- 2.39.5