Send simple text (not email) to SpamAssassin

泪湿孤枕 提交于 2020-01-05 08:37:14

问题


I was wondering if I can send simple text to SpamAssassin. I want to put the comment in a text file and call 'spamc < file.txt' (i don't know if it is possible to send text direct to spamc). The problem is that SpamAssassin will report everything as spam if i don't specify headers or title ... Can i bypass all headers verification - or there is any mode where i can scan simple plain text ? (i don't have experience so I prefer to ask this. Thanks in advance)


回答1:


I believe you can disable any SA rules that refer to the headers, but it would probably still break due the "message" being malformed. And even if it did not, SA scoring relies way too much on the headers for it to be efficient without checking them. If you want to do spam checking on arbitrary text, perhaps a statistical tool like Bogofilter would be more suitable.

EDIT:

From the Bogofilter manpage:

Bogofilter is a Bayesian spam filter. In its normal mode of operation, it takes an email message or other text on standard input, does a statistical check against lists of "good" and "bad" words, and returns a status code indicating whether or not the message is spam.

It will happily sort arbitrary text without complaining if it is not formatted as mail.



来源:https://stackoverflow.com/questions/4199860/send-simple-text-not-email-to-spamassassin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!