<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Mick wrote:
<blockquote cite="mid461B5707.2020800@iinet.net.au" type="cite">
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
Scott Silva wrote:
  <blockquote cite="midevdklb$v87$2@sea.gmane.org" type="cite">
    <pre wrap="">Mick spake the following on 4/9/2007 3:55 AM:
  </pre>
    <blockquote type="cite">
      <pre wrap="">Hello.

I am currently running MailScanner which uses the clamavmodule.  The
other day, I received 4 emails from <a class="moz-txt-link-abbreviated"
 href="mailto:ad-noreply@google.com">ad-noreply@google.com</a> and each of
these emails has a )non-password protected) zip file and contained
within each zip file was a file called report.csv.  However, MailScanner
quarantined them even though clamscan reports that none of the zip files
are infected.  Placing <a class="moz-txt-link-abbreviated"
 href="mailto:ad-no-reply@google.com">ad-no-reply@google.com</a> in
/etc/MailScanner/rules/virus-scan.rules results in those zip files as
sent from <a class="moz-txt-link-abbreviated"
 href="mailto:ad-noreply@google.com">ad-noreply@google.com</a> now passing through unscanned but why
were the files quarantined in the first place when clamscan says that
they're uninfected?

Thanks,
Mick.
    </pre>
    </blockquote>
    <pre wrap=""><!---->Did it say that they were password protected?
Clamavmodule can also choke if they are over it's stated limit on how
compressed the file is.
Look in this area of conf;

# ClamAVModule only: set limits when scanning for viruses.
#
# The maximum recursion level of archives,
# The maximum number of files per batch,
# The maximum file of each file,
# The maximum compression ratio of archive.
# These settings *cannot* be the filename of a ruleset, only a simple number.
ClamAVmodule Maximum Recursion Level = 10
ClamAVmodule Maximum Files = 1000
ClamAVmodule Maximum File Size = 10000000 # (10 Mbytes)
ClamAVmodule Maximum Compression Ratio = 950

  </pre>
  </blockquote>
Hi Scott.<br>
  <br>
Thanks for the reply.<br>
  <br>
  <br>
  <blockquote type="cite">
    <pre wrap="">Did it say that they were password protected?</pre>
  </blockquote>
  <br>
No. They weren't password protected and they weren't reported by
clamscan as being protected.<br>
  <br>
  <br>
I actually work for a Web Hosting company and the control panel we use
(much to my dismay) is Ensim and the version of MailScanner that is
installed is the one that gets installed when Ensim is installed.  As
such, the version of MailScanner that we are currently using is
4.31.6-1 (and ClamAV 0.88.7)  and so it does not have any of those
ClamAVModule directives that you have mentioned (I'll be upgrading both
within the next week or so).<br>
  <br>
Anyway, the compression ratio is approximately 80%, with the archive
being just a bit smaller than what (Linux) zip 2.3 can do with zip -9.<br>
  <br>
  <br>
Cheers.<br>
  <br>
</blockquote>
Ok. A bit more info on this.  This is in MailScanner.conf:<br>
<br>
Maximum Archive Depth = 0<br>
Find Archives By Content = no<br>
Virus Scanners = clamavmodule<br>
Allow Password-Protected Archives = no<br>
<br>
and seeing as clamscan determined that the zip files contained no
viruses, I was curious to see if clamavmodule detected any viruses in
the zip files.<br>
So pinching the code snippet from `perldoc Mail::ClamAV' and replacing <br>
<br>
<br>
my $c = new Mail::ClamAV("/path/to/directory/or/file")<br>
<br>
with<br>
<br>
my $c = new Mail::ClamAV("/var/clamav/main.cvd")<br>
<br>
<br>
(and afterwards, trying again replacing main.cvd with daily.cvd), <br>
<br>
<br>
and also replacing<br>
<br>
my $status = $c-&gt;scan(FH, CL_SCAN_ARCHIVE|CL_SCAN_MAIL);<br>
<br>
with<br>
<br>
my $status = $c-&gt;scan("/tmp/report-csv.zip", 0);<br>
<br>
<br>
upon running the perl script, clamavmodule returns:<br>
<br>
No virus found!<br>
<br>
<br>
So why is MailScanner detecting them as being viruses and quarantining
them (unless I place the sender's address in virus-scan.rules as
previously described)?<br>
<br>
Cheers.<br>
<br>
</body>
</html>