小弟參考 DebianWiki 的說明 把新版的 SpamAssassin 抓回來
裝好後 使用 spamassassin -t < sample-spam.txt 測試
並搭配 procmail 已可以正常檢測過濾 spam mail
但是 目前小弟 想設定特定的網域不進行 spam 過濾
經用預設的作法 在 /etc/mail/spamassassin/local.cf 中加入
whitelist_from *@example.net
header LOCAL_RCVD Received =~ /.*\(\S+\.example\.net\s+\[.*\]\)/
describe LOCAL_RCVD Received from local machine
score LOCAL_RCVD -50
(因為 附帶的 sample-spam.txt 寄件者的 domain 為example.net 所以以它為例作設定測試)
測試過後發現還是會被歸類為 spam mail
以下為測試訊息
煩請有經驗的大大幫忙指點迷津 感謝
X-Spam-Flag: YES
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on cheung.sarge.idv.tw
X-Spam-Level: **************************************************
X-Spam-Status: Yes, score=900.0 required=8.0 tests=GTUBE,NO_RECEIVED,
NO_RELAYS,USER_IN_WHITELIST autolearn=no version=3.1.7
X-Spam-Report:
* -100 USER_IN_WHITELIST From: address is in the user's white-list
* -0.0 NO_RELAYS Informational: message was not relayed via SMTP
* 1000 GTUBE BODY: Generic Test for Unsolicited Bulk Email
* -0.0 NO_RECEIVED Informational: message has no Received headers
Subject: *****SPAM***** Test spam mail (GTUBE)
Message-ID: <GTUBE1.1010101@example.net>
Date: Wed, 23 Jul 2003 23:30:00 +0200
From: Sender <sender@example.net>
To: Recipient <recipient@example.net>
Precedence: junk
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Spam-Prev-Subject: Test spam mail (GTUBE)