[Mimedefang] Multiple AV Scans

Adam Beatham adam at backboard.org
Tue Oct 22 18:58:01 EDT 2002


I don't have my filter directly in front of me.  But what you posted 
looks to be correct, if my memory serves me.  That SHOULD do 
everything you want it to.  The 2 new functions do exactly what you 
asked earlier, if it comes up negative with File::Scan, it scans with 
ClamAV.. and then does whatever it needs to with the result.  

-adam

-------- Original Message --------

==> From: Jeff Grossman <jeff at stikman.com>
==> Date: Tue, 22 Oct 2002 14:24:51 -0700

That is the part I am just not getting.  I am not sure what has to go 
where.

I have the following in my filter_begin section:

    # Scan for viruses if any virus-scanners are installed my($code, 
$category, $action) = message_contains_virus(); $FoundVirus = 
($category eq "virus");

And, I have this in my filter ($$$$) section:

    # Virus scan if ($FoundVirus) { my($code, $category, $action); 
$VirusScannerMessages = ""; ($code, $category, $action) = 
entity_contains_virus($entity); if ($category eq "virus") { return 
action_quarantine($entity, "A known virus was discovered and$ } }

 Plus, what I just added below that you supplied.  Will that do what 
I need, or am I missing something?

I really need to spend some time with Perl.  Where would be a good 
place to learn some of the commands for MIMEDefang?

Thanks, Jeff

 on 10/22/02 1:52 PM, Adam Beatham at adam at backboard.org wrote:

> Oh sorry.  Those are just setting up the functions.. You'll have to 
call > them in the proper places.  i.e., wherever you have (I'm using 
File::Scan > as the example)  message_contains_virus_filescan(), 
replace it with the new > message_contains_virus(), and wherever you 
have > entity_contains_virus_filescan(), replace it with the new > 
entity_contains_virus(). > > -adam > > At 01:29 PM 10/22/2002 -0700, 
you wrote: >> on 10/22/02 11:47 AM, Adam Beatham at 
adam at backboard.org wrote: >> >>> This is what I have, which I believe 
David gave me a while back.. >>> >>> sub message_contains_virus () { 
>>>        my ($code, $category, $action); >>>        ($code, 
$category, $action) = message_contains_virus_filescan(); >>>        
($code, $category, $action) = message_contains_virus_clamav() if >>> 
$category ne 'virus'; >>>        return ($code, $category, $action) 
if $category eq 'virus'; >>>        return (wantarray ? 
(0, 'ok', 'ok') : 0); >>> } >>> >>> sub entity_contains_virus ($) { 
>>> my ($e) = @_; >>>        ($code, $category, $action) = 
entity_contains_virus_filescan($e) >>> if $Features
{'Virus:FileScan'}; >>>        ($code, $category, $action) = >>> 
entity_contains_virus_clamav($e)   if $Features{'Virus:CLAMAV'} && 
>>> $category ne 'virus'; >>>        return ($code, $category, 
$action) if $category eq 'virus'; >>>        return (wantarray ? 
(0, 'ok', 'ok') : 0); >>> } >>> >>> >>> then you just call the proper 
function in the proper part of the filter.. >> >> Okay, thanks.  I 
went and added that to my filter file.  What do you mean by >> the 
last line "then you just call the proper function in the proper part 
of >> the filter.."?

-- Jeff Grossman (jeff at stikman.com)

_______________________________________________ MIMEDefang mailing 
list MIMEDefang at lists.roaringpenguin.com 
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang




More information about the MIMEDefang mailing list