Skip to content

set transient response code on potential temporary error conditions #209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2025

Conversation

stefan-as
Copy link
Contributor

@stefan-as stefan-as commented May 16, 2025

Unkown errors may be caused by temporary error conditions, e.g. socket errors (DNS errors, network interruptions, ...), but smtprelay responds with a final SMTP error code. Since final SMTP error codes leads to a different behavior of correct working clients (bounce instead of retry), a 5xx response signals clients to give up on a specific mail instead of retrying a later delivery. This is not correct for temporary error conditions, so smtprelay should respond with a 4xx transient error code.

I think SMTP error code 421 is a more proper response for unkown conditions, that prevents smtprelay to forward an mail.

https://www.cloudmailin.com/smtp-troubleshooter/421-error

@decke decke merged commit cafbc78 into decke:master May 16, 2025
4 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.

2 participants