Johan Almqvist said the following on 02/21/2006 02:29 PM:
> hook_queue, and make sure your plugin is listed _after_ the 'real'
> queue plugin in config/plugins. The qpsmtpd design will make sure your
> plugin only gets run if the message was successfully queued (i.e.
> accepted).
OK, I'm trying this out.
I'm using the adaptive logging plugin as follows:
logging/adaptive accept 4 reject 7 prefix #
I've written a small pluging called accepted_log which hooks queue:
sub hook_queue {
my ($self, $transaction) = @_;
$self->log(LOGDEBUG, 'details of accepted mail go here');
return DONE;
}
(I'll make it write msg details when I get it working)
I can see that the plugin is being registered as I see this when qpsmtpd
starts up:
2006-02-23 00:57:33.383344500 7725 queue::qmail_2dqueue hooking queue
2006-02-23 00:57:33.386391500 7725 logging::accepted_log hooking queue
However, when I send a test mail I don't see my message in the log.
All I see is this:
2006-02-23 01:00:19.561056500 7901 running plugin (queue):
queue::qmail_2dqueue
2006-02-23 01:00:19.561061500 7903 queue::qmail_2dqueue plugin: (for
7901 ) Queuing qp 7903 to /var/qmail/bin/qmail-queue
2006-02-23 01:00:19.624941500 7901 Plugin queue::qmail_2dqueue, hook
queue returned OK, Queued! 1140656419 qp 7903 <>
2006-02-23 01:00:19.624953500 7901 250 Queued! 1140656419 qp 7903 <>
2006-02-23 01:00:19.624959500 7901 # from email address :
[<[EMAIL PROTECTED]>]
2006-02-23 01:00:19.624965500 7901 # to email address :
[<[EMAIL PROTECTED]>]
2006-02-23 01:00:19.624970500 7901 dispatching QUIT
Any idea what I'm doing wrong?
R.