[Mimedefang] MIMEDefang 2.42 & ClamD

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


Another thought on the subject...

Would it make sense to log the error and then try to scan with clamav if
clamd fails?  This would still allow the email message to be scanned if
clamd can't access it due to a permissions problem.

Michael

-----Original Message-----
From: Michael Haro 
Sent: Thursday, April 08, 2004 11:01 AM
To: mimedefang at lists.roaringpenguin.com
Subject: [Mimedefang] MIMEDefang 2.42 & ClamD


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

_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca MIMEDefang
mailing list MIMEDefang at lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang



More information about the MIMEDefang mailing list