I fixed it myself ;-)

For people, having the same problem, just replace existing sub-avp.pl with the following code.
Maybe the Admin can add it to the files.
Regards Mandy


sub avp_scanner {
 #Kaspersky  AVPLinux scanner
 &debug("kasp: starting scan of directory \"$ENV{'TMPDIR'}\"...");
 my ($start_avp_time)=[gettimeofday];
 my ($avp_verbose,$DD,$avp_status,$stop_avp_time,$avp_time);
 $avp_verbose="-O" if ($DEBUG);
 &debug("run $avp_binary  -i1 -xp $avp_verbose $ENV{'TMPDIR'}  2>&1");
 $DD=`$avp_binary -i0 -xp $avp_verbose $ENV{'TMPDIR'} 2>&1`;
 $avp_status=($? >> 8);
 &debug("--output of avp was:\n$DD--");
 if ( $avp_status > 0 ) {
   if ($avp_status =~ /^(0|5|20|21|25)$/) {
     #This covers the potential viruses
     $quarantine_description="suspicious";
     if ($DD =~ /\n[\s|](.*) (INFECTED) (.*)\n/) {
        $quarantine_description=$3;
     } elsif ($DD =~ /\n[\s|](.*) (suspicion): (.*)\n/) {
        #This covers the specific
        $destring='Suspicious file:';
        $quarantine_description=$3;
     }
     &debug("There be a $destring! ($quarantine_description)");
     ($quarantine_event=$quarantine_description)=~s/\s/_/g;
     $quarantine_event="AVP:".substr($quarantine_event,0,$QE_LEN);
   } else {
     &error_condition("corrupt or unknown Kaspersky scanner error or memory/resource/perms 
problems - exit status $avp_status");
   }
 }
 $stop_avp_time=[gettimeofday];
 $avp_time = tv_interval ($start_avp_time, $stop_avp_time);
 &debug("\n kasp: finished scan of dir \"$ENV{'TMPDIR'}\" in $avp_time secs");
}





-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Qmail-scanner-general mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general

Reply via email to