4.3. 安装 Qmail-Scanner

我们现在准备安装 Qmail-Scanner。下载最新版本的 Qmail-Scanner 源代码。在编写本指南时,最新版本是 1.20。

创建一个用户以运行 Qmail-Scanner。

#groupadd qscand
#useradd qscand -g qscand -c "qmail scanner" -s /nonexistent

解压 tar 包并切换到 Qmail-Scanner 目录。

#tar -zxvf qmail-scanner-1.20.tar.gz
#cd qmail-scanner-1.20

运行 Configure 以自动检测您的系统上安装了哪些软件。查看输出以确保它是正确的。它应该看起来与此类似

#./configure

This script will search your system for the virus scanners it knows
about, and will ensure that all external programs
qmail-scanner-queue.pl uses are explicitly pathed for performance
reasons.

It will then generate qmail-scanner-queue.pl - it is up to you to install it
correctly.

Continue? ([Y]/N) <PRESS ENTER>

Found tnef on your system! That means we'll be able to decode stupid
M$ attachments :-)


The following binaries and scanners were found on your system:

mimeunpacker=/usr/local/bin/reformime
unzip=/usr/bin/unzip
tnef=/usr/local/bin/tnef

Content/Virus Scanners installed on your System

clamuko=/usr/local/bin/clamdscan (which means clamscan won't be used as clamdscan is better)

Qmail-Scanner details.

log-details=0
fix-mime=1
debug=1
notify=sender,admin
redundant-scanning=no
virus-admin=root@mail  --substitute you domain here
local-domains='mail' --substitute your domain here
silent-viruses='klez','bugbear','hybris','yaha','braid','nimda','tanatos','sobig','winevar','palyh','fizzer','gibe','
cailont','lovelorn','swen','dumaru','sober','hawaii','holar-i'
scanners="clamuko_scanner"

If that looks correct, I will now generate qmail-scanner-queue.pl
for your system...
Continue? ([Y]/N)<PRESS ENTER>

			

现在输入

# ./configure ?install

这将安装 qmail-scanner-queue.pl 并创建必要的目录结构。您应该看到与之前类似的消息。再次,请阅读脚本的输出以确保一切正确。如果是,请按 ENTER 安装 Qmail-scanner。

如果 qmail 已成功安装,则 qmail-scanner-queue.pl 现在应该已安装。您应该在 /var/qmail/bin 中看到 qmail-scanner-queue.pl。

#ls /var/qmail/bin
/var/qmail/bin/qmail-scanner-queue.pl

如果您在 /var/qmail/bin 中没有看到 qmail-scanner-queue.pl,请再次执行 configure 脚本。请注意脚本的输出并验证所有设置是否正确。您还可以访问 Qmail-scanner 邮件存档,网址为 http://lists.sourceforge.net/mailman/listinfo/qmail-scanner-general