Need help with -Ns retraining while loop

Tom Anderson tanderso at oac-design.com
Wed Feb 25 15:37:16 CET 2004


Eric,

My program bfproxy does basically what you require. Eg:

subject: Two Complimentary Airline Tickets:  See ...
original spamicity: 0.500000
user classification: spam
command: bogofilter -s
words: 743
new spamicity: 0.504973
new spamicity: 0.508691
new spamicity: 0.513176
new spamicity: 0.518512
new spamicity: 0.524677
new spamicity: 0.531619
new spamicity: 0.539267
new spamicity: 0.547545
new spamicity: 0.556373

It can repeatedly train an email until the spamicity reaches your
cutoff.  However, instead of the paradigm of dragging spams to an IMAP
folder, you forward your spams to bfproxy.

http://www.orderamidchaos.com/bogofilter/bfproxy

Tom


On Wed, 2004-02-25 at 09:25, Eric Wood wrote:
> Right now I have a cron job which basically runs the same command three
> times:
> 
> /usr/bin/bogofilter -Ns < $spamfile
> /usr/bin/bogofilter -Ns < $spamfile
> /usr/bin/bogofilter -Ns < $spamfile
> echo -n > $spamfile
> 
> It's just my way of guess-timating that a couple other people got the same
> spam message and I want the make sure the scores get changes by a few points
> at a time.
> 
> Now, I rather have bogofilter tell me the return code and only to
> another -Ns for precise adjustments.  I'm not that great at shell script so,
> can someone help me out?  This is what I what to do:
> 
> I've dragged one or more spam emails into $spamfile imap folder.  Cron calls
> shell script every 5 minutes which does:
> 1. Create cron lock file - so cron done run this on top itself.
> 2. Split $spamfile into individual spam files; X=1; erase $spamfile
> 2. bogofilter < $spamfileX
> 3. Check exit code, if <>0 then /usr/bin/bogofilter -Ns < $spamfileX; goto
> step 2.
> 4. erase $spamfileX, increment X; goto step 2
> 7. Erase lock.
> 
> This way I'm not training some arbitrary number of times.
> 
> Thanks,
> -Eric Wood
> 
> 
> ---------------------------------------------------------------------
> FAQ: http://bogofilter.sourceforge.net/bogofilter-faq.html
> To unsubscribe, e-mail: bogofilter-unsubscribe at aotto.com
> For summary digest subscription: bogofilter-digest-subscribe at aotto.com
> For more commands, e-mail: bogofilter-help at aotto.com
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.bogofilter.org/pipermail/bogofilter/attachments/20040225/40bde6df/attachment.sig>


More information about the Bogofilter mailing list