ietf-smtp
[Top] [All Lists]

Re: rfc2821bis-02 Issue 24

2007-04-24 12:31:40

John C Klensin wrote:

This is another example of why I'm getting cold feet about doing
a significant ABNF overhaul.  The advantage of "Reply-line" over
"reply" is that the former is easily found by searching the
text, while "reply" is used all over the place.   If we had an
index to productions, possibly with numbered productions, I
might feel differently about that, but we aren't going to get
that for this version (too much work and incompatible with the
tools).    I think that, if this were being done to my personal
taste, we'd probably end up with

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

or even

   Reply-sequence = [ Reply-continuation-lines ] Reply-line
   Reply-continuation-lines = 1*Reply-continuation-line
   Reply-continuation-line =  Reply-code "-" [ text ] CRLF
   Reply-line = Reply-code [ SP text ] CRLF

either of which I think is more clear because they are less
subtle. But, probably fortunately, we are not.

Ha! True, true. :-)

But poor developers, who have to look at all this and say:

         "HUH? What does that all mean? All I want is the
          server response code!"

The bottom line translation from ALL of this and related issues is:

  - The server command response code is the first 3 digits of the
    receiver buffer.  These 3 digits MUST be numeric, 0 thru 9.

  - The response is terminated when the there is no continuation
    character "-" at byte #4

This is how the broken codes out there are reading it and some even consider this a high-quality, low overhead, optimized streaming parser!

So how is this written in ABNF style?

  Reply-line  = Terminating-Reply-Line | 1* Non-Terminating-Reply-Line
  Terminating-Reply-Line     = Reply-Code [SP text] CRLF
  Non-Terminating-Reply-Line = Reply-Code "-" [text] CRLF
  Reply-code   = %x31-35 %x30-35 %x30-39

Quickly followed with a very strong normative text that says:

  The reply-code in each reply-line MUST be persistent (the same).

I'm no ABNF guru, but the above make sense to me if I was reading it!

--
Hector Santos, CTO
Santronics Software, Inc
http://www.santronics.com


<Prev in Thread] Current Thread [Next in Thread>