How To Use AMaViS With qmail
If you are using AMaViS with qmail, you should move your qmail-queue program to qmail-queue-real and copy the amavis script to qmail-queue (all of them belong to the qmail binary path, usually /var/qmail/bin). You should make sure it has the same permissions (usually owned by qmailq, group qmail, mode 4711).
Both the quarantine directory and log directory (defaults of /var/virusmails and /var/amavis) need to exist and be owned by qmailq.
If you are running qmail with softlimit, be careful of the settings you use or you may get errors. If things don't run, check the qmail-smtpd log.
In qmail mode, AMaViS requires suidperl. You may use the small simple test tool "uid-perl.pl" from the "tests" subdirectory to check if suidperl is available and working by executing the following commands as root:
chown qmailq:qmail tests/uid-test.pl
chmod 4755 tests/uid-test.pl
tests/uid-test.pl
Hint: On some systems (i.e. SuSE Linux or FreeBSD) suidperl is not suid for security reasons, but it has to otherwise it won't work. To re-enable it at least for qmail issue the following commands on a Linux system:
chown root:qmail /usr/bin/suidperl
chmod 4710 /usr/bin/suidperl
This permissions will work only if qmaild is in the group qmail, if the group of qmaild (id qmaild) is nogroup or nofiles as recommended by the qmail author just set suidperl to 4755:
chmod 4755 /usr/bin/suidperl
On a *BSD system, only members of the group wheel are allowed to do setuid(). Therefore, do not change the group membership and issue only:
chmod 4755 /usr/bin/suidperl
Hint: You should create an alias for virusalert, i.e. create the file /var/qmail/alias/.qmail-virusalert. See http://www.lifewithqmail.org/lwq.html#aliases for details and how to use sendmail's /etc/aliases file.
