[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DATA Pipelining
On Dec 25, 2009, at 10:46 PM, Sabahattin Gucukoglu wrote:
>
> Hi all,
>
> Just writing a minimal implementation of SMTP here to serve a very specific need, that of gatewaying news articles, and have wondered how to handle the DATA phase with regard to pipelined text. As I see it, there is no reason not to pipeline both the message text lines and the final dot, because nothing is expected from the server and until the dot is received there is no change of state other than the accumulation of the DATA buffer. But I also know there are implementations out there which don't like it when a command is incomplete, and try to respond to whatever is in their TCP buffer, and wondered if anybody knew how that might work for the final dot if it were stuffed at the end of some text.
>
> Is there any specific guidance anywhere on this? I tried RFC 2920 already. I really don't want to send each individual line as a single send, and I'm pretty sure that's not necessary or even common. I do know sendmail saves its final dot for a final send, though.
You should be fine sending the entire payload as-is.
(Writing and testing a robust SMTP submission client is tedious, though, especially when you find you need to handle authentication. Pretty much every language has solid SMTP libraries available for it, so unless you have some unusual requirements you should take a look at libesmtp or Email::Send or whatever the common way of doing SMTP in your language of choice is).
Cheers,
Steve