From d37f875992112f673f09afc716cdac1f8a89473e Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Sat, 23 Mar 2013 01:07:01 -0400 Subject: [PATCH] dspam: be more conservative with karma awards previous settings were reasonable for a well trained dspam. After starting with a fresh dspam, the settings were not optimal for the amount of naive that a default dspam is. --- plugins/dspam | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/dspam b/plugins/dspam index 6812451..9d8ec43 100644 --- a/plugins/dspam +++ b/plugins/dspam @@ -491,7 +491,7 @@ sub reject_agree { if ( $d->{class} eq 'Innocent' ) { if ( $sa->{is_spam} eq 'No' ) { if ( $d->{confidence} > .9 ) { - $self->adjust_karma( 2 ); + $self->adjust_karma( 1 ); }; $self->log(LOGINFO, "pass, agree, $status"); return DECLINED; @@ -632,14 +632,14 @@ sub autolearn_karma { my $karma = $self->connection->notes('karma'); return if ! defined $karma; - if ( $karma <= -1 && $response->{result} eq 'Innocent' ) { - $self->log(LOGINFO, "training bad karma FN as spam"); + if ( $karma < -1 && $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' ) { - $self->log(LOGINFO, "training good karma FP as ham"); + if ( $karma > 1 && $response->{result} eq 'Spam' ) { + $self->log(LOGINFO, "training good karma ($karma) FP as ham"); $self->train_error_as_ham( $transaction ); return 1; };