diff --git a/plugins/dspam b/plugins/dspam index bab7c76..a7b7013 100644 --- a/plugins/dspam +++ b/plugins/dspam @@ -634,13 +634,13 @@ sub autolearn_karma { my $karma = $self->connection->notes('karma'); return if ! defined $karma; - if ( $karma < -1 && $response->{result} eq 'Innocent' ) { + if ( $karma < -2 && $response->{result} eq 'Innocent' ) { $self->log(LOGINFO, "training bad karma ($karma) FN as spam"); $self->train_error_as_spam( $transaction ); return 1; }; - if ( $karma > 1 && $response->{result} eq 'Spam' ) { + if ( $karma > 2 && $response->{result} eq 'Spam' ) { $self->log(LOGINFO, "training good karma ($karma) FP as ham"); $self->train_error_as_ham( $transaction ); return 1; diff --git a/plugins/spamassassin b/plugins/spamassassin index 6455d8f..6d0a559 100644 --- a/plugins/spamassassin +++ b/plugins/spamassassin @@ -394,9 +394,12 @@ sub reject { }; my $ham_or_spam = $sa_results->{is_spam} eq 'Yes' ? 'Spam' : 'Ham'; + if ( $ham_or_spam eq 'Spam' ) { + $self->adjust_karma( -1 ); + }; my $status = "$ham_or_spam, $score"; my $learn = ''; - my $al = $sa_results->{autolearn}; + my $al = $sa_results->{autolearn}; # subject to local SA learn scores if ( $al ) { $self->adjust_karma( 1 ) if $al eq 'ham'; $self->adjust_karma( -1 ) if $al eq 'spam'; @@ -404,7 +407,7 @@ sub reject { }; my $reject = $self->{_args}{reject} or do { - $self->log(LOGERROR, "pass, reject disabled ($status, $learn)"); + $self->log(LOGERROR, "error, reject disabled ($status, $learn)"); return DECLINED; };