Add X-Spam-Level header in spamassassin plugin (idea from Werner Fleck)
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@795 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
2361ca606d
commit
475203689d
2
Changes
2
Changes
@ -1,5 +1,7 @@
|
||||
0.41
|
||||
|
||||
Add X-Spam-Level header in spamassassin plugin (idea from Werner Fleck)
|
||||
|
||||
Remove the auth/authnull sample plugin (there are plenty proper examples now
|
||||
so we don't have to include this insecure plugin)
|
||||
|
||||
|
@ -186,11 +186,18 @@ sub hook_data_post { # check_spam
|
||||
|
||||
$self->_cleanup_spam_header($transaction, 'X-Spam-Flag');
|
||||
$self->_cleanup_spam_header($transaction, 'X-Spam-Status');
|
||||
$self->_cleanup_spam_header($transaction, 'X-Spam-Level');
|
||||
|
||||
$transaction->header->add('X-Spam-Flag', 'YES', 0) if ($flag eq 'Yes');
|
||||
$transaction->header->add('X-Spam-Status',
|
||||
"$flag, hits=$hits required=$required\n" .
|
||||
"\ttests=$tests", 0);
|
||||
|
||||
my $length = int($hits);
|
||||
$length = 1 if $length < 1;
|
||||
$length = 50 if $length > 50;
|
||||
$transaction->header->add('X-Spam-Level', '*' x $length, 0);
|
||||
|
||||
$self->log(LOGNOTICE, "check_spam: $flag, hits=$hits, required=$required, " .
|
||||
"tests=$tests");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user