Re: [Mimedefang] limit virus scans based on file size..

2005-02-16 Thread Renaud PASCAL
Le Mercredi 16 Février 2005 15:20, Keith Patton a écrit :
> Hello all,
>
>  I thought I saw a excerpt on this list on a method to only virus scan
> files smaller than a certain size... ( assuming that large files are ok )
> And can't find it anywhere..  Does anyone have a filter to do such?


Here sample
cat << _zonkout_ >> toAddTo_mimedefang-filter
### preinit the containers
my($code, $category, $action);
###
### On scanne bien ici mais uniquement si taille moins d'un mega ...
###
if (-s "./INPUTMSG" < 1024*1024) {
# Scan for viruses if any virus-scanners are installed
action_change_header("X-uvscan-category", "small");
###my($code, $category, $action) = message_contains_virus();
($code, $category, $action) = message_contains_virus();
}
### else{
### action_change_header("X-uvscan-category", "mega");
### ($code, $category, $action) = message_contains_virus();
### }
_zonkout_


Mind you, in case like I had had you uncomment the 2nd part to
do some stuff when bigger than your choice, that's the
point of the preinit line, if you don't the objects are *NOT*
in the same userspace because of the {} !-D)

You've been warned ...
___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


[Mimedefang] limit virus scans based on file size..

2005-02-16 Thread Keith Patton
Hello all,
I thought I saw a excerpt on this list on a method to only virus scan 
files smaller than a certain size... ( assuming that large files are ok )
And can't find it anywhere..  Does anyone have a filter to do such?

thanks,
Keith
___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang