openbsd-ports/mail/mailscanner/patches/patch-lib_MailScanner_Message_pm
brad 0936ece73f Upgrade to MailScanner 4.72.5-1.
Feedback from sthen@ including adding a conflict marker as a
kludge to ensure that if a user wants to use AV support that
the correct version is installed (0.94 or newer) since it is
an optional dependency. Great job by the Clam crew for making
this such a mess. The current version of MailScanner is broken
if using 0.94 since the commandline opts were changed.

ok todd@ sthen@
2008-11-07 02:33:58 +00:00

26 lines
1.2 KiB
Plaintext

$OpenBSD: patch-lib_MailScanner_Message_pm,v 1.5 2008/11/07 02:33:58 brad Exp $
--- lib/MailScanner/Message.pm.orig Mon Oct 27 07:31:59 2008
+++ lib/MailScanner/Message.pm Thu Nov 6 20:24:55 2008
@@ -680,12 +680,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