spamassassin: karma scoring is dependent on

the sessage learn status, not SA (global) autolearn setting. So, karma learning follows SA learning rules.
This commit is contained in:
Matt Simerson 2013-03-25 01:53:16 -04:00
parent b0ebb75be4
commit 37f4c95175

View File

@ -396,10 +396,11 @@ sub reject {
my $ham_or_spam = $sa_results->{is_spam} eq 'Yes' ? 'Spam' : 'Ham';
my $status = "$ham_or_spam, $score";
my $learn = '';
if ( $sa_results->{autolearn} ) {
$self->adjust_karma( 1 ) if $ham_or_spam eq 'Ham';
$self->adjust_karma( -1 ) if $ham_or_spam eq 'Spam';
$learn = "learn=". $sa_results->{autolearn};
my $al = $sa_results->{autolearn};
if ( $al ) {
$self->adjust_karma( 1 ) if $al eq 'ham';
$self->adjust_karma( -1 ) if $al eq 'spam';
$learn = "learn=". $al;
};
my $reject = $self->{_args}{reject} or do {