patch-lib_MailScanner_Message_pm 1.2 KB

1234567891011121314151617181920212223242526
  1. $OpenBSD: patch-lib_MailScanner_Message_pm,v 1.11 2011/07/22 07:33:55 sthen Exp $
  2. --- lib/MailScanner/Message.pm.orig Sat Jun 25 16:11:08 2011
  3. +++ lib/MailScanner/Message.pm Thu Jul 21 13:23:49 2011
  4. @@ -733,12 +733,19 @@ sub IsSpam {
  5. # rblspamheader is useful start to spamreport if RBLsaysspam.
  6. # Do the Custom Spam Checker
  7. - my($gsscore, $gsreport);
  8. + my($gsscore, $gsreport, @gsheaders);
  9. #print STDERR "In Message.pm about to look at gsscanner\n";
  10. if ($usegsscanner) {
  11. #print STDERR "In Message.pm about to run gsscanner\n";
  12. - ($gsscore, $gsreport) = MailScanner::GenericSpam::Checks($this);
  13. + ($gsscore, $gsreport, @gsheaders) = MailScanner::GenericSpam::Checks($this);
  14. #print STDERR "In Message.pm we got $gsscore, $gsreport\n";
  15. + foreach my $line (@gsheaders) {
  16. + my ($header,$val)=split(/:/,$line);
  17. + #print STDERR "In Message.pm we got gsheader $line <${header}|${val}>\n";
  18. + $global::MS->{mta}->AddHeader($this,
  19. + "$header:",
  20. + $val);
  21. + }
  22. $this->{gshits} = $gsscore;
  23. $this->{gsreport} = $gsreport;
  24. $this->{sascore} += $gsscore; # Add the score