improve dsn handling

have the full smtp reply in the Diagnostic-Code field, not something that
resembles it but isn't quite the same.

include any additional error message in the Status field as comment.

before, we ended up having an Diagnostic-Code that didn't include the original
smtp code. it only had the enhanced error code.
This commit is contained in:
Mechiel Lukkien
2024-02-20 16:31:15 +01:00
parent dc83ad1df5
commit 1c934f0103
8 changed files with 69 additions and 116 deletions

View File

@ -161,7 +161,7 @@ type Error struct {
// SMTP command causing failure.
Command string
// For errors due to SMTP responses, the full SMTP line excluding CRLF that caused
// the error. Typically the last line read.
// the error. First line of a multi-line response.
Line string
// Optional additional lines in case of multi-line SMTP response. Most SMTP
// responses are single-line, leaving this field empty.