[Spambayes] updating x-spambayes-classification on already trained mail?

Alex Chiang alex at chizang.net
Thu Apr 19 22:17:55 CEST 2007


* skip at pobox.com <skip at pobox.com>:
> 
>     Alex> For my test, I reran sb_filter.py on each message (maildir
>     Alex> format, but not sure it matters) and discovered the following:
> 
>     Alex>   a) sb_filter.py doesn't seem to change the header if it already
>     Alex>   exists in the message
> 
> Hmmm...  works for me.  spam.multi is an mbox message dating from Oct
> 2006 that already has classification and evidence headers:

D'oh, pilot error. You're right -- sb_filter.py will rescore and
change the header, even if it already exists.

My misunderstanding was in how sb_filter interacts with procmail.
As the -h option says:

  Output is always to standard output as a Unix-style mailbox.

Duh -- I'd assumed that it actually rewrote the file. 

Looks like I simply need to modify my script to rewrite the file
with the output from sb_filter.

Thanks!

/ac



More information about the SpamBayes mailing list