Miha,

> On messages with large attachments or attachments that contain a zip file
> with other zip files and in that inside zip files a large quantity of
> files I get the following error.
>  amavis[3816]: (03816-11) (!!)TROUBLE in check_mail: virus_scan FAILED:
>  virus_scan: ALL VIRUS SCANNERS FAILED: ClamAV-clamd av-scanner FAILED:
>  CODE(0x8a065f4) Exceeded allowed time at (eval 45) line 292.
>  at (eval 45) line 491.
>
> the problem here is that after that happens amavis doesn't clean up the
> temporary directory. Which could result in filling up a disk space and
> as Murphy says it will happen in the middle of the night.
>
> Any chances to cook up a quick patch for that?

I quick-fix half-hearted solution is to add a dummy virus scanner entry
which always succeeds and claims a clean status, e.g.:

  ['always-clean', sub {0}],

Another quick and dirty solution is to hack both code sections
which test whether to preserve or not to preserve temporary
directories. Search for (two occurrences of):
  if ($self->{preserve} && !$self->{empty}) {
and replace them with:
  if (0) {

The coming version of amavisd provides a cleaner solution:

- adds a setting $allow_preserving_evidence, which (when turned off)
  essentially does the same as the hack above;

- adds the ability to specify a tempfailing *_destiny (D_TEMPFAIL);

- treats a failure of all virus scanners as just another
  reason to flag a message with CC_UNCHECKED, and allows the
  usual configuration facilities to treat it one way or another,
  e.g.:
    $final_unchecked_destiny = D_TEMPFAIL;  # defaults to D_PASS
    $unchecked_quarantine_method = 'local:unchecked/%m.gz';

Drop me a line if you'd like to try out the current snapshot.

  Mark

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
AMaViS-user mailing list
[email protected] 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to