https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7782
Reindl Harald <h.rei...@thelounge.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |h.rei...@thelounge.net --- Comment #2 from Reindl Harald <h.rei...@thelounge.net> --- well, that works, thx [root@mail-gw:~]$ cat /etc/mail/spamassassin/clamav.pm package Mail::SpamAssassin::Plugin::ClamAV; use strict; use Mail::SpamAssassin; use Mail::SpamAssassin::Plugin; use Mail::SpamAssassin::Logger; use File::Scan::ClamAV; use Mail::SpamAssassin::Util qw(untaint_var); our @ISA = qw(Mail::SpamAssassin::Plugin); sub new { my ($class, $mailsa) = @_; $class = ref($class) || $class; my $self = $class->SUPER::new($mailsa); bless($self, $class); $self->register_eval_rule('check_clamav'); return $self; } sub check_clamav { my($self, $pms, $fulltext, $socket) = @_; $socket = untaint_var($socket); my $clamav = new File::Scan::ClamAV(port => $socket); my($code, $virus) = $clamav->streamscan(${$fulltext}); my $isspam = 0; if(!$code) { my $errstr = $clamav->errstr(); dbg("ClamAV: $errstr"); } elsif($code eq 'FOUND') { $isspam = 1; $pms->test_log($virus); dbg("ClamAV: $virus"); } return $isspam; } 1; [root@mail-gw:~]$ -- You are receiving this mail because: You are the assignee for the bug.