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

26 lines
1.2 KiB
Plaintext

$OpenBSD: patch-lib_MailScanner_Message_pm,v 1.7 2009/05/23 21:30:05 sthen Exp $
--- lib/MailScanner/Message.pm.orig Fri May 8 05:20:04 2009
+++ lib/MailScanner/Message.pm Wed May 13 19:22:44 2009
@@ -719,12 +719,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