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

Nigel Henry <[email protected]>
Newsgroups gmane.mail.bogofilter.general
Message-ID <[email protected]>
On Tuesday 11 September 2007 04:11, David Relson wrote:
> 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

Thanks for that David.

Ironically the Debian folks had resolved the spam problem the same day I 
received your mail.

I will try the script though on an instance of Kmail on another distro, in 
case I mess it up and lose the mail.

I presume I'd just cd to where the mail I want to refilter is. For example.

cd Mail/Debian-English/cur  , and run the script on the "cur" directory

The maidir boxes do contain a single file for each mail.

Thanks for any pointers.

Nigel.

_______________________________________________
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.