On Feb 14, 2012, at 10:07 AM, Jeroen Koekkoek wrote:
> Hi,
>
> I dived a little deeper into SpamAssassin's code. In
> lib/Mail/SpamAssassin/Plugin/Bayes.pm a plugin is called. It concerns the
> following code:
>
> ----- code -----
> $self->{main}->call_plugins("bayes_scan", { toksref => $msgtokens,
> probsref => \%pw,
> score => $score,
> msgatime => $msgatime,
> significant_tokens =>
> \@touch_tokens,
> });
> ----- /code -----
>
> I can't figure out where this method resides, can anyone point me in the
> right direction? There seems to be no subroutine called bayes_scan in the
> entire codebase?
>
> Thanks in advance.
You should read up on how SpamAssassin plugins work.
That's just a plugin call made available to any plugins that would like to use
it. You can perldoc Mail::SpamAssassin::Plugin to get more information on the
call.
Basically, it's not used in the base code but gives third party developers
places to hook in to accomplish whatever tasks they want.
It could be used to implement a different bayes system, to implement a system
that decoded tokens, etc.
Michael