> I don't think we should be failing on bad data if it's pretty clear how
> to handle it gracefully.
I understand your view, and all things being equal, I agree with it. The
basic "Be strict in what you send, lenient in what you accept" philosophy
espoused by the late Jon Postel. However, RFC 2821 does not appear to leave
such leeway:
2.3.7 Lines
SMTP commands and, unless altered by a service extension, message
data, are transmitted in "lines". Lines consist of zero or more data
characters terminated by the sequence ASCII character "CR" (hex value
0D) followed immediately by ASCII character "LF" (hex value 0A).
This termination sequence is denoted as <CRLF> in this document.
Conforming implementations MUST NOT recognize or generate any other
character or character sequence as a line terminator.
To comply with the RFC, an implementation "MUST NOT recognize" CR or LF as a
line terminator except when paired as CRLF. That particular area of the RFC
was added to clarify RFC 821.
I spent some time playing with the proposed change and telnet. telnet from
Windows sends LF for ^J, but appears to send CRLF for <return> or ^M.
telnet on linux defaults to sending ^M as <CR><NUL>, and appears to convert
^J as well. Oddly, <CR><NUL> appears to be happily accepted as <CR><LF>.
I wanted to see what other SMTP servers accept. If you telnet into the ASF
server, qmail accepts "helo <name> LF" as valid. Likewise, whatever passes
for a mail server at yahoo accepts it. Sendmail 8.12.8 also accepts it.
Not one of them appears to comply with RFC 2821. Hotmail does not accept LF
as a line separator. It appears to leave the data in the stream it, and
then generates an error based upon parsing the argument, e.g.,
mail from: <noel
@devtech.com>
501 Invalid Address
Our error message would look like:
mail from: <noel
@devtech.com>
501 Syntax error in parameters or arguments at 16. CR and LF must be CRLF
paired.
which matches the hotmail server's approach (AFAIK, hotmail was faily
respected by the e-mail community prior to its acquisition by The Evil
Empire).
FWIW, I could not test AOL. They reject dynamic IP addresses, and the only
static address I have access to is a linux box, which doesn't appear to send
a bare ^J.
--- Noel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]