[Mimedefang] MIMEDefang 2.42 & ClamD

Michael Haro michael.haro at resources.ca.gov
Thu Apr 8 14:01:10 EDT 2004


message_contains_virus_clamd and entity_contains_virus_clamd have
slightly different code...

After receiveing an answer in $ans, one subroutine has an elseif clause
for the if statement, the other doesn't.  This results in error not
tempfailing for clamd.

Please add the following to message_contains_virus_clamd

        } elsif ($output =~ /: .+ERROR$/) {
            return (wantarray ? (999, 'swerr', 'tempfail') : 1);
        }

Given this bug, I'm wondering if it would make more sense for both
subroutines to use another subroutine that does the actual interface
with the virus scanner.  It seems like a lot of the same code is used
twice.  Maybe something like check_virus_clamd($path_to_check) could be
called from both.

Until I caught this problem, it appeared that clamd was virus checking
my email correctly even though it was failing with a permission denied
error.  Also, I noticed the most recent mimedefang-filter doesn't use
the entity_contains_virus subroutine since message_contains_virus
happens in filter_begin.  What is an example use for
entity_contains_virus?

Thanks!

Michael



More information about the MIMEDefang mailing list