Karl O. Pinc:
> 
> On 09/10/2008 06:14:44 PM, Wietse Venema wrote:
> > Karl O. Pinc:
> > > When there's more than one subscriber the same thing
> > > happens for mail sent to the first subscriber, but
> > > then the same message is sent to the second subscriber.
> > > Again, smtp sends a DATA command, gets back a 354,
> > > sends the message, ends with a period, and gets
> > > a 250 reply back.  At that point things have changed
> > > because the smtp side does not send a QUIT, instead it
> > > closes it's side of the TCP connection with a FIN, ACK.
> > > I presume that at this point spawn sends awk an EOF on stdin
> > > because the process tree then looks like this:
> > 
> > Nope, spawn does not close connections. Nor does it inform
> > the external command that a connection goes away.
> 
> I did not say that spawn closed the connection.  I said _smtp_ sent
> a FIN/ACK and closed it's side of the TCP connection to
> spawn.  At that point spawn can still send to smtp, just not
> the reverse.  The smtp side initiates the TCP close handshake.
> I'm sorry if this was not clear.

Nope, spawn does not inform the external command that a connection
goes away.

> Spawn must inform the external command that no more data is
> available on the connection by closing the stdin
> of the external command.  Otherwise awk would not have terminated.
> Am I misunderstanding?

Yes.

> I also thought you'd want to hear of apparent inconsistencies
> in the postfix smtp program behavior, sending QUIT when
> filtering mail sent to the first recipient of a message
> but not to the second, although I'm not interested in
> pursuing that if you're not.

Only if I see the evidence itself. I am less interested in an eye
witness's INTERPRETATION of that evidence. This may sound like
being a rude hostile bastard, but those are my rules.

> Your response above implies that the latter is recommended,
> that it won't cause any problems when the SMTP protocol is
> terminated early by TCP closure.  I'm fine with that, but I do
> want to verify my reading of your response before putting
> such a configuration into production.

Stop this. I never suggested that nc should exit immediately.

A proper SMTP proxy implementation will recognize EOF on input,
take appropriate action and and terminate after completing all
unfinished write operations.

        Wietse

Reply via email to