On Mon, Dec 01, 2008 at 11:58:42AM -0500, Charles Marcus wrote:
> On 12/1/2008 11:54 AM, Victor Duchovni wrote:
> > There is nothing wrong with lost connections after QUIT. Newer versions
> > of Postfix only log "lost connection" in the SMTP server during data
> > transfer or when sending the "." response. The client is free to
> > disconnect without "QUIT" at all other SMTP protocol stages.
> >
> > Sufficiently new Postfix releases will not log this condition.
>
> Hmmm...
>
> I'm running 2.5.5, and get this almost every time (maybe every time)
> when people send through the webmail interface...
>
Sorry, Postfix won't log clients disconnecting without sending QUIT,
but it will log failure to send "221 ...".
The reason is that with PIPELINEd ESMTP, the "250 ..." response to
"." and "221" response to QUIT are often sent in the same I/O operation,
so it is appropriate to report I/O errors when sending QUIT, at least
when there are previous responses in the output buffer. Postfix 2.3+
complains about problems flushing QUIT unconditionally.
quit_cmd(SMTPD_STATE *state, int unused_argc, SMTPD_TOKEN *unused_argv)
{
/*
* Don't bother checking the syntax.
*/
smtpd_chat_reply(state, "221 2.0.0 Bye");
/*
* When the "." and quit replies are pipelined, make sure they are
* flushed now, to avoid repeated mail deliveries in case of a crash in
* the "clean up before disconnect" code.
*
* XXX When this was added in Postfix 2.1 we used vstream_fflush(). As
* of Postfix 2.3 we use smtp_flush() for better error reporting.
*/
smtp_flush(state->client);
return (0);
}
perhaps the flush should be suppressed if there was no pending unwritten
data in the client vstream buffer prior to the "221 2.0.0 Bye" reply.
--
Viktor.
Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.
To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:[EMAIL PROTECTED]>
If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.