问题
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