如下一行: vi /etc/init.d/spamassassin SPAMDOPTIONS="-d -c -m5 -H -x -u vpopmail -v"
vi /etc/sysconfig/spamassassin SPAMDOPTIONS="-d -c -m5 -H -x -u vpopmail -v" #spamassassin的过滤模板在/etc/mail/spamassassin/local.cf,修改为: vi /etc/mail/spamassassin/local.cf # These values can be overridden by editing ~/.spamassassin/user_prefs.cf # (see spamassassin(1) for details) # These should be safe assumptions and allow for simple visual sifting # without risking lost emails. required_score 7.0 以7.0为分界限,评分超过7.0的就会在邮件标题开头加入 ******SPAM*****字样,已提示为垃圾邮件,不过也有被误认为的时候.建议不要做对垃圾邮件删除. rewrite_header Subject ********SPAM******** report_safe 1 use_bayes 1 auto_learn 1 skip_rbl_checks 0 rewrite_subject 1 report_header 1 use_terse_report 1 defang_mime 1 dns_available yes dcc_add_header 1 #use_pyzor 1 (Only if you have installed pyzor) #use_razor2 (Only if you have installed razor2) use_dcc 1
#ok_languages zh en #ok_locales en ko ok_languages all ok_locales all 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
header RCVD_IN_CASA_CBLLESS eval:check_rbl(''CBLLESS'',''cblless.anti-spam.org.cn.'',''127.0.8.5'') describe RCVD_IN_CASA_CBLLESS Relay has be listed in CASA CBL-, http://anti-spam.org.cn/ tflags RCVD_IN_CASA_CBLLESS net score RCVD_IN_CASA_CBLLESS 4.0 配置完成.以上具体解释请看相关文档.
#使用CCERT 中文垃圾邮件过滤规则集Chinese_rules.cf wget -N -P /usr/share/spamassassin www.ccert.edu.cn/spam/sa/Chinese_rules.cf
#启动SpamAssassin service spamassassin start
#定期自动更新中文反垃圾邮件规则 crontab –e 0 0 1 * * (wget -N -P /usr/share/spamassassin http://www.ccert.edu.cn/spam/sa/Chinese_rules.cf)
#建立SpamAssassin的学习系统 sa-learn --sync -D -p user_prefs
安装邮件队列扫描程序: qmail-scanner-2.06.tgz q-s-2.06st-20090419.patch.gz
安装 rpm -ivh perl-suidperl-5.8.0-55.1.i586.rpm 否则会出现 Error was: Can''t do setuid 创建用户 useradd –g qscand –s /bin/false qscand 解压打补丁 tar zxvf qmail-scanner-2.06.tgz gunzip q-s-2.06st-20090419.patch.gz patch -p0 < q-s-2.06st-20090419.patch 打补丁
安装: ./configure --qmail-queue-bi |