安装
spamassassin-3.0.6-1.el4.rf.i386.rpm
用它来过滤邮件
先安装如下
DB_File-1.820.tar.gz
Mail-SPF-v2.006.tar.gz
MIME-Base64-3.08.tar.gz
Time-HiRes-1.9719.tar.gz
Sys-Syslog-0.27.tar.gz
全部使用如下:
perl Makefile
make
make test
make install
rpm安装spamassassin
rpm -ivh spamassassin-3.0.6-1.el4.rf.i386.rpm就完成。
配置
#修改起动脚本使spamassassin支持vpopmail
#修改如下一行:
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
配置完成。以上具体解释请看相关文档。
相关阅读: