Amavisd-new

From MattWiki
Jump to: navigation, search

Documentation

Prerequisites

Amavisd-new is writen in perl and requires the following modules.

Archive::Zip   (Archive-Zip-x.xx) (1.14 or later, currently 1.23)
Compress::Zlib (Compress-Zlib-x.xx) (1.35 or later, currently 2.008)
Convert::TNEF  (Convert-TNEF-x.xx)
Convert::UUlib (Convert-UUlib-x.xxx) (1.08 or later, stick to new versions!)
MIME::Base64   (MIME-Base64-x.xx)
MIME::Parser   (MIME-Tools-x.xxxx) (latest version from CPAN - currently 5.425)
Mail::Internet (MailTools-1.58 or later have workarounds for Perl 5.8.0 bugs)
Net::Server    (Net-Server-x.xx) (version 0.88 finally does setuid right)
Digest::MD5    (Digest-MD5-x.xx) (2.22 or later)
IO::Stringy    (IO-stringy-x.xxx)
Time::HiRes    (Time-HiRes-x.xx) (use 1.49 or later, older can cause problems)
Unix::Syslog   (Unix-Syslog-x.xxx)
BerkeleyDB     with bdb library (preferably 4.4.20 or later)
Mail::DKIM     (Mail-DKIM-0.31 or later)

So when using Fedora you can run a command like the following one to install all the needed prerequisites besides Postfix, SpamAssassin, & ClamAV.

yum install perl-Archive-Zip perl-Compress-Zlib perl-Convert-TNEF perl-Convert-UUlib perl-MINE-Base64 \
perl-MINE-Parser perl-Mail-Internet perl-Net-Server perl-Digest-MD5 perl-IO-stringy perl-Time-HiRes \
perl-Unix-Syslog perl-BerkeleyDB perl-Mail-DKIM lzop p7zip arj libytnef freeze

Installing

mkdir /var/amavis
mkdir /var/amavis/tmp /var/amavis/var /var/amavis/db /var/amavis/home
echo "amavis:x:490:490:amavis:/var/amavis:/sbin/nologin" >> /etc/passwd
echo "amavis:x:490:" >> /etc/group
chown -R amavis:amavis /var/amavis
chmod -R 750 /var/amavis
mkdir /var/virusmails
chown amavis:amavis /var/virusmails
chmod 750 /var/virusmails
wget http://www.ijs.si/software/amavisd/amavisd-new-2.6.1.tar.gz
tar -xzf amavisd-new-2.6.1.tar.gz
cd amavisd-new-2.6.1
cp amavisd /usr/local/sbin/
chown root /usr/local/sbin/amavisd
chmod 755  /usr/local/sbin/amavisd
cp amavisd.conf /etc/
chown root:amavis /etc/amavisd.conf
chmod 640 /etc/amavisd.conf

Configuring