Robert Spier wrote:
So you'd have the master virus plugin create 'virus_connect', and all
of the virus plugins would register 'virus_connect' instead of
'connect'.

I almost wonder if it is worthwhile providing support within the base qpsmtpd for a 'virus' hook which would fire just before the 'data_post' hook. If you don't register any AV plugins, it's a noop, just like every other hook. I think the idea of a plugin-defined hook is a good thing in general, but this particular feature is so integral, it probably deserves to be a core element.


For John to do what he wants, he'd have to write a special run_hooks
function.

I was going to say "Can't I just inherit the existing run_hooks() sub?" and then I realized that I have to decide which hook to run. Perhaps I could extract the meat of run_hooks(), basically everything inside the


        for my $code (@{$hooks->{$hook}}) {
....

loop, and make that code a new sub, run_hook_code(), so that wouldn't need to be duplicated. Then I'd only need to write the wrapper around run_hook_code().

John

Reply via email to