- 论坛徽章:
- 0
|
我用QMAIL+MAILDROP+spamassassin建了一台邮件服务器,其/etc/mail/spamassassin/local.cf文件内容为:
required_hits 6
required_score 6.0
rewrite_header Subject *****这可能是垃圾邮件*****
report_safe 1
use_terse_report 0
use_bayes 1
auto_learn 1
skip_rbl_checks 0
use_razor2 1
use_dcc 1
use_pyzor 1
ok_languages zh en
ok_locales en ko
score HEADER_8BITS 0
score HTML_COMMENT_8BITS 0
score SUBJ_FULL_OF_8BITS 0
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
#blacklist_from *@domain.com
# ---------------------------------------------------------------------------
# 使用中国反垃圾邮件联盟的CBL/CDL
# URL: http://www.anti-spam.org.cn/
#SCORE
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
在domains/bee.com下建立了.mailfilter可执行文件,内容为:
VPOP="| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox"
VHOME=`/home/vpopmail/bin/vuserinfo -d $EXT@bee.com`
VDEL="| /home/vpopmail/bin/vdelivermail '' delete"
if ( $SIZE < 862144 )
{
exception {
xfilter "/usr/bin/spamc -f -u $EXT@bee.com"
}
}
if (/^X-Spam-Flag: YES/)
{
# try filtering it using user-defined rules
exception {
include /home/vpopmail/domains/bee.com/.mailfilter
}
# then try delivering it to a Spam folder
exception {
to "$VDEL"
#to "$VHOME/Maildir/.Spam/"
}
# ah well, I guess they'll just have to live with disappointment
exception {
to "$VPOP"
}
}
else
{
exception {
include /home/vpopmail/domains/bee.com/.mailfilter
}
exception {
to "$VPOP"
}
}
domains/bee.com下的.qmail-default内容改为:
| /usr/local/bin/maildrop ./.mailfilter
#| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox
按以上设定,应该是对于垃圾邮件的值大于6point时,应该予以扔掉,但我的服务器对于大于6point时并没有扔掉,还是可以收到邮件主题上加了”这是垃圾邮件“标记的垃圾邮件。我的设定还有不对的地方吗?请各位能给予指正一下,谢谢大家了。 |
|