开源软件中最好的内容过滤程序,做内容过滤的必选。

1、配置Spamassassin

shell

# cp /usr/local/etc/mail/spamassassin/local.cf.sample /usr/local/etc/mail/spamassassin/local.cf

修改local.cf文件:

shell

# vi /usr/local/etc/mail/spamassassin/local.cf

内容如下:

report_safe             1
use_bayes               0

使用Chinese_rules.cf fetch得到这个规则后可以看到,他从2006年10月2日以来,都没有再更新过了,因此是否仍然使用该规则取决于您自己。 -rw-r–r– 1 root wheel 55342 Oct 2 2006 Chinese_rules.cf

shell

# wget http://www.ccert.edu.cn/spam/sa/Chinese_rules.cf -P /usr/local/share/spamassassin/

测试杀毒/内容过滤 测试杀毒。在做该测试之前,你需要确保你的clamd,amavisd,postfix都正常启动。可以通过如下脚本来启动他们。

shell

# sa-update
# /usr/local/etc/rc.d/clamav-clamd restart
# /usr/local/etc/rc.d/amavisd restart
# /usr/local/etc/rc.d/postfix restart

2、测试Clamav

shell

# telnet localhost 25

其过程如下:

Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mail.extmail.org ESMTP Postfix
helo mail.extmail.org     << 输入内容
250 mail.extmail.org
mail from:<postmaster@extmail.org>     << 输入内容
250 2.1.0 Ok
rcpt to:<test@extmail.org>     << 输入内容
250 2.1.5 Ok
data     << 输入内容
354 End data with .
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*     << 输入内容
.        << 输入内容
250 2.0.0 Ok: queued as BC24E85260
quit     << 输入内容
221 2.0.0 Bye
Connection closed by foreign host.

maillog中出现类似如下日志则说明clamav和amavid-new正常工作

Feb 16 17:26:30 mail amavis[1498]: (01498-01) Blocked INFECTED (Eicar-Test-Signature), MYNETS LOCAL [127.0.0.1] [127.0.0.1]
<postmaster@extmail.org> -> <test@extmail.org>, quarantine: virus-iyqHp+MsEJkS, Message-ID: <20110216092625.A6B1E52@mail.extmail.org>,
mail_id: iyqHp+MsEJkS, Hits: -, size: 406, 1532 ms
 
十四、配置spamassassin.txt · 最后更改: 2012/11/01 22:37 由 shaobo
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki