ietf-smtp
[Top] [All Lists]

Re: 2821bis: three-digit-and-crlf replies

2007-06-12 14:35:41



--On Tuesday, June 12, 2007 22:15 +0200 Arnt Gulbrandsen <arnt(_at_)oryx(_dot_)com> wrote:


Peter J. Holzer writes:
I don't think so. Section 4.2 says:

|                    Formally, a reply is defined to be the
sequence: a |  three-digit code, <SP>, one line of text, and
<CRLF>, or a multiline |  reply (as defined in section
4.2.1).  Since, in violation of this |  specification, the
text is sometimes not sent, clients which do not |  receive
it SHOULD be prepared to process the code alone (with or |
without a trailing space character).

To me that means that "250"CRLF is not permitted, but a
frequent bug  which clients should handle gracefully.

2821 has this grammar:

       Reply-line = Reply-code [ SP text ] CRLF

draft-klensin has this:

    Reply-line     = *( Reply-code "-" [ text ] CRLF )
                   Reply-code [ SP text ] CRLF

The text you quite indicates "Reply-code SP [ text ] CRLF", at
least when I read it, but the grammar puts the SP inside the
optional part in both cases.

I hope that the ABNF revision effort with resolve any differences. However, in 2821 as in 821, the grammar is illustrative rather than definitive. The text is definitive.

So...

Peter is correct: "250"CRLF (and "250 "CRLF) are in violation of the spec, but clients are expected to handle it as if they had received
  "250 random-string"CRLF

If one wants the ABNF to be normative and to accurately cover all of the corner cases, the 2821 syntax and the 2821bis fix are a little buggy.

   john