1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Extreme Bad History cannot be disabled

Moderators: pdreissen, fribo

Extreme Bad History cannot be disabled

Postby tnichols » Thu Dec 15, 2011 6:40 pm

I'm having an issue where even though I have the ExtremePB features disabled, mail is still being blocked/scored due to it.

I have DoPenalty set to 'monitor/messageScoring', DoPenaltyExtreme set 'disabled', DoPenaltyExtremeSMTP set 'disabled', and PenaltyExtreme is set to the default of '150'.

But I am still getting log messages as follows:
Message-Score: added 25 for Extreme Bad History (460), total score for this message is now 25

I believe there is a bug in the code where it should be checking the value of 'DoPenaltyExtreme' but it is not.

Would it make more sense to have the first "return 1" line in the code I list below, look as follows?
Code: Select all
   return 1 if !$PenaltyExtreme || !$DoPenaltyExtreme;


Code: Select all

sub PBExtremeOK {
    my ( $fh, $myip, $skipcip) = @_;

    --- cut ----

    return 1 if !$PenaltyExtreme;
    return 1 if ( !exists $PBBlack{&ipNetwork( $myip, $PenaltyUseNetblocks )} );
    return 1 if matchIP( $myip, 'noExtremePB', $fh );
    return 1 if matchSL( &batv_remove_tag(0,$this->{mailfrom},''), 'noExtremePBAddresses' );

    my $tlit = tlit($main::DoPenaltyExtreme);

    my ( $ct, $ut, $level, $totalscore, $sip, $reason, $counter ) =
      split( ' ', $PBBlack{&ipNetwork( $myip, $PenaltyUseNetblocks )} );
    if ( $totalscore >= $PenaltyLimit && $totalscore < $PenaltyExtreme ) {
        $this->{messagereason} = "Bad IP History";
        pbAdd( $fh, $myip, $pbValencePB, "BadHistory", 1 );

    }
    if ( $PenaltyExtreme && $totalscore >= $PenaltyExtreme ) {
        $this->{messagereason} = "Extreme Bad History ($totalscore)";
        pbAdd( $fh, $myip, $pbeValencePB, "ExtremeHistory", 1 );
        return 1 if !$DoPenaltyExtreme;
        $this->{prepend}    = "[Extreme]";
        $this->{messagereason} = "score for $myip is $totalscore, surpassing extreme level of $PenaltyExtreme";

        mlog( $fh,"$tlit (totalscore for '$myip' is $totalscore, surpassing extreme level of $PenaltyExtreme, last penalty was '$reason')")
           if $PenaltyExtremeLog >= 2 && $DoPenaltyExtreme >= 2;
        return 1 if $DoPenaltyExtreme >= 2;
        $Stats{pbextreme}++;
        return 0;
    }
    return 1;
}


tnichols
 
Posts: 6
Joined: Wed Dec 14, 2011 6:15 pm

Re: Extreme Bad History cannot be disabled

Postby thockar » Sat Dec 17, 2011 9:42 am

This will be fixed.

Thomas
thockar
Site Admin
 
Posts: 306
Joined: Mon Mar 09, 2009 7:05 pm

Re: Extreme Bad History cannot be disabled

Postby tnichols » Tue Dec 20, 2011 4:36 pm

Thanks! I'll be looking for it. :)
tnichols
 
Posts: 6
Joined: Wed Dec 14, 2011 6:15 pm

Re: Extreme Bad History cannot be disabled

Postby thockar » Sat Dec 31, 2011 7:56 am

This is fixed.

Thomas
thockar
Site Admin
 
Posts: 306
Joined: Mon Mar 09, 2009 7:05 pm


Return to Bug reports

Who is online

Users browsing this forum: No registered users and 1 guest

cron