Robin Bowes said the following on 02/23/2006 01:33 AM: > OK, I've tried swapping the order of the qmail-queue and accepted_log > plugins in config/plugins and it seems that only hook_queue in the first > one listed in plugins is called. > > i.e. if plugins contains: > > queue/qmail-queue > logging/accepted_log > > Then only the hook_queue in qmail-queue is run. > > Similarly, if plugins contains: > > logging/accepted_log > queue/qmail-queue > > Then only the hook_queue in accepted_log is run. > > I tried changing the last line of accepted_log to read "return (OK, > "accepted_log finished") but this made no difference. > > Am I doing something wrong, is this a "bug", or is what I'm trying to do > not possible?
Continuing this monologue... :) I dug around inside Qpsmtpd.pm and found this on line 348 (in the run_hooks sub): last unless $r[0] == DECLINED; So, basically, unless the previous plugin returns DECLINED then no further plugins are processed. I modified my accepted_log plugin to return DECLINED and put it before qmail-queue, et voila: 10948 running plugin (queue): queue::accepted_log 10948 queue::accepted_log plugin: details of accepted mail go here 10948 Plugin queue::accepted_log, hook queue returned DECLINED, accepted_log finished. 10948 running plugin (queue): queue::qmail_2dqueue 10950 queue::qmail_2dqueue plugin: (for 10948 ) Queuing qp 10950 to /var/qmail/bin/qmail-queue 10948 Plugin queue::qmail_2dqueue, hook queue returned OK, Queued! 1140659498 qp 10950 <> 10948 250 Queued! 1140659498 qp 10950 <> Would there be a problem in changing the qmail-queue plugin to return DECLINED so that other plugins can run after it? Or should this just be a documented feature? R>
