diff --git a/plugins/spamassassin b/plugins/spamassassin index dd7cc82..4bd43ac 100644 --- a/plugins/spamassassin +++ b/plugins/spamassassin @@ -32,7 +32,7 @@ the options. Confused yet? :-) It looks like this in practice: =over 4 -=item reject [threshold] +=item reject [threshold|userprefs] Set the threshold where the plugin will reject the mail. Some mail servers are so useless that they ignore 55x responses not coming @@ -42,6 +42,10 @@ retrying until the mail expires from their queue. Depending on your spamassassin configuration a reasonable setting is typically somewhere between 12 to 20. +By setting reject = userprefs, the required threshold will be taken +from spamassassin userprefs. Usually used in conjunction with +spamd_user = vpopmail. + The default is to never reject mail based on the SpamAssassin score. =item munge_subject_threshold [threshold] @@ -424,6 +428,13 @@ sub reject { return DECLINED; }; + if ($reject eq 'userprefs') { + $reject = $sa_results->{required} or do { + $self->log(LOGERROR, "error, reject disabled ($status, $learn)"); + return DECLINED; + }; + } + if ($score < $reject) { if ($ham_or_spam eq 'Spam') { $self->log(LOGINFO, "fail, tolerated, $status < $reject, $learn");