Hi Daryl, Thanks for the advice; I appreciate the information.
I looked in Mail::SpamAssassin::Plugin::AWL, and it seems to use the same technique to report dynamic scores that I'm using in my Message Sniffer SNF4SA plugin (which doesn't seem to work with SpamAssassin 3.1.7). From check_from_in_auto_whitelist: # current AWL score changes with each hit for my $set (0..3) { $pms->{conf}->{scoreset}->[$set]->{"AWL"} = sprintf("%0.3f", $delta); } if ($delta != 0) { $pms->got_hit("AWL", "AWL: ", ruletype => 'eval', score => $delta); } My SNF4A plugin calls got_hit(), and also makes the same assignment to $pms- >{conf}->{scoreset}. Am I looking at the right place? Thanks, Alban On Monday 21 December 2009 06:09:06 pm Daryl C. W. O'Shea wrote: > On 19/12/2009 3:20 PM, Alban Deniz wrote: > > I would like to know if there's a way to report dynamic scores in > > SpamAssassin 3.1.7. I haven't been able to find info for this on the FAQ > > or on the FrontPage. > > If I recall correctly the only way to do it is to access the score hash > of the $permsgstatus object directly. > > - in the rule definition assign any score (or don't) as long as you > don't assign it zero the rule will run > > - during message processing modify the score hash directly for that > rule... you might have to do this really late (in one of the last plugin > calls)... I seem to remember the score not sticking if you did it too early > > Your best bet is to take a look at the AWL plugin. It assigns socres > dynamically just as you'd like to do. The code in that plugin will work > for you. > > Daryl