[PR #209] [MERGED] set transient response code on potential temporary error conditions #211

Closed
opened 2026-02-26 18:33:47 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/decke/smtprelay/pull/209
Author: @stefan-as
Created: 5/16/2025
Status: Merged
Merged: 5/16/2025
Merged by: @decke

Base: masterHead: master


📝 Commits (1)

  • f5441da set transient response code on potential temporary error conditions

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 main.go (+1 -1)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/decke/smtprelay/pull/209 **Author:** [@stefan-as](https://github.com/stefan-as) **Created:** 5/16/2025 **Status:** ✅ Merged **Merged:** 5/16/2025 **Merged by:** [@decke](https://github.com/decke) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`f5441da`](https://github.com/decke/smtprelay/commit/f5441daad1fdc04d78a083200379b19c77f1dd30) set transient response code on potential temporary error conditions ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `main.go` (+1 -1) </details> ### 📄 Description 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 18:33:47 +03:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/smtprelay#211
No description provided.