I'm trying to write a plugin that uses hook_helo_parse but am not having
any success. Some debugging shows my function gets called, it returns a
CODE ref, but the ref'd sub never gets called here's a simple example:
sub hook_helo_parse {
my $self = shift;
my $ref = \&parser;
$self->qp->log(LOGALERT, "hook_helo_parse called and returning $ref");
return(OK, $ref);
}
sub parser {
my( $self, $cmd, $line) = @_;
$self->qp->log(LOGALERT, "helo parser called for $cmd and $line");
return(OK, $line);
}
When run I see the first alert, but not the second- does anyone else
have a plugin using this hook that's working? I'm using qpsmtpd-0.40 and
the async server if that makes any difference.