From bb03a785ef470974b4bad31377dc6928933c3836 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Thu, 15 May 2014 12:21:09 +0000 Subject: [PATCH] munge_subject_threshold did not previously work --- plugins/spamassassin | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/spamassassin b/plugins/spamassassin index 342c788..e5f0310 100644 --- a/plugins/spamassassin +++ b/plugins/spamassassin @@ -444,12 +444,14 @@ sub munge_subject { my $sa = $self->get_spam_results($transaction) or return; 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"); return; }; return unless $sa->{score} > $required; + return unless $sa->{score} > $qp_num; my $subject_prefix = $self->qp->config('subject_prefix') || '*** SPAM ***'; my $subject = $transaction->header->get('Subject') || '';