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 fc5eeec122
commit 7da69ef12d

View File

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