Several people recommended "formail -s spamassassin -r < mbox_full_of_spam". Thanks. While this works I don't like that it does not provide status from its invocation of sa-learn such as 'Learned from 10 message(s) 13 message(s) examined)'. I ended up calling sa-learn --mbox first, then the above formail. This duplicates the sa-learning but at least I get a feedback that I can mail back to the user as a confirmation.
As a side note, formail didn't work unless I converted the mbox file from DOS to UNIX (CR/LF vs CR). [tr -d '\r'] So I guess my original question turns into a request, can spamassassin be changed so that '-r' option accepts an mbox file and it iterates over the messages to submit them. Or could sa-learn be changed so that it becomes the top level program for spam reporting and if given the correct options it would perform the bayesian learning as well as additonal reporting. On Mon, 10 Nov 2003 16:18:28 -0500, Ken Bass <[EMAIL PROTECTED]> wrote: > My question is how to report a *mailbox* of spam to razor2. I just added >razor2 to my configuration and wanted to contribute. > > I currently receive spam into my mail reader (Forte Agent) and they get >moved to a SPAM folder based on the header tags. I periodically visit that >SPAM folder and using 'Save as' I generate an 'mbox' format file with all >the SPAM messages. I then send an email with the 'mbox' format file as an >attachment to a mailalias I have setup on my mailserver. A procmail recipe >is waiting which decodes the attachment (which is base64 encoded) into the >original mbox format. I then call 'sa-learn --mbox --spam' on the input >file, generate a reply 'SPAM training' confirmation message which has the >output output of the 'sa-learn' command. This works well. > > What I would like to do is send these filtered spams to razor2. It would >seem that we need a '-r' reporting option on the sa-learn. The FAQ indicates >that the message should be sent to 'spamassassin -r' which reports and >additionally learns it. However, I'm not dealing with one message, I'm >dealing with an 'mbox format' group of messages. It seems 'sa-learn' already >knows how to handle the 'mbox' format - shouldn't/couldn't it handle the >reporting for 'spam' (not ham). I assume 'spamassassin -r' will only work >for a single message. > > Any suggestion on how to accomplish this? Or could spamassassin add an >'mbox' option to process/iterate over a group of messages that works in >conjunction with the '-r' reporting option? > > >------------------------------------------------------- >This SF.Net email sponsored by: ApacheCon 2003, >16-19 November in Las Vegas. Learn firsthand the latest >developments in Apache, PHP, Perl, XML, Java, MySQL, >WebDAV, and more! http://www.apachecon.com/ >_______________________________________________ >Spamassassin-talk mailing list >[EMAIL PROTECTED] >https://lists.sourceforge.net/lists/listinfo/spamassassin-talk ------------------------------------------------------- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk