对邮件 Anti Spamming 系统的加强

SpamAssassin
Image via Wikipedia

最近收到的垃圾邮件还是比较多,检查了一下系统设置,做了这些修改。

  • 增大扫描的邮件尺寸到 1MB,修改 /etc/procmailrc 文件

:0 fw
* < 1024000
| /usr/bin/spamc -u mail

  • 添加 DCC 检查

修改 iptable 设置(/etc/sysconfig/iptables):

-A <rule-name> -p udp -m udp –dport 1024:65535 –sport 6277 -j ACCEPT

检测到的邮件头会包含这样的信息:

	*  2.2 DCC_CHECK Listed in DCC (http://rhyolite.com/anti-spam/dcc/)

   加上原先的 SpamCop 的检查,希望自己的邮箱和 gmail 的一样干净!

另外, spamassassin 的自动学习默认是打开的,如果想手工学习的话,可以用如下命令:
# sa-learn -u username --progress --spam --mbox spammailboxfile

对于 RBL  网站的效果评价,有专门的网站定期更新。因此在 sendmail.mc 文件添加规则:

FEATURE(`dnsbl’, `zen.spamhaus.org’, `”550 Mail from ” $`’&{client_addr} ” refused – see http://www.spamhaus.org/”‘)
FEATURE(`enhdnsbl’, `bl.spamcop.net’, `”Spam blocked see: http://spamcop.net/bl.shtml?”$&{client_addr}’, `t’)dnl
FEATURE(`dnsbl’, `dul.dnsbl.sorbs.net’, `”550 Mail from ” $`’&{client_addr} ” refused – see http://www.dul.dnsbl.sorbs.net/”‘)

然后用 make -C /etc/mail 编译生成 sendmail.cf 。

Reblog this post [with Zemanta]

Post to Twitter

相关文章

You can leave a response, or trackback from your own site.

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word