Skip to content

fix: SMTP reliability and process exit code#17

Merged
xsmyile merged 2 commits intomasterfrom
fix/smtp-reliability
Apr 16, 2026
Merged

fix: SMTP reliability and process exit code#17
xsmyile merged 2 commits intomasterfrom
fix/smtp-reliability

Conversation

@xsmyile
Copy link
Copy Markdown
Member

@xsmyile xsmyile commented Apr 16, 2026

Summary

  • Check mpsc::send result in SMTP session; respond 451 on channel failure instead of silently acknowledging with 250 OK
  • Propagate SMTP/HTTP bind errors from select! as anyhow::bail instead of logging and returning Ok(()) with exit code 0
  • Send 421 response before dropping connections at session limit instead of silently closing the TCP connection

Test plan

  • All 67 existing tests pass (30 API + 15 integration + 19 storage + 2 SMTP + 1 doc)
  • smtp_session_limit_rejects_excess updated to assert 421 response
  • Zero clippy warnings

Closes #14

xsmyile added 2 commits April 16, 2026 11:32
- Check mpsc::send result in SMTP session; respond 451 on channel failure
  instead of silently acknowledging with 250 OK (H-1)
- Propagate SMTP/HTTP bind errors from select! as anyhow::bail instead
  of logging and returning Ok(()) with exit code 0 (H-2)
- Send 421 response before dropping connections at session limit instead
  of silently closing the TCP connection (L-3)
- Update session limit test to expect 421 response

Closes #14
@xsmyile xsmyile merged commit 13b948f into master Apr 16, 2026
2 checks passed
@xsmyile xsmyile deleted the fix/smtp-reliability branch April 16, 2026 09:41
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.

SMTP reliability and process exit code fixes

1 participant