ietf-smtp
[Top] [All Lists]

Re: 2821bis server reply ABNF

2007-04-05 12:12:43

Tony Finch wrote:
 
   In ABNF, server responses are:

   Greeting       = "220 " (Domain / address-literal) [ SP text ] CRLF
[...]
This omits the multiline response cases

Yes, that could be an intentional omission for 821 compatibility (?)

| Only the EXPN and HELP commands are expected to result in multiline
| replies in normal circumstances, however multiline replies are 
| allowed for any command.

That text appears almost verbatim (adding EHLO) also in 2821.  Arguably
the greeting is no reply to a command.  And the client could intend to
use HELO after the greeting.

IIRC some mailers use multiline greetings to confuse naive direct-to-MX
bot-scripts, but probably that's already obsolete (?)

it should be corrected to:
 
   Greeting       =   "220 " (Domain / address-literal) [ SP text ] CRLF
                  /   "220-" (Domain / address-literal) [ SP text ] CRLF
                   *( "220-" [ text ] CRLF )
                      "220" [ SP text ] CRLF

IMHO "Greeting =/" introducing the multiline case would be clearer.
The "strongly advised" grouping could muddy the waters here.

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

   Reply-code     = %x31-35 %x30-35 %x30-39

+1.  That's fortunately not the <text> in 2822, but apparently it's not
specified anywhere.  Maybe something in the direction of...

     text           = 1*VCHAR *( 1*WSP 1*VCHAR ) 

...but using a better name, e.g. <Reply-text>.

Frank