Skip to content

fix(mailer): bound SMTP timeouts (504s on unreachable hosts)#37

Merged
keithfawcett merged 2 commits into
mainfrom
fix/smtp-timeouts
Jul 8, 2026
Merged

fix(mailer): bound SMTP timeouts (504s on unreachable hosts)#37
keithfawcett merged 2 commits into
mainfrom
fix/smtp-timeouts

Conversation

@keithfawcett

Copy link
Copy Markdown
Contributor

Prod bug from xispark's SMTP setup, verified in logs + by reproducing the connection:

  • xispark.com:465 drops SYNs → nodemailer's default 2-minute connection timeout outlives Cloudflare's ~100s proxy limit → admin sees an opaque 504 instead of our 502 with the real transport error. Real sends (partner invites) could pin a request equally long.
  • Fix: connectionTimeout/greetingTimeout 10s, socketTimeout 30s on the SMTP transport — errors now surface in-band, fast.
  • Also rewrites the misleading test-result hint ('unsaved changes…') to point at host/port/credentials, noting that a connection timeout usually means a wrong hostname or filtered port.

🤖 Generated with Claude Code

keithfawcett and others added 2 commits July 8, 2026 07:46
…ay timeout

Verified in prod (xispark mail-test): a host that silently drops SYNs
(xispark.com:465) hung nodemailer for its DEFAULT 2-minute
connectionTimeout — longer than Cloudflare's ~100s proxy limit — so the
admin saw an opaque 504 instead of our 502 with the transport error.
Real sends (partner invites, signup) could pin requests just as long.
connectionTimeout/greetingTimeout 10s, socketTimeout 30s: a healthy
handshake completes in single-digit seconds.

Also rewrites the test-result hint (the old one implied unsaved changes
even when settings were saved) to point at host/port/credentials with
the timeout≈wrong-hostname heuristic.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Bullet-character placeholders read as 'your password is still in this
field' (user report from xispark) — bullets are the universal signal for
a present value. The field's value is actually cleared on save and the
secret is write-only server-side; say so in words instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@keithfawcett keithfawcett merged commit e396d8b into main Jul 8, 2026
9 checks passed
@keithfawcett keithfawcett deleted the fix/smtp-timeouts branch July 8, 2026 14:57
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