#354 Amavis gives invalid error when limit exceeded

open-works-for-me
Lars Hecking
None
5
2005-01-05
2004-06-29
Klaus
No

With amavis 0.3.13.p2 we get invalid
virus-announcements when a limit exceeded.
Example: VIRUS FROM xxx@xxx.xx ()

Here is the output of the scanner:

Here are the headers:

This is caused by the empty var @virusname when a limit
exceeded.

I think this is caused by the patch provided by
link@suse.de which changes the return-code from temp to
viruserr....

To get a nicer behaviour I added a few lines to show
the admin why the mail is quarantined. See the
fellowing diff:

--- /usr/local/src/amavis/amavis-postfix Thu Jun
17 22:04:33 2004
+++ /usr/local/sbin/amavis-postfix Tue Jun 29
18:38:20 2004
@@ -514,6 +514,9 @@
} elsif ($errval == 13) { # no errors,
viruses discovered
$scanner_errors = 0;
my $loutput = $output;
+ # /* KUI */ re-init var
+ @virusname = (undef);
+ # /* KUI */
$loutput =~ s/Found: (.+) NOT a/Found the $1/g;
$loutput =~ s/Found the (.+) trojan/Found the
$1 virus/g;
$loutput =~ s/Found virus or variant (.+)
/Found the $1 virus/g;
@@ -994,6 +998,8 @@
my $current = 0;

if ($i == $MAXLEVELS) {
+ @virusname="Maximum recursion depth limit
exceeded"; # KUI
+
do_log(0,"Maximum recursion depth
($MAXLEVELS) exceeded in " . get_msg_id());
do_quarantine() or die "do_quarantine()
failed: $!";
warn_admin() or do_log(0,"warn_admin()
failed, reason: open/close");
@@ -1024,6 +1030,7 @@
# if $MAX_ARCHIVE_NESTING == 0, no maximum
archive nesting depth!
# changed by Rainer Link <link@suse.de>
if ($warn_files > 1 || ($MAX_ARCHIVE_NESTING &&
($warn_compression >= $MAX_ARCHIVE_NESTING))) {
+ @virusname="Archive nesting limit
exceeded"; # KUI
do_log(0,"Archive nesting limit exceeded in
" . get_msg_id());
do_quarantine() or die "do_quarantine()
failed: $!";
warn_admin() or do_log(0,"warn_admin()
failed, reason: open/close");
@@ -1124,6 +1131,8 @@
# if $MAXFILES set to 0, no file number
limitation is active
# changed by Rainer Link <link@suse.de>
if ($MAXFILES && ($filecount > $MAXFILES)) {
+ @virusname="File number limit exceeded"; # KUI
+
do_log(0,"File number limit ($MAXFILES)
exceeded in " . get_msg_id());
do_quarantine() or die "do_quarantine()
failed: $!";
warn_admin() or do_log(0,"warn_admin()
failed, reason: open/close");

Discussion

  • Klaus
    Klaus
    2004-06-29

    • status: open --> open-works-for-me
     
  • Lars Hecking
    Lars Hecking
    2005-01-05

    • assigned_to: nobody --> lhecking