https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6254

           Summary: ClamAV plugin needs changes for v3.3.0
           Product: Spamassassin
           Version: 3.3.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Plugins
        AssignedTo: [email protected]
        ReportedBy: [email protected]


The ClamAV plugin at http://wiki.apache.org/spamassassin/ClamAVPlugin doesn't
work with SA v3.3.0b1 because of changes described in Bug 6185.  

I think the following change in clamav.pm will fix it:

# diff -u clamav.pm.orig clamav.pm
--- clamav.pm.orig      Wed Dec  9 16:01:04 2009
+++ clamav.pm   Wed Dec  9 16:05:03 2009
@@ -41,8 +41,8 @@
     Mail::SpamAssassin::Plugin::dbg("ClamAV: Error, unknown return code:
$code");
     $header = "Error (Unknown return code from ClamAV: $code)";
   }
-  $permsgstatus->{main}->{conf}->{headers_spam}->{"Virus"} = $header;
-  $permsgstatus->{main}->{conf}->{headers_ham}->{"Virus"} = $header;
+  push @{$permsgstatus->{main}->{conf}->{headers_spam}}, ["Virus", $header];
+  push @{$permsgstatus->{main}->{conf}->{headers_ham}},  ["Virus", $header];
   # add a metadatum so that rules can match against the result too
   $permsgstatus->{msg}->put_metadata('X-Spam-Virus',$header);
   return $isspam;

-- 
Configure bugmail: 
https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to