From e0acdb13183479faf945a76c82a84d6ff9af43e3 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Tue, 28 Nov 2023 03:40:26 +0000 Subject: [PATCH] Add special handling for openstreetmap.town --- dnsconfig.js | 9 ++++++--- src/openstreetmap-town.js | 40 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 src/openstreetmap-town.js diff --git a/dnsconfig.js b/dnsconfig.js index 9bd7ce7..d743785 100644 --- a/dnsconfig.js +++ b/dnsconfig.js @@ -80,9 +80,12 @@ OPENSTREETMAP("openstreetmapdata.org", REG_GANDI); // Disable due to registration issue // OPENSTREETMAP("openstreetmap.al", REG_NONE); -// Mastodon -OPENSTREETMAP("openstreetmap.town", REG_GANDI); -// Pending transfer: OPENSTREETMAP("osm.town", REG_GANDI); +// Mastodon redirects to en.osm.town +var OPENSTREETMAP_TOWN = loadTemplate("openstreetmap-town"); +OPENSTREETMAP_TOWN("openstreetmap.town", REG_GANDI); + +// Domain owned by Amanda McCann +// osm.town // Managed independently by Guillaume Rischard // openstreetmap.lu diff --git a/src/openstreetmap-town.js b/src/openstreetmap-town.js new file mode 100644 index 0000000..0d56540 --- /dev/null +++ b/src/openstreetmap-town.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."), + + // Redirect en.openstreetmap.town to en.osm.town + + A("en", NAGA_IPV4), + AAAA("en", NAGA_IPV6) + +); \ No newline at end of file -- 2.45.1