Skip to content

mail: defang hostnames Forward Email refuses before they cost the account (0.37.0) - #74

Merged
ralyodio merged 1 commit into
masterfrom
feat/mail-defang-blocked-hosts
Sep 13, 2026
Merged

ralyodio merged 1 commit into
masterfrom
feat/mail-defang-blocked-hosts

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

Why

On 2026-09-13 Forward Email suspended outbound SMTP for profullstack.com. The trusted source was Cloudflare Family DNS: a message that so much as mentioned bittorrented.com (our own site, in a report line, not even a link) was refused with 554 5.6.0 Link hostname of bittorrented.com was detected by Cloudflare's Family DNS to contain adult-related content, phishing, and/or malware, and enough refusals in their rolling window froze the whole queue. The nightly nichedb report goes out through mail send, so the CLI has to protect the account rather than bounce after the fact.

What

  • Before a message leaves through a forwardemail.net SMTP host, every hostname-shaped token in the subject, text and html is resolved at 1.1.1.3; one that answers 0.0.0.0 is defanged in place (bittorrented[.]com), longest name first so www.x.com is handled before x.com finds its tail.
  • Addresses are never touched (the check is on link hostnames, and a defanged address bounces). At most 50 distinct hosts are looked up per message. A host that does not resolve at all is unknown, not blocked, and goes as written.
  • stderr says which hosts were touched; --json carries them as defanged. Other SMTP providers are not checked, and Resend is unaffected.
  • sendMail() takes an isBlocked check for tests; the real one is familyDnsBlockCheck().

Checks

  • vitest run test/mail.test.ts: 75 pass (5 new).
  • tsc --noEmit clean; eslint adds no warnings in the touched files.
  • Live: bittorrented.com and www.bittorrented.com answer as blocked at 1.1.1.3, nichedb.dev does not.

Version 0.36.1 → 0.37.0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UpE2YNWeoYxtu2B8oL2LPS

…ount (0.37.0)

Forward Email runs every hostname in an outbound message past Cloudflare's
Family DNS and refuses the whole message when one is blocked (554 5.6.0
"Link hostname of bittorrented.com was detected by Cloudflare's Family DNS
to contain adult-related content, phishing, and/or malware"). A bare mention
counts, and a few refusals in a rolling window suspend the account's
outbound queue until their support lifts it by hand, which is what happened
to profullstack.com on 2026-09-13: the nightly nichedb report names our own
torrent site.

So before a message leaves through a forwardemail.net SMTP host, every
hostname-shaped token in the subject, text and html is resolved at 1.1.1.3,
and one that answers 0.0.0.0 is defanged in place (bittorrented[.]com).
Addresses are left alone, at most 50 distinct hosts are looked up, and a
host that does not resolve at all goes as written. stderr says which hosts
were touched; --json carries them as `defanged`. Other providers are not
checked, and Resend is not affected.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UpE2YNWeoYxtu2B8oL2LPS
@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

13 finding(s)

HIGH/CRITICAL: 4 | MEDIUM: 5 | LOW: 4

Severity Rule Location
HIGH sh-remote-script-execution root-ubuntu.sh:3227
HIGH sh-remote-script-execution root-ubuntu.sh:3228
HIGH sh-remote-script-execution root-ubuntu.sh:4840
HIGH sh-remote-script-execution root-ubuntu.sh:4844
MEDIUM sh-remote-script-execution root-ubuntu.sh:4993
MEDIUM sh-remote-script-execution root-ubuntu.sh:6055
MEDIUM redos-nested-quantifier src/domain-free.ts:56
MEDIUM redos-nested-quantifier src/mail.ts:1042
MEDIUM redos-nested-quantifier src/wcag.ts:556
LOW secret-generic-credential src/credentials.ts:36
LOW secret-generic-api-key test/credentials.test.ts:208
LOW secret-generic-credential test/mail.test.ts:140
LOW secret-generic-credential test/shorten.test.ts:36

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit 8c679fc into master Sep 13, 2026
5 checks passed
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