On Fri, 9 May 2008 13:51:17 -0400 Matt Sergeant <[EMAIL PROTECTED]> wrote:
> On 9-May-08, at 1:45 PM, Hanno Hecker wrote: > > > Someone more into -async has to do this for async (and apache?!). Any > > reason why there's no post-connection hook for -async/apache? > > Laziness :-D I see :) Would the attached patch be ok for -async? It seems to work ok, but I haven't tested it with any queueing, just disconnect with and w/o QUIT... Hanno
Index: lib/Qpsmtpd/PollServer.pm =================================================================== --- lib/Qpsmtpd/PollServer.pm (revision 894) +++ lib/Qpsmtpd/PollServer.pm (working copy) @@ -55,6 +55,7 @@ $self->{mode} = 'connect'; $self->load_plugins; $self->load_logging; + $self->run_hooks("pre-connection"); return $self; } @@ -147,6 +149,12 @@ $self->close; } +sub close { + my Qpsmtpd::PollServer $self = shift; + $self->run_hooks("post-connection"); + $self->SUPER::close; +} + sub start_conversation { my Qpsmtpd::PollServer $self = shift;