Skip to content

Guard addresses live at names.moshcode.sh, and the DNS exists - #445

Merged
ralyodio merged 1 commit into
mainfrom
moshpit-guard-domain
Aug 29, 2026
Merged

Guard addresses live at names.moshcode.sh, and the DNS exists#445
ralyodio merged 1 commit into
mainfrom
moshpit-guard-domain

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

Guard addresses were designed against @moshcode.sh. The apex turned out to be the wrong answer twice over, and this fixes it while the choice is still free — nothing has been published, because no alias can be minted without FORWARDEMAIL_API_KEY, so every contact is still pending and no address exists anywhere to invalidate.

Why not pit.moshcode.sh

It's a CNAME to Railway, and a CNAME may not coexist with an MX at the same name. That's a DNS rule, not a configuration choice — mail there is impossible.

Why not the apex

It would have worked: Porkbun's ALIAS is a flattened A, not a real CNAME. But it puts the reputation of forwarded stranger mail on the same name as any staff mail moshcode.sh ever carries, and forwarding is the hardest deliverability case there is. It gets a name of its own to damage.

DNS — done and verified authoritative

names.moshcode.sh.         MX   10  mx1.forwardemail.net.
names.moshcode.sh.         MX   10  mx2.forwardemail.net.
names.moshcode.sh.         TXT  "v=spf1 include:spf.forwardemail.net -all"
_dmarc.names.moshcode.sh.  TXT  "v=DMARC1; p=none;"

Added through the Porkbun API and confirmed against @salvador.porkbun.com. pit. and app. are untouched — pit.moshcode.sh still resolves to Railway and still serves 200.

DMARC is p=none deliberately: report only, since an aggressive policy bites a forwarder first and nothing should be quarantined while the setup is unproven.

Two things the doc now records, because both cost time

The Porkbun credentials exist. PORKBUN_API_KEY / PORKBUN_SECRET_API_KEY are in the logicsrc vault profullstack-sharable-keys--prod. A previous note said DNS changes here were a hand-off with no credentials available; that was wrong.

A bare dig lies on the dev box. The resolver is the Moshpit DNS bridge, which answers for every *.moshcode.sh name with a synthesised record. It reported a wildcard that does not exist and will happily tell you a host is live when public DNS has never heard of it. Always dig ... @1.1.1.1.

Still outstanding — both need a person

  1. Add names.moshcode.sh to the Forward Email account, add the forward-email-site-verification=… TXT it issues, and confirm the plan covers API alias management.
  2. Put the resulting FORWARDEMAIL_API_KEY on the moshcode Railway service.

Until then the feature stays inert rather than broken, exactly as before: contacts are recorded, alias_status stays pending, /pit/contact says plainly that no mail host is configured, and nothing is published on any name.

Suite: 709 passing, 0 failing.

🤖 Generated with Claude Code

https://claude.ai/code/session_017QSp1aAoQQB7jFV7hwt4jJ

…exists

Guard addresses were designed against `@moshcode.sh` and the apex was the wrong
answer twice over.

`pit.moshcode.sh` — the obvious subdomain — cannot carry mail at all: it is a
CNAME to Railway, and a CNAME may not coexist with an MX at the same name. That
is a DNS rule, not a configuration choice.

The apex would have worked, since Porkbun's ALIAS is a flattened A rather than a
real CNAME. But it would put the reputation of forwarded stranger mail on the
same name as any staff mail moshcode.sh ever carries, and forwarding is the
hardest deliverability case there is. It gets a name of its own to damage.

So: names.moshcode.sh. The records are live and verified authoritative —
MX to mx1/mx2.forwardemail.net, SPF, and a report-only DMARC, added through the
Porkbun API. `pit.` and `app.` are untouched.

Nothing had to be migrated because nothing had been published: no alias can be
minted without FORWARDEMAIL_API_KEY, so every contact is still `pending` and no
address exists anywhere to be invalidated. This was the last moment the choice
was free.

The doc also records two things that cost time to work out. The Porkbun
credentials are in the logicsrc shared vault, not absent as previously written.
And a bare `dig` on this box goes to the Moshpit DNS bridge, which answers for
every *.moshcode.sh name with a synthesised record — it will tell you a host
exists when public DNS has never heard of it. Always `@1.1.1.1`.

Still outstanding, and both need a person: adding names.moshcode.sh to the
Forward Email account with its verification TXT, and putting the resulting API
key on the Railway service.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017QSp1aAoQQB7jFV7hwt4jJ
@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

0 finding(s) in the 3 file(s) this pull request changes.

Nothing in the files this pull request changes.

81 pre-existing finding(s) elsewhere in the repository — **HIGH/CRITICAL**: 5 | **MEDIUM**: 67 | **LOW**: 9

Not introduced by this pull request. The full set is in the Security tab.

Severity Rule Location
HIGH js-ssrf-outbound-request apps/pwa/public/sw.js:45
HIGH tls-verification-disabled apps/pwa/src/lib/moshpit-gateway.mjs:299
HIGH sh-remote-script-execution install.sh:79
HIGH sh-remote-script-execution install.sh:83
HIGH tls-verification-disabled src/dns.mjs:766
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:138
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:152
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:178
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:365
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:369
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:414
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:663
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:859
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:861
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:920
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:966
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:1036
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:1139
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:1162
MEDIUM sql-template-interpolation apps/pwa/src/moshpit.mjs:1184

…and 61 more. Full results in the Security tab.

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit 9405185 into main Aug 29, 2026
6 checks passed
@ralyodio
ralyodio deleted the moshpit-guard-domain branch August 29, 2026 09:15
@ralyodio ralyodio mentioned this pull request Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant