openbsd-ports/mail/mailscanner/patches/patch-lib_MailScanner_Message_pm

26 lines
1.2 KiB
Plaintext

$OpenBSD: patch-lib_MailScanner_Message_pm,v 1.8 2009/10/07 20:59:29 sthen Exp $
--- lib/MailScanner/Message.pm.orig Fri Jul 31 03:19:25 2009
+++ lib/MailScanner/Message.pm Sun Aug 2 03:31:39 2009
@@ -721,12 +721,19 @@ sub IsSpam {
# rblspamheader is useful start to spamreport if RBLsaysspam.
# Do the Custom Spam Checker
- my($gsscore, $gsreport);
+ my($gsscore, $gsreport, @gsheaders);
#print STDERR "In Message.pm about to look at gsscanner\n";
if ($usegsscanner) {
#print STDERR "In Message.pm about to run gsscanner\n";
- ($gsscore, $gsreport) = MailScanner::GenericSpam::Checks($this);
+ ($gsscore, $gsreport, @gsheaders) = MailScanner::GenericSpam::Checks($this);
#print STDERR "In Message.pm we got $gsscore, $gsreport\n";
+ foreach my $line (@gsheaders) {
+ my ($header,$val)=split(/:/,$line);
+ #print STDERR "In Message.pm we got gsheader $line <${header}|${val}>\n";
+ $global::MS->{mta}->AddHeader($this,
+ "$header:",
+ $val);
+ }
$this->{gshits} = $gsscore;
$this->{gsreport} = $gsreport;
$this->{sascore} += $gsscore; # Add the score