Re: Running Bogofilter on mailing list stuff prefiltered before Bogofilter is run

David Relson <[email protected]>
Newsgroups gmane.mail.bogofilter.general
Organization Osage Software Systems, Inc.
Message-ID <[email protected]>
On Tue, 11 Sep 2007 00:30:21 +0200
Nigel Henry wrote:

> Sorry for the subject line.
> 
> I have Bogofilter setup on Kmail, and it works fine. I have 6 mailing
> lists that are filtered into individual maildir boxes before
> Bogofilter deals with the remaining stuff.
> 
> Over the last 2 days a lot of sex spam has been turning up in my
> Debian maildir box. The Debian list is high volume, which is why I'm
> filtering it before Bogofilter runs.
> 
> I know this is asking a lot, but is there some way that I can rerun
> Bogofilter again on specific maildir boxes, after it has already
> dealt with the remaining mail that has been downloaded. 
> 
> Sorry I'm not being too clear here.
> 
> I have 6 Kmail filters setup to send mailing list mail to individual 
> mailboxes. Bogofilter runs after this mail has been filtered, and
> works just fine on the remaining mail. Spam goes to the trash, ham
> goes to the inbox, and I get a few unsures.
> 
> I'm probably asking a bit much, but is it possible to run Bogofilter
> again on the mailboxes that were filtered before Bogofilter ran. I'm
> thinking particularly the Debian mailing list one. It's filtered
> before Bogofilter runs, so I end up with a load of sex spam in it,
> which Bogofilter hasn't been able to get it's hands on.
> 
> Any suggestions anyone?
> 
> Nigel.

Assuming a directory with one message per file, you could run a script
something like:

   bogofilter -T -B $DIRECTORY | while read FN TYPE SCORE ; do
      case $TYPE in
          H)
            mv $FN Ham
          ;;
          S)
             mv $FN Spam
          ;;
          U)
             mv $FN Unsure
          ;;
      esac
   done

HTH,

David
_______________________________________________
Bogofilter mailing list
[email protected]
http://www.bogofilter.org/mailman/listinfo/bogofilter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.