[Mimedefang] Cascading virus scanners
David F. Skoll
dfs at roaringpenguin.com
Thu Sep 19 15:24:01 EDT 2002
On Thu, 19 Sep 2002, Aaron Paetznick wrote:
> What if I wanted paranoid-level virus scanning? Could I run several
> different virus scanners in series? Would the following be the most
> efficient method?
> sub message_contains_virus () {
> if (message_contains_virus_filescan()) {
> return message_contains_virus_filescan();
> } elsif (message_contains_virus_clamav()) {
> return message_contains_virus_clamav();
> } else {
> return (wantarray ? (0, 'ok', 'ok') : 0);
> }
> }
No.
You want:
sub message_contains_virus () {
my($code, $cat, $act);
($code, $cat, $act) = message_contains_virus_filescan();
return (wantarray ? ($code, $cat, $act) : $code) if ($act ne "ok");
($code, $cat, $act) = message_contains_virus_clamav();
return (wantarray ? ($code, $cat, $act) : $code) if ($act ne "ok");
# etc...
}
> This allows me to optimize the stack and make my prefered scanner come
> first, but I'm efectively calling the scan twice to do this. There has
> to be a better way...
>
> Opinions?
>
>
> --Aaron
>
>
>
> _______________________________________________
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
>
Roaring Penguin Software Inc. | http://www.roaringpenguin.com
GPG fingerprint: C523 771C 3710 0F54 B2D2 4B0D C6EF 6991 34AB 95BA
GPG public key: http://www.roaringpenguin.com/dskoll-key-2002.txt ID: 34AB95BA
More information about the MIMEDefang
mailing list