On Sat, 03 Mar 2007 08:33:16 +0100
Hans Salvisberg <[EMAIL PROTECTED]> wrote:

> Hanno Hecker wrote:
> > On Wed, 28 Feb 2007 20:52:21 +0100
> > Hans Salvisberg <[EMAIL PROTECTED]> wrote:

> >> If qpsmtpd disconnects, then hook_disconnect() and 
> >> hook_post_connection() are fired. But if the other side disconnects 
> >> without a QUIT, then neither of them are fired.
>  >
> > Does the attached diff work? It should fire the post-connection hook on
> > disconnect w/o QUIT.

> Yes, this is much better:
> 
> 1. I was expecting hook_post_connection() to be fired twice in some 
> cases now, but this isn't happening. Apparently run_hooks() is smart 
> enough to not fire "post-connection" twice.
It's not run_hooks(). If a connection is QUIT'd, then it ends in
Qpsmtpd::TcpServer::disconnect(), which calls "exit;". I had the same
problem while making the post-connection hooks work in -forkserver ;-)

> 3. With the patch, about 99% of the connections get a 
> hook_post_connection() call, which is way up from about 50%! Among the 
> remaining 1% I've seen some abandoned
>    -- after a few successful RCPTs (doomed by check_verybadrcptto 
> deny_late but still underway),
>    -- during DATA, or
>    -- after  500 Unrecognized command
> 
> I don't see, what they might have in common. Maybe they're abandoned 
> connections that time out and are killed by xinetd? -- It turns out that 
> some are still hanging (see my next post), but I don't know what the 
> fate of the others was.
mhh.. The only way I know, not to get the post-connection hook (in my
case -forkserver) is to kill the process. 

        Hanno

P.S.: diff committed to trunk/

Reply via email to