[Top] [All Lists]

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

2007-06-12 13:05:51
On 2007-06-12 18:38:44 +0200, Arnt Gulbrandsen wrote:
"an SMTP response consists of zero or more lines which start with a 
three-digit number and a hyphen, and then exactly one line which starts 
with a three-digit number and a space". How many people think that's 

2821 says the space on the final line is optional. "250" CRLF is permitted.

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.

draft-klensin-rfc2821bis-04 contains the same two sentences.

Since every SMTP server I've ever seen sends the space and some text, it 
seems reasonable for 2821bis to say something like "servers SHOULD send 
accompanying text, not just the three-digit response code".

The second sentence might be removed if this "violation of this
specification" is now so infrequent as to be negligible (I also cannot
think any server which returns only bare return codes, but that's hardly
evidence). OTOH, urging implementors to caution never seems wrong to me.


   _  | Peter J. Holzer    | I know I'd be respectful of a pirate 
|_|_) | Sysadmin WSR       | with an emu on his shoulder.
| |   | hjp(_at_)hjp(_dot_)at         |
__/   | |    -- Sam in "Freefall"

Attachment: signature.asc
Description: Digital signature