munge_subject_threshold did not previously work
This commit is contained in:
parent
d60882c857
commit
bb03a785ef
@ -444,12 +444,14 @@ sub munge_subject {
|
|||||||
|
|
||||||
my $sa = $self->get_spam_results($transaction) or return;
|
my $sa = $self->get_spam_results($transaction) or return;
|
||||||
my $qp_num = $self->{_args}{munge_subject_threshold};
|
my $qp_num = $self->{_args}{munge_subject_threshold};
|
||||||
|
my $required = $sa->{required};
|
||||||
|
|
||||||
my $required = $sa->{required} || $qp_num or do {
|
if (!$qp_num) {
|
||||||
$self->log(LOGDEBUG, "skipping munge, no user or qpsmtpd pref set");
|
$self->log(LOGDEBUG, "skipping munge, no user or qpsmtpd pref set");
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
return unless $sa->{score} > $required;
|
return unless $sa->{score} > $required;
|
||||||
|
return unless $sa->{score} > $qp_num;
|
||||||
|
|
||||||
my $subject_prefix = $self->qp->config('subject_prefix') || '*** SPAM ***';
|
my $subject_prefix = $self->qp->config('subject_prefix') || '*** SPAM ***';
|
||||||
my $subject = $transaction->header->get('Subject') || '';
|
my $subject = $transaction->header->get('Subject') || '';
|
||||||
|
Loading…
Reference in New Issue
Block a user