Subject: pkg/24350: security/amavis-perl bug (using clamd) and postfix support
To: None <>
From: Markus W Kilbinger <>
List: netbsd-bugs
Date: 02/08/2004 00:00:51
>Number:         24350
>Category:       pkg
>Synopsis:       amavis-perl needs some mods to work with clamd and postfix
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 07 23:01:00 UTC 2004
>Release:        NetBSD 1.6ZI
System: NetBSD mogli 1.6ZI NetBSD 1.6ZI (MOGLI) #19: Fri Feb 6 18:22:28 MET 2004 root@lwle5:/usr/src/sys/arch/i386/compile/MOGLI i386
Architecture: i386
Machine: i386
To get amavis-perl work with clamd and post fix I needed the following
mods/pathes (see 'Fix'). One seems to be a bug in amavis-perl. The
others seem to be mods required for NetBSD ond postfix.
Try to install/use amavis-perl package iwth postfix and clamd
(Sorry for the strange diffs; only had my patched installed pkg as reference...)


  	  if ($output =~ /FOUND$/) {      # no errors, a virus was found
  	      $scanner_errors = 0;
  	      @virusname = ($output =~ /: (.+) FOUND/g);
  -           return 1;  # 'true' indicates virus found and stops further checking
  +           do_virus($output);
  	  } elsif ($output =~ /OK$/) {            # no errors, no viruses
  	      $scanner_errors = 0;
  	  } elsif ($output =~ /ERROR$/) {

Otherwise no virus is found at all... ;-)


   # If IGNORE leaves zombies behind on your system,
   # switch the comments between the two lines below
  -# $SIG{CHLD} = \&deadbabe;
  +$SIG{CHLD} = \&deadbabe;
  +# $SIG{CHLD} = 'IGNORE';
   # may need to do more - eg. if logging changes, close/reopen syslog/log file
   # rethink - handler should be simple

Otherwise tons of proc zobies accumulate...


  Index: Makefile
  RCS file: /cvsroot/pkgsrc/security/amavis-perl/Makefile,v
  retrieving revision 1.12
  diff -u -r1.12 Makefile
  --- Makefile    2003/07/17 22:52:50     1.12
  +++ Makefile    2004/02/07 22:55:58
  @@ -64,6 +64,8 @@
  +.elseif defined(USE_POSTFIX) && ${USE_POSTFIX} == "YES"
   CONFIGURE_ARGS+=--enable-smtp --with-smtp-port=${SMTPPORT}

To get postfix specific code into generated amavisd (on demand)...