|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Victor Duchovni (Victor.Duchovni
morganstanley.com)
Date: Mon Dec 01 2008 - 15:39:57 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Dec 01, 2008 at 03:25:00PM -0500, Wietse Venema wrote:
> > /*
> > * 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);
> >
> > 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.
>
> Postfix has a vstream_peek() function to count the amount of buffered
> input, but there is as of yet no API to count the amount of buffered
> output.
>
> I am not sure it is safe to overload vstream_peek() for this purpose,
> because that would break with full-duplex VSTREAMs when the last
> operation on the VSTREAM was a write.
I agree that it is not safe to overload vstream_peek(), we need a new
vstream feature to make this possible. Perhaps:
/*
* Number of unwritten application data bytes held in a vstream
* buffer. Note, these may translate a diffent number of bytes
* ultimately written to the network or a file, if the physical
* I/O involves encryption, compression or other transformations.
*/
int vstream_unwritten(VSTREAM *);
--
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:majordomo
postfix.org?body=unsubscribe%20postfix-users>
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.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]