Re: Problem with TIdSMTPBase.SendPipelining in Indy 10.0.52

Giganews Newsgroups
Subject: Re: Problem with TIdSMTPBase.SendPipelining in Indy 10.0.52
Posted by:  Remy Lebeau (TeamB) (
Date: Fri, 8 Jul 2005

"Virgo Pärna" <virgo.par…> wrote in message

> Problem is in TIdSMTPBase.SendPipelining - it sends RSET,
> FROM, recipients info and DATA commands in one batch and
> then checks for errors.

That is how pipelining actually works.

> So I changed the SendPipelining to following:

That is not the correct thing to do.  According to RFC 2920:

  Client SMTP implementations that employ pipelining MUST check ALL
  statuses associated with each command in a group. For example, if
  none of the RCPT TO recipient addresses were accepted the client must
  then check the response to the DATA command -- the client cannot
  assume that the DATA command will be rejected just because none of
  the RCPT TO commands worked.  If the DATA command was properly
  rejected the client SMTP can just issue RSET, but if the DATA command
  was accepted the client SMTP should send a single dot.

The previous implementation of SendPipelining() was correct in this regard.
It should be sending DATA as part of the batch, and then checking to see if
DATA was actually rejected or not.  You should not have changed it to do

However, what is wrong in the implementation is that SendPipelining() calls
LError.RaiseReplyError() if the 'DATA' command is rejected, before the '.'
can be sent to cancel the message.  That is wrong, and should be fixed.



In response to

Problem with TIdSMTPBase.SendPipelining in Indy 10.0.52 posted by Virgo Pärna on Fri, 08 Jul 2005