David Hofstee wrote:
Hi,
I've an interesting RFC question. In an SMTP reply, one can have
single line or multiline replies. E.g.
521 single line reply
or
521-Line one
521-Line two
521 Line three
Correct.
See also https://tools.ietf.org/html/rfc821#page-50 .
My question is: The reply is an answer that is, necessarily, formatted
for SMTP. But how should the multiline answer be interpreted? What is
its 'value'.
The 'value' to the computer is '521'
If there is an extended code it should be on the first line.
The rest is just the verbose message for the non computer... so should
not be tampered with.. ie
/or option 5: Keep everything. Eg. /
521-Line one
521-Line two
521 Line three
The RFC does not really state that. So I am not quite sure how that
should be logged correctly. Where the formatting starts and what
'value' it is supposed to represent. When I look at other standards
(e.g. http://json.org), the formatting and what it is to represent, is
more clear.
Now if you're talking about what goes to syslog... undefined, however
I've seen the message get sent in full as in '521-Line one\n521-Line
two\n521 Line three' (quite literally quoting the \n your option 4,
except \n instead of \r\n)... I've also seen the code stripped version,
ie '521 Line one Line two Line three' sorta like your option 1, but the
end of line terminator is replaced with a white space as '521- Line two'
i believe (IIRC) is not valid.
This came up when I saw 3 different outputs in different MTA's (1,4
and 5). Not sure if I have to file a bugreport to my favorite MTA
supplier.
When you say you have seen the different outputs what are you referring
to? Syslog'ing of the error message?
Can anyone say something smart about how the reply should be seen?
Personally - and this is a personal thing - I would like to see any
bounce message with entire message as seen (ie unaltered) and I would
like to see syslog'd messages as one of 2 types... either each line
logged separately in order or converted to: "521 Line one Line two Line
three" before logging.
Regards,
--
Michelle Sullivan
http://www.mhix.org/
_______________________________________________
mailop mailing list
mailop@mailop.org
https://chilli.nosignal.org/cgi-bin/mailman/listinfo/mailop