[Top] [All Lists]

Re: BDAT, RFC 3030 protocol clarification?

2003-06-16 09:56:52

   From: "Vaudreuil, Greg M (Greg)" <gregv(_at_)lucent(_dot_)com>
   Date: Mon, 16 Jun 2003 11:31:24 -0500

   Do I hear an emerging consensus to clarify in the harmony with the
   pipelining standard?  I see three points to clarify:

           1) Servers must accept the state-change into receiving BDAT
           command and associated message data even with no valid RCPT
           TO recipients or problems with the MAIL FROM command.


           2) Servers must send a 4XX or 5XX in response to a BDAT if
           it can't accept for any reason, incluing having no valid


           3) Servers MAY choose to terminate the TCP connection
           rather than drink (then expell) a big gulp from a
           pipelining client.  Clients must interpret the returned
           status codes and do the right thing (not send that
           message again, or delay).

I'm not sure how this is possible. A client might very well receive an
error from the write() system call (or equivalent) before doing any
reading from the socket.

Are you saying that the client must drain its input after receiving
an error from write(), and act on those SMTP responses? Ugh.

I think the correct thing is to tell servers that they must consume
the data. After all, RFC 3030 is pretty specific about this:

   A 250 response MUST be sent to each successful BDAT data block within
   a mail transaction.  If a failure occurs after a BDAT command is
   received, the receiver-SMTP MUST accept and discard the associated
   message data before sending the appropriate 5XX or 4XX code.  If a
   5XX or 4XX code is received by the sender-SMTP in response to a BDAT
   chunk, the transaction should be considered failed and the sender-
   SMTP MUST NOT send any additional BDAT segments.  If the receiver-
   SMTP has declared support for command pipelining [PIPE], the receiver
   SMTP MUST be prepared to accept and discard additional BDAT chunks
   already in the pipeline after the failed BDAT.