sendmail的垃圾邮件处理

1.安装procmail和spamassassin
查看是否安装procmail和spamassassin
[root@mail etc]# rpm -qa | grep procmail
procmail-3.22-17.1
[root@mail etc]# rpm -qa | grep spamassassin
spamassassin-3.1.9-1.el5
[root@mail etc]#
2.配置procmail
由于RHEL5默认没有生成procmailrc文件,需要手动新建
#mkdir procmail
#vi procmail
GABSTRACT=all
LOGFILE=/var/spool/mail/procmail.log ##log目录
VERBOSE=off
 
# Send all mail through Spamassassin
 
:0 fw
* < 256000
| /usr/bin/spamc -u mail
 
:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*
/var/mail/user1  ##将系统认为是垃圾邮件的邮件发给user1(防止误删除)
3.配置spamassassin
修改/etc/mail/spamassassin/local.cf

required_hits 10
report_safe 0
rewrite_header Subject [SPAM] ##垃圾邮件主题打上“SPAM”标记
blacklist_from *@163.com   ##阻止邮件清单

你可能感兴趣的:(职场,sendmail,休闲)