Open kylegoetz opened 1 month ago
Are you seeing this cause an issue with some client?
As I read the ABFN grammar in RFC5321, the space is part of the textstring
which is surrounded by [
]
and so is optional.
Greeting = ( "220 " (Domain / address-literal)
[ SP textstring ] CRLF ) /
( "220-" (Domain / address-literal)
[ SP textstring ] CRLF
*( "220-" [ textstring ] CRLF )
"220" [ SP textstring ] CRLF )
textstring = 1*(%d09 / %d32-126) ; HT, SP, Printable US-ASCII
If there's no textstring
, smtp4dev is currently not writing out a space.
This does seem to conflict with the "formal" definition in the text and the other part you quoted about violation.
I guess always printing out a space would comply with both, since textstring
can include SP
. Is that what you are recommending?
However, the RFC that defines SMTP replies states
In the specification for AUTH PLAIN, teh RFC itself does deviate from this spec in an example, even the example explicitly states in their deviating example that there is still a space after the reply code: