软件列表
maildrop-
perl-Time-HiRes-1.38-3.i386.rpm
perl-DB_File-1.804-88.4.i386.rpm
clamav-0.80.tar.gz
qmail-scanner-1.24.gz
安装maildrop:
# tar xvf maildrop-
# cd maildrop-1.6.3
# ./configure
# make
# make install-strip
# make install-man
安装 perl插件
# rpm -ivh perl-Time-HiRes-1.38-3.i386.rpm
# perl -MCPAN -e'shell'
cpan> install Time::HiRes
cpan> exit
# rpm -ivh perl-DB_File-1.804-88.4.i386.rpm
安装clamav-0.80.tar.gz
# groupadd clamav
# useradd -g clamav –d /usr/local/share/clamav -s /bin/false clamav
# tar zxvf clamav-0.80.tar.gz
# cd clamav-0.80
#./configure
# make check
# make install
建立配置文件和启动文件
# vi /usr/local/etc/clamd.conf
LogFile /usr/local/share/clamav/clamd.log
LogTime
LogSyslog
LogVerbose
PidFile /var/run/clamd.pid
DatabaseDirectory /usr/local/share/clamav
LocalSocket /tmp/clamd
User clamav
ScanMail
ScanArchive
ScanRAR
ClamukoScanOnOpen
ClamukoScanOnClose
ClamukoScanOnExec
ClamukoIncludePath /home/vpopmail
# touch /var/log/clamd.log
# chown clamav.clamav /usr/local/share/clamav/clamd.log
# vi freshclam.conf
DatabaseDirectory /usr/local/share/clamav
UpdateLogFile /var/log/freshclam.log
LogVerbose
LogSyslog
DatabaseOwner clamav
NotifyClamd /usr/local/etc/clamd.conf
DatabaseMirror database.clamav.net
DNSDatabaseInfo current.cvd.clamav.net
# touch /var/log/freshclam.log
# chmod 644 /var/log/freshclam.log
# chown clamav.clamav /var/log/freshclam.log
# vi /etc/rc.d/init.d/clamd
#! /bin/bash
#
# crond Start/Stop the clam antivirus daemon.
#
# chkconfig: 2345 90 60
# description: clamdis a standard UNIX program that scans for Viruses.
# processname: clamd
# config: /usr/local/etc/clamav.conf
# pidfile: /var/run/clamd.pid
# Source function library.
. /etc/init.d/functions
RETVAL=0
# See how we were called.
prog="clamd"
progdir="/usr/local/sbin"
# Source configuration
if [ -f /etc/sysconfig/$prog ] ; then
. /etc/sysconfig/$prog
fi
start() {
echo -n $"Starting $prog: "
daemon $progdir/$prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/run/clamd.pid
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/run/clamd.pid /tmp/clamd
return $RETVAL
}
rhstatus() {
status clamd
}
restart() {
stop
start
}
reload() {
echo -n $"Reloading clam daemon configuration: "
killproc clamd -HUP
retval=$?
echo
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
status)
rhstatus
;;
condrestart)
[ -f /var/lock/subsys/clamd ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
exit 1
esac
exit 0
# chmod 755 /etc/rc.d/init.d/clamd
# chkconfig –add clamd
# chkconfig clamd on
更新病毒库
# /usr/local/bin/freshclam
定时更新病毒库
# crontab –e
00 9 * * * /usr/local/bin/freshclam –quiet
安装qmail-scanner-1.24.gz
确认安装了suidperl,否则执行qmail-scanner-queue.p时会提示Can't do setuid
# tar xzvf qmail-scanner-1.24.gz
# groupadd qscand
# useradd -g qscand -s /bin/false qscand
# cd qmail-scanner-1.24
#./configure --qmail-queue-binary /var/qmail/bin/qmail-queue --admin postmaster --domain eitop.com --notify sender,admin --local-domains eitop.com --lang en_GB --debug yes --unzip yes --scanners clamscan --install
# chown qscand:qscand /var/qmail/bin/qmail-scanner-queue.pl
# chmod 4755 /var/qmail/bin/qmail-scanner-queue.pl
然后用一个普通用户执行/var/qmail/bin/qmail-scanner-queue.pl -z
修改环境变量
在你的qmail启动脚本加入(/etc/profile)
QMAILQUEUE=/var/qmail/bin/qmail-scanner-queue.pl
export QMAILQUEUE
修改qmail-scanner-queue.pl中的
my $clamscan_options="-r --disable-summary --max-recursion=10 --max-space=1000000";
为:
my $clamscan_options="-r --mbox --disable-summary --max-recursion=10 --max-space=1000000";
测试
重起qmail后,执行测试程序
测试程序目录:/qmail-scanner-1.24/contrib/test_installation.sh -doit
排错日志文件
/var/log/maillog
/var/log/clamd.log
/var/spool/qmailscan/quarantine.log
/var/spool/qmailscan/qmail-queue.log
自由广告区 |
分类导航 |
邮件新闻资讯: IT业界 | 邮件服务器 | 邮件趣闻 | 移动电邮 电子邮箱 | 反垃圾邮件|邮件客户端|网络安全 行业数据 | 邮件人物 | 网站公告 | 行业法规 网络技术: 邮件原理 | 网络协议 | 网络管理 | 传输介质 线路接入 | 路由接口 | 邮件存储 | 华为3Com CISCO技术 | 网络与服务器硬件 操作系统: Windows 9X | Linux&Uinx | Windows NT Windows Vista | FreeBSD | 其它操作系统 邮件服务器: 程序与开发 | Exchange | Qmail | Postfix Sendmail | MDaemon | Domino | Foxmail KerioMail | JavaMail | Winwebmail |James Merak&VisNetic | CMailServer | WinMail 金笛邮件系统 | 其它 | 反垃圾邮件: 综述| 客户端反垃圾邮件|服务器端反垃圾邮件 邮件客户端软件: Outlook | Foxmail | DreamMail| KooMail The bat | 雷鸟 | Eudora |Becky! |Pegasus IncrediMail |其它 电子邮箱: 个人邮箱 | 企业邮箱 |Gmail 移动电子邮件:服务器 | 客户端 | 技术前沿 邮件网络安全: 软件漏洞 | 安全知识 | 病毒公告 |防火墙 攻防技术 | 病毒查杀| ISA | 数字签名 邮件营销: Email营销 | 网络营销 | 营销技巧 |营销案例 邮件人才:招聘 | 职场 | 培训 | 指南 | 职场 解决方案: 邮件系统|反垃圾邮件 |安全 |移动电邮 |招标 产品评测: 邮件系统 |反垃圾邮件 |邮箱 |安全 |客户端 |