您查看的文章来源于http://www.oklinux.cn
rewrite_header Subject ********SPAM********
report_safe 1
use_bayes 1
skip_rbl_checks 0
ok_languages zh en
ok_locales en ko
score HEAD_ILLEGAL_CHARS 0
score SUBJ_ILLEGAL_CHARS 0
score DATE_IN_PAST_03_06 0
score UPPERCASE_25_50 0
score UPPERCASE_50_75 0
score UPPERCASE_75_100 0
score X_MSMAIL_PRIORITY_HIGH 0
score X_PRIORITY_HIGH 0
score TO_TXT 100
score RATWARE_HASH_2 100
score RATWARE_HASH_2_V2 100
score BAYES_99 0.1
score BAYES_80 0.1
score BAYES_60 0.1
score FROM_ILLEGAL_CHARS 0.1
score MIME_BASE64_TEXT 0.1
score NO_RDNS_DOTCOM_HELO 0.1
score CHINA_HEADER 0.1
score NO_REAL_NAME 0.2
score HTML_MESSAGE 0.2
score MIME_HTML_ONLY 0.2
score MIME_HTML_ONLY_MULTI 0.2
score FORGED_MUA_OUTLOOK 0.2
score FORGED_HOTMAIL_RCVD 0.2
score FORGED_OUTLOOK_TAGS 0.2
score MAILTO_TO_SPAM_ADDR 0.2
#黑白名单
whitelist_from *@domain.com
# ---------------------------------------------------------------------------
# 使用中国反垃圾邮件联盟的CBL/CDL
# URL: http://www.anti-spam.org.cn/
header RCVD_IN_CBL eval:check_rbl('cbl', 'cbl.anti-spam.org.cn.')
describe RCVD_IN_CBL Received via a relay in cbl.anti-spam.org.cn
tflags RCVD_IN_CBL net
header RCVD_IN_CDL eval:check_rbl('cdl-notfirsthop', 'cdl.anti-spam.org.cn.')
describe RCVD_IN_CDL CDL: dialup sender did non-local SMTP
tflags RCVD_IN_CDL net
#SCORE
score RCVD_IN_CBL 4.0
score RCVD_IN_CDL 3.0
--------------------------------------
#运行ntsysv,将spamassassin设定的为开机运行
#使用CCERT 中文垃圾邮件过滤规则集Chinese_rules.cf
wget -N -P /usr/share/spamassassin www.ccert.edu.cn/spam/sa/Chinese_rules.cf
#添加SpamAssasin服务启动必须的用户
useradd spamd
#启动SpamAssassin
service spamassassin start
#定期自动更新中文反垃圾邮件规则
crontab –e
#加入
0 0 1 * * wget -N -P /usr/share/spamassassin www.ccert.edu.cn/spam/sa/Chinese_rules.cf;/etc/init.d/spamassassin restart;/etc/init.d/spamassassin restart;
#建立SpamAssassin的学习系统
sa-learn --sync -D -p user_prefs
#查看自学习的数据信息
sa-learn --dump all
#查看调试信息
spamassassin --lint –D
#进行一个spam和non-spam的测试
spamassassin -t < sample-spam.txt > spamtest.txt
less spamtest.txt
spamassassin -t < sample-nonspam.txt > nospamtest.txt
less nospamtest.txt
#spamtest.txt文件在主题一段中将包含"*****SPAM*****" 这一行, 而nospamtest.txt文件中则没有.
OK了,到次qmail的主要模块都装上了,要实测正常收发,请注意将你正式域名的MX记录指向过来。