Hello!

Em Ter 15 Abr 2003 19:10, Daniel Carrera escreveu:
| On Wed, Apr 16, 2003 at 07:00:20AM +0900, Pablo Lorenzzoni wrote:
| > Hello!
| >
| > http://bogofilter.sourceforge.net/
| >
| > It's a bayesian spam filter. I've already filtered over-60.000 emails
| > with it and, so far, I've got 94% of them right. If you'd like, I can
| > share my SPAM database for bogofilter.
|
| Looks interesting.
| The website says that it takes an input from stdin and returns 1 or 0
| depending on whether it's spam or not.

That's true.

| How do I actually use it?  Do I need to write a sepparate program to
| output the mails based on the return value of bogofilter?

Nope. Use procmail. That's my procmail recipe to use bogofilter:

---<$HOME/.procmailrc>---
spectra@zeus:~$ cat .procmailrc
MAILDIR=/var/spool/mail 
DEFAULT=$MAILDIR/spectra
SPAMFILE=$MAILDIR/spam

### Bogofilter
:0HB:
* ? bogofilter -u
$SPAMFILE
---<EOF>----

As simple as that. You see I've used the procmail token "?", which will honor 
bogofilter's return value.

I use it with the option "u", which means "classify it already and add it to 
the appropriate database". If it's not sent it to $SPAMFILE, it's sent to 
$DEFAULT.

I check the $MAILDIR/spam often to confirm they're really spam.

False-positives (bogofilter say it's spam when it's not) and false-negatives 
(bogofilter say it's not spam when it is) are corrected with

bash$ cat false-positive-spam | bogofilter -Sn
bash$ cat false-negative-spam | bogofilter -Ns

| Thanks for the help,

You're welcome. Don't forget to train bogofilter before using it (unless 
you're happy with reclassifying all your mail for the next 2 weeks). I can 
send you my databases, if you'd like, but be ready:

spectra@zeus:~$ ls -lh .bogofilter
total 35M
-rw-rw-r--    1 spectra  spectra       16M 2003-04-15 19:21 goodlist.db
-rw-rw-r--    1 spectra  spectra       18M 2003-04-15 19:21 spamlist.db
spectra@zeus:~

[]s

Pablo

-- 
Pablo Lorenzzoni (Spectra) <spectra / debian.org>
GnuPG Key ID 268A084D at search.keyserver.net
Webpage: http://people.debian.org/~spectra/