You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by pe...@cafes.net on 2006/12/19 21:49:37 UTC
Plugin help-- need to store state
Hi. Were writing an in house plugin. Our SA version is 3.1.5. Basically we have a lot of rules
based on data from a database. We want to hit the data base once and
then have all the rules beable to check the data to score accordingly
similar to how Bayes works.
>From reading the M::SA::Plugin docs, it seems the check_start call back is a good plate to set state and the PerMsgStatus object is where to store it. So we have this;
sub check_start {
my ($self, $pms) = @_;
$pms->{CAFEREP}{from_avg_score} = 2.0;
}
When we access $pms->{CAFEREP}{from_avg_score} in our eval rule, we get
an error saying it is uninitialized.
So, do we need to call check_start on our own somewhere? The docs say it
is a callback that SA calls.
thanks for any help.
Peter