[Mimedefang] Check extensions beforer virus scan

Jim McCullars jim at info.uah.edu
Tue Jan 27 17:25:12 EST 2004



On Tue, 27 Jan 2004, Kelson Vibber wrote:

> I think David said the other day that the message has already been pulled
> apart by MIMEDefang at this point, and message_contains_virus points the
> virus scanner at the working directory instead of going file by file.  This
> saves a bit of processing because you don't need to reinvoke the virus
> scanner for each attachment.

   That just now made me realize that I misspoke when I replied to the
original message.  I was under the (mistaken) impression that the virus
check in filter_begin() would reject a message.  It doesn't.  It just sets
a flag for filter() to check each part.  So if he comments out the scan in
filter_begin(), the virus check will not be done (by default).  Ouch.

   So I guess the answer is in filter(), just change the order of the
virus scan and the bad_ext check, but leave the code in filter_begin()
alone.  The virus scanner will still get run once, but not twice in the
case of a bad extension.

Jim McCullars




More information about the MIMEDefang mailing list