
                       AMaViS - A Mail Virus Scanner 
                               Version perl-11

What is it?
===========

  AMaViS is a script that interfaces a mail transport agent (MTA) with
one or more virus scanners.

  This version is a big change from the 0.2.x series of the software as the
main virus scanning script has been rewritten in perl, replacing the original
shell script.

  The currently supported MTAs are exim, qmail, postfix, and sendmail.
Please refer to the corresponding README.mta file in this directory.

Software Requirements
=====================

  The idea is to use perl modules where ever possible so that the script can
be as self-contained and independent as possible.  This should hopefully
make it much more portable and reduce the number of hacks required to deal
with subtle differences between commands on different UNIX systems.

  But some perl modules are not ready for prime time yet, so we still
require a number of external commands.

  The configure script will stop with an error message if the following
external commands/programs are not found. See doc/amavis.txt, or the
amavis web site at http://www.amavis.org/ for information on where to
get these.

 o perl (obviously)
 o virus scanner software (obviously)
 o file
   A file command which understands the -b option is required, e.g. the
   one from ftp://ftp.astron.com/pub/file/
 o arc
 o bunzip2 (part of the bzip2 package)
 o lha (version 1.14g or later!)
 o unarj
 o uncompress (standard on Unix and Unix-like systems)
 o unrar
 o zoo

  procmail is only required if amavis is configured for use as local mailer
(/etc/postfix/main.cf:$mailbox_command) with postfix. See README.postfix
for details.

Perl Modules
============

  In order to run this script you need the following perl modules installed.
They are all available from CPAN (http://www.cpan.org/).

IO-stringy
Syslog
MailTools
MIME-Base64
MIME-tools version 5.313 or better (!!)
Convert-UUlib
Convert-TNEF 0.06 or better (!!)
Compress-Zlib
Archive-Tar
Archive-Zip
libnet

  If you have the CPAN module installed, the most convenient way to install
these modules is to launch the CPAN shell with

  perl -MCPAN -e shell

and tell it to:

  install Unix::Syslog
  install Convert::UUlib
  install Convert::TNEF
  install Compress::Zlib
  install Archive::Tar
  install Archive::Zip
  install G/GB/GBARR/MailTools-1.15.tar.gz
  install MIME::Tools
  install Bundle::libnet

  The CPAN shell will automatically install modules which are required
by those you requested (e.g. MIME-Base64, required by MIME-tools), and
it also takes care of updating older modules.

  MIME-tools has undergone rapid changes recently. The new Parser::Filer
class in version 5.3xx allowed us to simplify some of amavis-perl's code.
In addition, it should be pointed out that versions prior to 5.313 have
a serious bug in the generation of temporary filenames which cause amavis
to fail.

  The libnet module is only required for the postfix content filter interface
(--enable-smtp configure option). Configure checks for it separately,
although MailTools suggests to install libnet first.

[This is probably outdated, but I don't know whether the problem is fixed
 in Archive-Tar-0.22.]
  Because of a bug in the Archive::Tar module, please apply the following
patch to Archive-Tar-0.21 which removes compression support.  It is okay
that the Tar module not have compression support as AMaViS handles each
compression or decoding stage separately, so we don't need it.

-------------------------------------------------------------------------
*** Archive-Tar-0.21/Tar.pm	Tue Feb  2 11:37:13 1999
--- Archive-Tar-0.21-fix/Tar.pm	Sat Jan  8 13:39:59 2000
***************
*** 25,44 ****
      unless $symlinks || !$^W;
  
  # Check if Compress::Zlib is available
! my $compression = eval { 
!     local $SIG{__DIE__};
!     require Compress::Zlib; 
!     sub Compress::Zlib::gzFile::gzseek {
! 	my $tmp;
! 
! 	$_[0]->gzread ($tmp, 4096), $_[1] -= 4096
! 	    while ($_[1] > 4096);
! 
! 	$_[0]->gzread ($tmp, $_[1])
! 	  if $_[1];
!     }
!     1;
! };
  carp "Compression not available"
      unless $compression || !$^W;
  
--- 25,45 ----
      unless $symlinks || !$^W;
  
  # Check if Compress::Zlib is available
! #my $compression = eval { 
! #    local $SIG{__DIE__};
! #    require Compress::Zlib; 
! #    sub Compress::Zlib::gzFile::gzseek {
! #	my $tmp;
! #
! #	$_[0]->gzread ($tmp, 4096), $_[1] -= 4096
! #	    while ($_[1] > 4096);
! #
! #	$_[0]->gzread ($tmp, $_[1])
! #	  if $_[1];
! #    }
! #    1;
! #};
! my $compression = 0;
  carp "Compression not available"
      unless $compression || !$^W;
-------------------------------------------------------------------------

  Note that the use of the Archive::Tar module means that securetar is no
longer needed as a separate program.  Securezip is no longer needed either
as zip files are processed securely within the perl script.

Installation
============

./configure [options]
make
make check (does not work with qmail)

  The final step checks whether the generated amavis script was configured
properly, and whether it can actually detect viruses. One of the tests
executed by make check uses the EICAR.COM virus scanner test pattern.

For a list of configure options, type

./configure --help

A detailed explanation of these options is in INSTALL.

Testing
=======

A very basic and rudimentary set of tests is executed on "make check".
The test suite does not work with qmail yet. See tests/README for details.

