You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by neil <ne...@supanet.net.uk> on 2007/08/02 17:38:53 UTC

Short circuit question / feature request

Hi;
    With short circuit you can stop scanning when certain tests are met. 
Eg user is whitelisted.
I'm seeing lots of spam with scores (50+ points) above my cut off and 
reject score.

Is there a way for shortcircuit to see the current score and stop if it 
is above a certain cut off ?
I don't want to waste cycles just confirming stuff is really spammy.

What I'm thinking of is a $stop_now_score and calling SC and checking at 
different priorities to see if $spam_score > $stop_now_score

I didnt see anything in the perldoc, but I have heard the idea some 
where. Is this possible? Is is a feature that the devs know about? 
Should I raise it as a feature request?

In the FuzzyOcr.pm there is this code which make me think its is likely, 
but I'm not a perl guru.

    my $internal_score = 0;
    my $current_score = $pms->get_score();
    my $score = $conf->{focr_autodisable_score} || 100;

    if ( $current_score > $score ) {
        infolog("Scan canceled, message has already more than $score 
points ($current_score).");
        return 0;


Cheers
N.

Re: Short circuit question / feature request

Posted by Theo Van Dinter <fe...@apache.org>.
On Thu, Aug 02, 2007 at 04:38:53PM +0100, neil wrote:
> I didnt see anything in the perldoc, but I have heard the idea some 
> where. Is this possible? Is is a feature that the devs know about? 
> Should I raise it as a feature request?

I'm still rather annoyed about this whole thing, but you can check out the
discussion in the original RFE ticket:

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=3109

In short, it got decided that short circuiting on score wasn't a good idea,
and no one provided code to implement it, so it wasn't.


FWIW: I'd still like to implement it, doing the check once per priority
level would address the horrible performance issues that it had in the
original 2.x code, but I don't have time to code it up.   So, patches
welcome. :)

-- 
Randomly Selected Tagline:
"The difference between war and sex is that sex is a lot more fun ...
 I don't know if you've had sex, but it's really fantastic!"
         - Jake Johannsen, Politically Incorrect 8/10/2001