[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: odd behavior in enforcing of message size limits
Matti Aarnio <mea@nic.funet.fi> writes:
> Pardon me, but how does the PIPELINING step in with CHUNKING ?
Unlike DATA, BDAT is designed so that you can pipeline the contents of
the message when PIPELINING is also supported. You save a round trip.
> Now instead of waiting the half-duplex handshake at each line,
> the SMTP-client waits for all of the reports after it has sent
> the "DATA" command, and has flushed possible stdio buffers to
> the connection (thats how I do it at ZMailer SMTP-client).
To use PIPELINING on the client, you have to make sure you don't
deadlock--see paragraph 6 of section 2.1 of RFC 1854. Generally, I
think it's easier to use select() and nonblocking mode.
> Now if we add this BDAT mode ( = chunking ? )
> .... mumble mumble (reading the RFC) ... Oh, I see:
> "When streaming, the receiver SMTP must accept, and discard
> additional BDAT chunks after the failed BDAT".. (until the
> "BDAT nn LAST", I suppose..)
It's probably easiest to always parse the nn and discard the data
whenever you're not in a state where you can actually process the
data, as opposed to only doing this until you get a BDAT nn LAST.
> I don't see actual use for this, EXCEPT with BINARYMIME, but
> implementing a receiver for it should be rather trivial anyway..
BDAT is an optimization which can be useful even when you're not
transferring BINARYMIME. You don't have to deal with dot-stuffing and
you don't have to spend a round trip waiting for the 354 reply to the
DATA command. It's a really big win if you queue your messages in
canonical (CRLF-separated) form. I don't know how much a win it would
be otherwise.
> Will you test it, John ?
I'm not doing much SMTP development myself; I concentrate on IMAP
(which does have similar issues). If you contact Ned Freed,
ned@innosoft.com, he should be able to point you at an implementation
of CHUNKING that you can test against.
> And by the way: utu.fi mailhost has not talked with any
> system implementing CHUNKING keyword at EHLO responce during
> the last 10 (or so) days.
CHUNKING is rather new.
--
_.John G. Myers Internet: jgm+@CMU.EDU
LoseNet: ...!seismo!ihnp4!wiscvm.wisc.edu!give!up