Tôi đã tìm ra cùng một vấn đề.
Các Bayes cơ sở dữ liệu sẽ được lưu trong thư mục chính của người sử dụng mà chạy SpamAssassin:
bayes_path /path/filename (default: ~/.spamassassin/bayes)
This is the directory and filename for Bayes databases. Several databases will be created, with this as the base directory and filename, with _toks, _seen, etc. appended to the base. The default setting results in files called ~/.spamassassin/bayes_seen, ~/.spamassassin/bayes_toks, etc.
By default, each user has their own in their ~/.spamassassin directory with mode 0700/0600. For system-wide SpamAssassin use, you may want to reduce disk space usage by sharing this across all users. However, Bayes appears to be more effective with individual user databases.
- Và đây là giải pháp phù hợp với tôi:
Theo wiki này: http://wiki.apache.org/spamassassin/SiteWideBayesSetup, tôi thêm vào trong /etc/mail/spamassassin/local.cf hai dòng sau:
bayes_path /var/spamassassin/bayes_db/bayes
bayes_file_mode 0777
và tôi tạo thư mục cần thiết: /var/SpamAssassin/bayes_db/
Xin lưu ý rằng "Bayes" cuối cùng trong đường dẫn là tiền tố cho các tập tin cơ sở dữ liệu (bayes_journal, bayes_seen, vv)
Ok, sau khi tôi restared các SpamAssassin, không có gì xảy ra. Chưa có bài kiểm tra Bayes nào. Hmm ...
Vì vậy, tôi đã sao chép cơ sở dữ liệu đã được tạo ra từ /root/.spamassassin/*-/var/SpamAssassin/bayes_db
Cập nhật: Dường như tôi đã phải thay đổi các quyền đối với các tệp 4 bayes_ * này là 0666.Nếu không, autolearner sẽ không lưu dữ liệu mới. Tôi không đồng ý với sự cho phép 0666, nhưng tôi hy vọng tôi sẽ sớm tìm ra giải pháp khác.
Tôi đã chạy một thử nghiệm khác trong spamc và ... Tôi đã nhận được Bayes !! :)
Kết quả cho SpamAssassin
# spamassassin -t -D spf,dkim < /path/to/spam.eml
Content analysis details: (8.2 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
3.5 BAYES_99 BODY: Bayes spam probability is 99 to 100%
[score: 1.0000]
1.3 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net
[Blocked - see <http://www.spamcop.net/bl.shtml?141.146.5.61>]
1.0 DATE_IN_PAST_12_24 Date: is 12 to 24 hours before Received: date
-0.0 SPF_PASS SPF: sender matches SPF record
1.3 TRACKER_ID BODY: Incorporates a tracking ID number
0.2 BAYES_999 BODY: Bayes spam probability is 99.9 to 100%
[score: 1.0000]
0.0 HTML_MESSAGE BODY: HTML included in message
0.8 RDNS_NONE Delivered to internal network by a host with no rDNS
Kết quả cho spamc:
# spamc -R < /path/to/spam.eml
Content analysis details: (8.2 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
1.3 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net
[Blocked - see <http://www.spamcop.net/bl.shtml?141.146.5.61>]
3.5 BAYES_99 BODY: Bayes spam probability is 99 to 100%
[score: 1.0000]
1.0 DATE_IN_PAST_12_24 Date: is 12 to 24 hours before Received: date
-0.0 SPF_PASS SPF: sender matches SPF record
1.3 TRACKER_ID BODY: Incorporates a tracking ID number
0.2 BAYES_999 BODY: Bayes spam probability is 99.9 to 100%
[score: 1.0000]
0.0 HTML_MESSAGE BODY: HTML included in message
0.8 RDNS_NONE Delivered to internal network by a host with no rDNS
Content analysis details: (8.2 points, 5.0 required)
Tôi đã kiểm tra các tập tin cấu hình và chế độ địa phương không được kích hoạt. Có bất kỳ địa điểm cụ thể (config) tôi nên xem xét? – transilvlad
Chạy "spamd -D" sẽ cho bạn biết chính xác những gì đang xảy ra trong khi bạn xử lý thư bằng spamc. So sánh điều đó với những gì "spamassassin -D" đang nói cho bạn (hãy thử tìm kiếm bất kỳ điều gì liên quan đến bay). – krisku
Điều này có giúp ích cho bạn không? http://www.goldfisch.at/knowledge/268 – krisku