QMAIL+SPAM+CLAM
时间:2006-11-12 来源:枫影谁用了
一、安装环境及准备工作
安装Redhat9.0,安装时选取安装apache、php、mysql,可省去以后自已编译安装的麻烦,mysql要注意选取mysql-devel开发包,mysql的头文件和库文件分别在/usr/include/mysql和/usr/lib/mysql。
安装完Redhat9.0后,修改/etc/httpd/conf/httpd.conf,使web服务正常启用,为mysql添加root用户的密码。如果设置了防火墙,要打开服务器的smtp 25和pop3 110两个端口。
二、安装ucspi-tcp-0.88
1.下载相应软件及补丁,由于redhat9.0的glibc的版本问题,必须打补丁才能正常编译。
wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
wget http://qmail.te8.com/rpms/glibc-2.3.1/ucspi-tcp-0.88.a_record.patch
wget http://qmail.te8.com/rpms/glibc-2.3.1/ucspi-tcp-0.88.errno.patch
wget http://qmail.te8.com/rpms/glibc-2.3.1/ucspi-tcp-0.88.nobase.patch
2.安装ucspi-tcp-0.88
#tar zxvf ucspi-tcp-0.88.tar.gz
#cd ucspi-tcp-0.88
#patch -p1 < ../ucspi-tcp-0.88.a_record.patch
#patch -p1 < ../ucspi-tcp-0.88.errno.patch
#patch -p1 < ../ucspi-tcp-0.88.nobase.patch
#make
#make setup check
三、安装qmail
1.下载软件及补丁:
wget http://cr.yp.to/software/qmail-1.03.tar.gz
wget http://www.ckdhr.com/ckd/qmail-103.patch
wget http://www.qmail.org/qmailqueue-patch
wget http://www.shupp.org/patches/qmail-maildir++.patch
wget http://qmail.te8.com/rpms/glibc-2.3.1/qmail-1.03.errno.patch
wget http://qmail.te8.com/rpms/glibc-2.3.1/qmail-1.03.qmail_local.patch
wget http://members.elysium.pl/brush/qmail-smtp-auth/dist/qmail-smtpd-auth-0.31.tar.gz
2.建立目录:
# mkdir /var/qmail
# mkdir /var/qmail/alias
3.建组及用户:
# groupadd nofiles
# groupadd qmail
# useradd alias -g nofiles -d /var/qmail/alias -s /nonexistent
# useradd qmaild -g nofiles -d /var/qmail -s /nonexistent
# useradd qmaill -g nofiles -d /var/qmail -s /nonexistent
# useradd qmailp -g nofiles -d /var/qmail -s /nonexistent
# useradd qmailq -g qmail -d /var/qmail -s /nonexistent
# useradd qmailr -g qmail -d /var/qmail -s /nonexistent
# useradd qmails -g qmail -d /var/qmail -s /nonexistent
4.打补丁及编绎安装qmail
#tar zxvf qmail-1.03.tar.gz
#tar zxvf qmail-smtpd-auth-0.31.tar.gz
#cp qmail-smtpd-auth-0.31/base64.* qmail-1.03 //安装smtp-auth补丁,支持smtp认证
#patch -d qmail-1.03 < qmail-smtpd-auth-0.31/auth.patch
#cd qmail-1.03
#patch -p1 < ../qmail-103.patch
#patch -p1 < ../qmailqueue-patch
#patch -p1 < ../qmail-maildir++.patch
#patch -p1 < ../qmail-1.03.errno.patch
#patch -p1 < ../qmail-1.03.qmail_local.patch
#vi qmail-smtpd.c //将函数straynewline中的451改为553
# make setup check
# ./config-fast test.mydomain.com
5.添加别名用户:
# touch /var/qmail/alias/.qmail-root
# touch /var/qmail/alias/.qmail-postmaster
# touch /var/qmail/alias/.qmail-mailer-daemon
6.如果存在postfix和sendmail,停用现在的mail服务
#/etc/rc.d/init.d/sendmail stop
#cp /var/qmail/bin/sendmail /usr/sbin/qmail.sendmail
#rm -f /etc/alternatives/mta
#ln -s /usr/sbin/qmail.sendmail /etc/alternatives/mta
Redhat9.0已经考虑到了使用其它邮件服务器代替sendmail的情况,因为本身就提供postfix和sendmail两种选择。
四、安装vpopmail
1.下载vpopmail的稳定版
wget http://www.inter7.com/vpopmail/vpopmail-5.2.1.tar.gz
2.建立目录:
#mkdir /home/vpopmail
#mkdir /home/vpopmail/etc
3.添加用户和组:
#groupadd vchkpw
#useradd -g vchkpw vpopmail
4.添加mysql的vpopmail用户,用于操作vpopmail数据库
#mysql -u root -p //进入mysql命令行
mysql>;create database vpopmail;
mysql>; grant all on vpopmail.* to vpopmail@localhost identified by "密码";
5.编译安装vpopmail
#tar zxvf vpopmail-5.2.1.tar.gz
#cd vpopmail-5.2.1
#vi vmysql.h
/* =========================== vmysql.h ============================== */
#define MYSQL_UPDATE_SERVER "localhost" (mysql服务器名)
#define MYSQL_UPDATE_USER "vpopmail" (用户名)
#define MYSQL_UPDATE_PASSWD "12345678" (改成你设置的密码)
#define MYSQL_READ_SERVER "localhost" (mysql服务器名)
#define MYSQL_READ_USER "vpopmail" (用户名)
#define MYSQL_READ_PASSWD "12345678" (改成你设置的密码)
/*==================================================================*/
6.创建tcp.smtp文件(或者使用/etc/tcp.smtp)
# vi /home/vpopmail/etc/tcp.smtp
/*==================== tcp.smtp ================================ */
127.0.0.1:allow,RELAYCLIENT=""
:allow
/*========================================================== */
#cd /home/vpopmail/etc
#tcprules tcp.smtp.cdb tcp.smtp.tmp < tcp.smtp
7.进行编译:
# ./configure \\下面是我使用的参数
--prefix=/home/vpopmail \\指定安装路径
--enable-mysql=y \\是否应用Mysql数据库
--enable-incdir=/usr/include/mysql \\Mysql数据库include文件所在目录
--enable-libdir=/usr/lib/mysql \\Mysql数据库lib文件所在目录
--enable-default-domain=mydomain.com \\定义虚拟域名
--enable-passwd=n \\是否使用系统密码验证方式
--enable-defaultquota=52428800s \\定义缺省邮箱大小,10485760为10MB,20971520为20MB,52428800s为50MB
--enable-tcprules-prog=/usr/local/bin/tcprules \\指定tcprules目录
--enable-tcpserver-file=/home/vpopmail/etc/tcp.smtp \\指定tcprules应用规则文件
--enable-vpopuser=vpopmail \\vpopmail的用户
--enable-vpopgroup=vchkpw \\vpopmail的组
--enable-ip-alias-domains=n \\在虚拟域中允许通过反向IP地址查找虚拟域名
# make
# make install-strip
8.创建虚拟域
# cd /home/vpopmail/bin
# ./vadddomain 域名 (密码) (在mysql数据库vpopmail中自动生成vpopmail表单)
(如果使用与机器名相同的虚拟域名,应先生成一个其它的虚拟域名,不然会有问题,无法自动生成vpopmail数据库)
# ./vadduser 用户名 密码 (会自动往表vpopmail中添加用户数据,用户名要带域名,如[email protected])
如果不成功的话,则必须先删除创建的域,./vdeldomain 域名
五、smtp-auth的设置
1.修改vchkpw的属性
#chmod 4755 vchkpw
#chown root.root vchkpw
如果使用带验证的smtp,smtp进程要调用密码验证程序,则必须要使用 setuid 和setgid。提高vchkpw的权限,才能完成setgid操作。
2.下载安装cmd5checkpw
wget http://members.elysium.pl/brush/cmd5checkpw/dist/cmd5checkpw-0.22.tar.gz
#tar zxvf cmd5checkpw-0.22.tar.gz
#cd cmd5checkpw-0.22
#make
#make install
注意,因为使用vpopmail,所以checkpassword不用安装。
六、生成qmail的启动脚本
#cp /var/qmail/boot/home /var/qmail/rc
# vi /var/qmail/rc //对rc文件进行修改,以决定投送方式:
/* ================= rc =========================*/
#!/bin/sh
# Using splogger to send the log through syslog.
# Using qmail-local to deliver messages to ~/Mailbox by default.
exec env - PATH="/var/qmail/bin:$PATH" \
qmail-start ./Mailbox splogger qmail &
/* ============================================*/
#vi /var/qmail/smtp //编辑smtp服务的启动脚本
/* ===================== smtp ============================= */
#!/bin/sh
QMAILDUID=qmaild
NOFILESGID=nofiles
/usr/local/bin/tcpserver -H -R -l 0 -t 1 -v -p -x /home/vpopmail/etc/tcp.smtp.cdb -u $QMAILDUID -g $NOFILESGID 0 smtp /var/qmail/bin/qmail-smtpd hostname /home/vpopmail/bin/vchkpw /bin/true /bin/cmd5checkpw /bin/true 2>;&1 | /var/qmail/bin/splogger smtpd 3 &
/* ====================================================== */
#vi /var/qmail/pop3 //编辑pop3服务的启动脚本
/* ====================== pop3 =========================== */
#!/bin/sh
/usr/local/bin/tcpserver -H -R 0 pop3 /var/qmail/bin/qmail-popup hostname /home/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir &
/* ===================================================== */
#chmod 755 /var/qmail/rc
#chmod 755 /var/qmail/smtp
#chmod 755 /var/qmail/pop3
七、运行qmail并测试
#/var/qmail/rc
#/var/qmail/smtp
#/var/qmail/pop3
#ps aux | grep "qmail" //查看qmail的服务进程是否已完全正常启动
如果qmail已正常启动,用outlook测试qmail的smtp和pop3是否正常,注意由于vpopmail支持虚拟域名,所以在outlook中设置邮件帐号时,用户名后要加上域名,如[email protected]。smtp是带认证的,在outlook中也要作相应设置。建议先将qmail测试正常后再安装igenus,我在qmail正常工作后,安装igenus只用了10分钟,非常顺利。如果qmail出现问题,可查看mysql中的vpopmail数据库,/var/log下的mysqld和maillog日志记录,这样容易很快找出问题。
八、安装并运行igenus
1.到http://www.igenus.org下载最新的安装包,我用的是igenus_2_20030516_snap.tgz
#tar zxvf igenus_2_20030516_snap.tgz -C /var/www/html //redhat下apache的缺省document root
2.建temp文件夹
cd /var/www/html/igenus
mkdir temp
chmod -R 0755 temp
chown -R vpopmail:vchkpw temp
3.修改httpd.conf
#vi /etc/httpd/conf/httpd.conf
Group Apache
User Apache
修改为:
Group vchkpw
User vpopmail
#/etc/rc.d/init.d/httpd restart //重启apache,使修改生效
4.修改config_inc.php文件
# cd /var/www/html/igenus/config
# vi config_inc.php
/* =============== config_inc.php ==================== */
$CFG_BASEPATH = "/var/www/html/igenus";
$CFG_MYSQL_HOST = 'localhost';
$CFG_MYSQL_USER = 'vpopmail';
$CFG_MYSQL_PASS = '12345678'; \\改成你的密码
$CFG_MYSQL_DB = 'vpopmail';
$CFG_TEMP = $CFG_BASEPATh."/temp";
/* ============================================== */
5.重新编制Mysql数据库表格
#mysql -u root -p
mysql>;use vpopmail;
mysql>;alter table vpopmail drop primary key;
mysql>;alter table vpopmail add column pw_id int(5) NOT NULL primary key auto_increment;
mysql>;create table address
(
id int(11) unsigned NOT NULL auto_increment,
pw_id int(5) unsigned NOT NULL default '0',
name varchar(64) NOT NULL default '',
email varchar(128) NOT NULL default '',
UNIQUE KEY id (id),
KEY pw_id (pw_id)
) TYPE=MyISAM;
mysql>;quit;
6.如果需要,用vadddomain和vadduser添加新域名和新用户。
最后打开浏览器,输入http://你的网站/igenus,说Good Luck!吧。
九、编辑qmail自启动脚本
因为自己编写的脚本比较简陋,怕让高手笑话,所以没有写到文章里,但既然有人一再问这个问题,也就厚着脸皮献丑了。写到这,应该算是比较完整了吧。
#vi /etc/rc.d/init.d/qmail //编辑自动运行脚本
===================== qmail ======================
#! /bin/sh
# chkconfig: 2345 90 90
# description: qmail (include smtp and pop3) auto start/stop scripts.
. /etc/rc.d/init.d/functions
case "$1" in
start)
echo -n "start qmail:"
/var/qmail/rc &
echo "."
echo -n "start smtp service:"
/var/qmail/smtp
echo "."
echo -n "start pop3 service:"
/var/qmail/pop3
echo "."
;;
stop)
echo "stop qmail:"
killproc qmail-send
killproc qmail-clean
killproc qmail-rspawn
killproc qmail-lspawn
killproc splogger
killproc tcpserver
;;
*)
exit 1
;;
esac
exit 0
==============================================
#chmod 755 /etc/rc.d/init.d/qmail
#chkconfig --add qmail
OK,行了,现在只要你启动系统就会自动运行了。只是脚本比较简陋,所以不好意思拿出来,不过正常工作没问题。
防病毒方面
下载并安装
wget http://apache.mirror.pacific.net.au/spamassassin/source/Mail-SpamAssassin-3.1.0.tar.gz
tar xzf Mail-SpamAssassin-3.1.0.tar.gz
chown -R root.root Mail-SpamAssassin-3.1.0
cd Mail-SpamAssassin-3.1.0
perl Makefile.PL
make
make install
cd ..
"make install" creates the following main files :
/usr/bin/spamassassin <- This is the command-line version of the SpamAssassin program
/usr/bin/spamc <- Daemonised SpamAssassin client
/usr/bin/spamd <- Daemonised SpamAssassin server
/usr/share/spamassassin/ <- The SpamAssassin logic/filter files live here
/etc/mail/spamassassin/local.cf <- sitewide configuration settings
Test to see if the installation was successful. (Watch the output from the script. SpamAssassin will add headers to the message. In particular look for the "X-Spam-Status: " and see if it correctly tags the message with a Yes or No)
spamassassin -t < sample-nonspam.txt
spamassassin -t < sample-spam.txt
To improve security, modify the configuration of the spamd daemon so it runs under its own uid
Create a spamd user for the spamd process to run as
groupadd spamd
useradd -g spamd spamd
Modify / create the spamd configuration file
vi /etc/sysconfig/spamassassin
# Hint : if you want to enable SpamAssassin debugging
# (the debug output goes to /var/log/maillog) then use :
# SPAMDOPTIONS="-x -u spamd -H /home/spamd -d -D"
# Don't leave debugging turned on unnecessarily though,
# because it will slow down a busy server.
#
# Otherwise, for normal operation (debugging disabled) use :
SPAMDOPTIONS="-x -u spamd -H /home/spamd -d"
Configure the spamd daemon so it is running all the time from bootup onwards
cp spamd/redhat-rc-script.sh /etc/rc.d/init.d/spamd
chmod 700 /etc/rc.d/init.d/spamd
cd ..
chkconfig --add spamd
Then I like to use the ntsysv program to double-check that spamd is set to launch at boot time
Setup the SpamAssassin configuration
vi /etc/mail/spamassassin/local.cf
# Define the sensitivity level.
required_score 5
# Allow SpamAssassin to rewrite the subject line of any messages it classifies as spam
# This is the value that will prepended to the subject line of messages classified as spam
rewrite_header Subject [SPAM]
# Put spam analysis reports into to the headers of the message (rather than the body)
report_safe 0
# Enable SpamAssassin's RBL checking features :
# Although we have already done some RBL filtering earier in qmail's rblsmtpd program,
# it is still recommended to turn on RBL checking in SpamAssassin, as it will run
# checks against a variety of different RBL sources, and the results will help
# tag spam more accurately
skip_rbl_checks 0
# If we haven't received a response from the RBL server in X seconds, then skip that test
rbl_timeout 3
# You can nominate any netblocks that you control, and contain mailservers that
# you trust. IE you control the mailservers in these netblocks so there is no
# need to be running RBL checks against these particular servers.
# In this example below we are allowing the class-c 123.123.123.0 to go without
# Spamassassin RBL checking
trusted_networks 123.123.123.0/24
# Enable auto-learning
use_bayes 1
bayes_auto_learn 1
bayes_path /home/spamd/.spamassassin/bayes
# Enable auto-whitelisting
use_auto_whitelist 1
If you wish to view all the possible configuration options, use this command :
perldoc Mail::SpamAssassin::Conf
Enable the razor functions
vi /etc/mail/spamassassin/v310.pre
#uncomment the following line :注释掉下面这行.
loadplugin Mail::SpamAssassin::Plugin::Razor2
OK, the SpamAssassin software is now fully installed!
/etc/rc.d/init.d/spamd start
CLAM ANTI-VIRUS
安装clam要先安装zlib-1.2.3
wget http://www.zlib.net/zlib-1.2.3.tar.gz
tar xvzf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure
make
make install
下载并安装clam
groupadd clamav
useradd -g clamav -s /bin/false -c "Clam AntiVirus" clamav
cd /usr/local/src
wget http://optusnet.dl.sourceforge.net/sourceforge/clamav/clamav-0.88.tar.gz
tar xzf clamav-0.87.1.tar.gz
chown -R root.root clamav-0.8
cd clamav-0.88
./configure
make
make install
Customise the clamd configuration file
vi /usr/local/etc/clamd.conf
LogFile /var/log/clamd.log
LogSyslog
LocalSocket /tmp/clamd
FixStaleSocket
StreamMaxLength 10M
MaxThreads 10
User clamav
ScanMail
MailFollowURLs
ScanHTML
ScanArchive
ScanRAR
ClamukoScanOnOpen
ClamukoScanOnClose
ClamukoScanOnExec
ClamukoMaxFileSize 10M
Configure clamd so it is running all the time from bootup onwards
cp contrib/init/RedHat/clamd /etc/rc.d/init.d/
chmod 744 /etc/rc.d/init.d/clamd
chkconfig --add clamd
/etc/rc.d/init.d/clamd start
Setup the freshclam configuration file
vi /usr/local/etc/freshclam.conf
# make sure you comment out the "example" line
LogSyslog
DatabaseOwner clamav
DatabaseMirror db.au.clamav.net (where "au" matches your country code)
NotifyClamd
Configure freshclam to start on boot
vi /etc/rc.d/rc.local
/usr/local/bin/freshclam -d &
Launch freshclam now
/usr/local/bin/freshclam -d
QMAIL-SCANNER
Install the required supporting modules for Qmail-Scanner
TNEF unpacker
http://sourceforge.net/projects/tnef/
wget http://optusnet.dl.sourceforge.net/sourceforge/tnef/tnef-1.3.4.tar.gz
tar xzf tnef-1.3.4.tar.gz
chown -R root.root tnef-1.3.4
cd tnef-1.3.4
./configure
make
make install
cd ..
ReformatMIME (from the Maildrop package)
http://sourceforge.net/projects/courier
wget http://optusnet.dl.sourceforge.net/sourceforge/courier/maildrop-2.0.1.tar.bz2
bunzip2 maildrop-2.0.1.tar.bz2
tar xf maildrop-2.0.1.tar
chown -R root.root maildrop-2.0.1.tar
cd maildrop-2.0.1
./configure
make
make install-strip
make install-man
cd ..
A "Qmail-Scanner ST patch" has been released by Salvatore Toribio, which greatly extends the functionality of qmail-scanner. The patch adds extra features to help deal with spam (such as dropping messages that exceed a certain SpamAssassin score). We are going to use this patch, as it makes qmail-scanner much more useful.
# Grab the qmail-scanner source
wget http://optusnet.dl.sourceforge.net/sourceforge/qmail-scanner/qmail-scanner-1.25.tgz
tar xzf qmail-scanner-1.25.tgz
chown -R root.root qmail-scanner-1.25
# Grab and apply the qmail-scanner-st patch
wget http://toribio.apollinare.org/qmail-scanner/download/q-s-1.25st-20050406.patch.gz
gunzip q-s-1.25st-20050406.patch.gz
patch -p0 < q-s-1.25st-20050406.patch
cd qmail-scanner-1.25
groupadd qscand
useradd -c "Qmail-Scanner Account" -g qscand -s /bin/false qscand
For qmailscanner to work correctly with clamav, you need to adjust clamav to run under the qscand username
vi /usr/local/etc/clamd.conf
# look for the line that says "User clamav" and replace with
User qscand
/etc/rc.d/init.d/clamd restart
Configure Qmail-Scanner :
# Here are the settings we used at our site for configuring Qmail-Scanner :
#
# configure Qmail-Scanner to work in the following manner :
# - notify a nominated admin each time a virus is detected
# (in this case it will be [email protected])
# - use the client/server version of Clam AV for anti-virus scanning.
# - enable support for spamc/spamd in "verbose" mode.
# Qmail-Scanner can run spamd in "fast" mode or "verbose" mode.
# You can read more about this at the Qmail-Scanner FAQ page.
# I would recommend that you use verbose mode as this allows you to get access to
# the full reporting/tagging features that SpamAssassin can provide. It costs you
# a fraction more CPU power, but provides a much greater range of features.
# - Use a medium level of sensitivity when blocking mail due to broken MIME formatting
#
# THE COMMANDS HIGHLIGHTED IN BLUE BELOW ARE FROM THE QMAIL-SCANNER-ST PATCH
# - sa-delete sets the point that spam mail is autodeleted.
# sa-delete is a relative value to the SpamAssassin required_hits.
# so in our case, the spam will be deleted at a score of 10
./configure \
--admin virusadmin \
--domain yourdomain.com \
--admin-fromname "yourdomain.com Postmaster" \
--local-domains "yourdomain.com" \
--scanners clamdscan,verbose_spamassassin \
--fix-mime 1 \
--sa--debug no \
--sa-delete 5 \
--sa-reject yes \
--install
yum install perl*
vi /var/spool/qmailscan/quarantine-attachments.txt
Uncomment the following lines :
.pif 0 PIF files not allowed per Company security policy
.scr 0 SCR files not allowed per Company security policy
.hta 0 HTA files not allowed per Company security policy
.cpl 0 CPL files not allowed per Company security policy
.vbs 0 VBS files not allowed per Company security policy
.wsh 0 WSH files not allowed per Company security policy
# rebuild the perlscanner database
chown qmaild /var/qmail/bin/qmail-scanner-queue.pl
chmod g+s /var/qmail/bin/qmail-scanner-queue.pl
/var/qmail/bin/qmail-scanner-queue.pl -z
vi /var/qmail/smtp
#!/bin/sh
QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl" export QMAILQUEUE
QMAILDUID=qmaild
NOFILESGID=nofiles
/usr/local/bin/tcpserver -H -R -l 0 -t 1 -v -p -x /home/vpopmail/etc/tcp.smtp.cdb -u $QMAILDUID -g $NOFILESGID 0 smtp /var/qmail/bin/qmail-smtpd hostname /home/vpopmail/bin/vchkpw /bin/true /bin/cmd5checkpw /bin/true 2>&1 | /var/qmail/bin/splogger smtpd 3 &
Qmail-scanner's quarantine directory
Each virus infect mail message gets quarantines into the following directory :
/var/spool/qmailscan/quarantine/new
So you will need to periodically purge the files from that dir, or else your hard disk will eventually fill up!
eg setup a crontab entry like this :
0 * * * * find /var/spool/qmailscan/quarantine/new -type f -mtime +30 -exec rm '{}' \;
SPAM实时CBL:
vi /var/qmail/smtp
#!/bin/sh
QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl" export QMAILQUEUE
QMAILDUID=qmaild
NOFILESGID=nofiles
/usr/local/bin/tcpserver -H -R -l 0 -t 1 -v -p -x /home/vpopmail/etc/tcp.smtp.cdb -u $QMAILDUID -g $NOFILESGID 0 smtp /usr/local/bin/rblsmtpd -r cblplus.anti-spam.org.cn -r relays.ordb.org /var/qmail/bin/qmail-smtpd your.host.name /home/vpopmail/bin/vchkpw /bin/true /bin/cmd5checkpw /bin/true 2>&1 | /var/qmail/bin/splogger smtpd 3 &
如果客户端出现451QQ错误,打开/var/qmail/bin/qmail-scanner-queue.pl,注释到以下四行
if ($effective_uid ne "" && $uid ne "" && $uid != $effective_uid) {
$DEBUG=101;
&error_condition("owner of unpacked file \"$filepath\" (uid=$uid) doesn't match UID of Qmail-Scanner (uid=$effective_uid) - can't expect this to work. Fix whatever is creating files with uid=$uid");
}
出现451QQ错误时要检查以下几项:
一、clamd是否在运行?
二、clamd是否以qscand身份运行?
三、qmail-smtpd/run中的limit有没有设得足够大?(至少是4000000)
四、/var/log/clamd的权限对不对?
五、/var/qmail/bin/qmail-scanner.pl的权限有没有s位?属主是不是qscand?
六、clamd和clamdscan的属主是不是qscand?