安装四个下载的软件包:
#dpkg-i*.deb
修改/etc/amavis/amavisd.conf:
@inet_acl=qw(127/81.2.3.4/32);#1.2.3.4isyourexternalip..becausewantmaybealsoacceptmailfromthatin-terface,it'suptoyou. $warnvirussender=1;#Iwanttowarnpeople,whohavegotvirus. $warnvirusrecip=1;#Iwanttowarnmyusersaboutvirussendtothem. $warn_offsite=1;#Iwanttowarnsenders/recipients,thatarenotlocatedonmyserver $mailfrom_notify_admin='virusalert@example.com';# $mailfrom_notify_recip='virusalert@example.com';#Changethesetotheappropriateemail-adresses,youwishtouseassender $mailfrom_notify_spamadmin='spam.police@example.com';#forspamandviruswarnings $hdrfrom_notify_sender='AMaViS(contentfilter)<postmaster@example.com>'; $virus_admin='virus-admin@example.com';# $spam_admin='spam-admin@example.com';# |
指定使用uvscan:
@av_scanners=( ['NAIMcAfeeAntiVirus(uvscan)','uvscan', '--secure-rv--summary--noboot{}',[0],[13], qr/(?x)Found(?: \the\(. )\(?:virus|trojan)| \(?:virus|trojan)\or\variant\([^] )| :\(. )\NOT\a\virus)/], ); |
找到/etc/postfix/master.cf如下行:
smtpinetn-n--smtpd
改为如下:
smtpinetnnn--smtpd-ocontent_filter=smtp-amavis:[127.0.0.1]:10024 smtp-amavisunix--n-2smtp -osmtp_data_done_timeout=1200 -odisable_dns_lookups=yes 127.0.0.1:10025inetn-n--smtpd -olocal_recipient_maps= -osmtpd_restriction_classes= -osmtpd_client_restrictions= -osmtpd_helo_restrictions= -osmtpd_sender_restrictions= -osmtpd_recipient_restrictions=permit_mynetworks,reject -ostrict_rfc821_envelopes=yes |
重启postfix,这样在收到病毒邮件的时候能够在日志文档看到如下的信息:
Jul1615:34:22xxxamavis[30997]:(30997-09)INFECTED(W32/Nimda.gen@MM),(?)-><xxx@xxx.org>,quarantinevirus-20030716-153422-30997-09,Message-ID:<20030716073414.520D3E5C2F@xxx> |
三、防垃圾邮件部分
垃圾邮件的防范必须掌控好尺度,postfix本身提供了header_check、body_check、access、classes等方式来拒绝邮件,能够参考如下地址的样例,结合自己的情况进行修改也能阻止一部分垃圾邮件:
http://www.XXXX.com/guides/postfix_uce_header.html http://www.XXXX.com/guides/postfix_uce_body.html http://www.XXXX.com/guides/postfix_uce_access.html http://www.XXXX.com/guides/postfix_uce_class.html |
但是以上配置文档需要管理员根据自己情况手工进行修改,假如直接采用的话,那么国内很多邮件您将收不到。
SpamAssassin和AMaViS能够很好的结合,他能够帮管理员自动处理一些垃圾邮件。SpamAssassin很有趣,他对解码后的邮件进行扫描后打分,假如分数达到用户指定的分数,那么就认为是垃圾邮件,而且他更有学习功能,管理员也能够自己重新定义各种分值或自定义分值。
1、SpamAssassin的安装
由于已安装了AMaViS,所以自然就选择了SpamAssassin。SpamAssassin能够通过CPAN安装:
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




