On 18-Jan-08, at 2:49 PM, Jared Johnson wrote:
Hi,
I'm writing my first qp plugin, in order to write logs to our
custom db when a message is queued. I first wrote a small routine
to simply dump $self and $transaction in order to better understand
the resources available for plugin writing:
sub hook_queue {
my ($self,$transaction) = @_;
debug(DEBUG=>'JARED:self:' . Dumper($self));
debug(DEBUG=>'JARED:transaction:' . Dumper($transaction));
return (OK,'JARED:Queued!');
}
debug(DEBUG=>"foo") is our application's own debug function. Thing
is, this plugin doesn't seem to ever run. I added it to /usr/share/
qpsmtpd/plugins/ and added a line for it just before the $include
which pulls in queue/postfix-queue (this is a debian box). When I
run a test message, it returns the postfix "Queued! (ID foo)"
message and nothing gets written to our debug logs.
Am I missing something?
Maybe it can't find debug() or Dumper()? Is this the entire plugin?
Matt.