[Spambayes] updating x-spambayes-classification on already trained mail?
skip at pobox.com
skip at pobox.com
Thu Apr 19 20:30:11 CEST 2007
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:
% egrep -i x-spam spam.multi
X-Spambayes-Evidence: '*H*': 0.16; '*S*': 0.74; 'content-type:image/jpeg': 0.16;
X-Spambayes-Classification: spam; 0.79
% sb_filter.py < spam.multi | egrep -i x-spam
X-Spambayes-Classification: spam; 0.99
X-Spambayes-Evidence: '*H*': 0.00; '*S*': 0.98; 'received:70.86': 0.16;
Alex> b) using sed to remove X-Spambayes-Classification from the
Alex> messages, and rerunning sb_filter.py doesn't seem to reinsert
Alex> the header with a new score
If you need to fiddle with message headers you'll be much happier using
formail instead of sed.
Skip
More information about the SpamBayes
mailing list