构建反病毒反垃圾邮件系统(五)
来源:云南设计港 时间:2007-09-30 10:53:00
二、防病毒系统
1、安装McAfeeuvscanforlinux
McAfeeuvscanforlinux虽然是试用,但是没有什么限制,可以升级,也没有过期。
#wgethttp://www.XXXX.com/products/evaluation/virusscan/english/
cmdline/linux/version_4.24/intel/vlnx424e.tar.Z
#tarxzfvlnx424e.tar.Z
#./install-uvscan
默认会装到/usr/local/uvscan目录下,不过uvscan需要libstdc++.so.2.8,直接运行出现如下错误:
#uvscan
uvscan:errorwhileloadingsharedlibraries:libstdc++.so.2.8:
cannotopensharedobjectfile:Nosuchfileordirectory
可以从如下地址获得libstdc++.so.2.8的安装包:
#wgethttp://debian.marlow.dk/dists/woody/virus/pool/
lib/libstdc++2.8_2.90.29-2.deb
#dpkg-ilibstdc++2.8_2.90.29-2.deb
这样uvscan就可以正常运行了,不过会提示病毒库比较老了云云。写个病毒库更新脚本扔到crontab跑去吧:
#!/bin/sh
#
#update-dat.sh
#
cd/usr/local/uvscan/
wget-q-Oreadme.txthttp://http://www.XXXX.com/products/datfiles/
4.x/nai/readme.txt>/dev/null
AVVER=`head-5readme.txt|grep'4[0-9][0-9][0-9]'|head-1|
sed-e's/^.*\(4[0-9]*\).*$/\1/'`
if[!-fdat-$AVVER.tar];then
foriin*.tar;do
mv$i$i.old
done
ifwgethttp://http://www.XXXX.com/products/datfiles/4.x/nai/
dat-$AVVER.tar>/dev/null;then
foriin*.dat;do
cp-p$i$i.bak
done
iftarxfdat-$AVVER.tar;then
rm-f*.old
echo`date`SuccessfullyupdatedAntiVirusDATfilesto$AVVER
fi
fi
fi
2、AMaViS的安装
AMaViS是uvscan和postfix之间的一个桥梁,完成邮件解码,交给uvscan查毒,然后再处理,转发操作。
安装amavisd前先确定以下软件已经安装,lha、unarj等使用的no-free的分支版本:
#apt-getinstalllibio-stringy-perlmailtoolslibmime-perllibmailtools-perllibmime-base64-perl\
libcompress-zlib-perllibconvert-uulib-perllibconvert-tnef-perltneflibarchive-tar-perl\
libarchive-zip-perllibtime-hires-perllibunix-syslog-perllibdigest-md5-perllhaunarjunzip\
gzipunrarzoo
stable版本的amavisd比较老,使用如下链接:
#wgethttp://www.XXXX..dk/dists/woody/custom/pool/compress/arc_5.21e-5_i386.deb
#wgethttp://www.XXXX..dk/dists/woody/virus/pool/wrapper/amavisd-new_20030314p1-2_all.deb
#wgethttp://www.XXXX..dk/dists/woody/virus/pool/lib/libnet-perl_1.12-1_all.deb
#wgethttp://www.XXXX..dk/dists/woody/virus/pool/lib/libnet-server-perl_0.84-3_all.deb
先安装CPAN:
#perl-MCPAN-eshell
cpan>installCPAN
cpan>installLWP
cpan>installArchive::Tar
cpan>installArchive::Zip
cpan>installCompress::Zlib
cpan>installConvert::TNEF
cpan>installConvert::UUlib
cpan>installMIME::Base64
cpan>installMIME::Parser
cpan>installMail::Internet
cpan>installNet::Server
cpan>installNet::SMTP
cpan>installDigest::MD5
cpan>installIO::Stringy
cpan>installTime::HiRes
cpan>installUnix::Syslog