[spambayes-bugs] [ spambayes-Patches-801699 ] migration from hammie to sb_* scripts

SourceForge.net noreply at sourceforge.net
Thu Mar 25 03:07:54 EST 2004


Patches item #801699, was opened at 2003-09-06 17:33
Message generated for change (Comment added) made by htrd
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498105&aid=801699&group_id=61702

Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Toby Dickenson (htrd)
Assigned to: Nobody/Anonymous (nobody)
Summary: migration from hammie to sb_* scripts

Initial Comment:
Ive been updating my training scripts (for kmail integration) to 
use the new sb_* scripts. I needed a couple of changes to 
sb_mboxtrain.py to make it a full replacement for how I was 
previously using hammie.py: 
 
1. sb_mboxtrain.py writes a X-Spambayes-Trained header. I am 
currently not using this, I always perform a full retrain. 
Unfortunately rewriting files in maildir folders interferes with 
kmail's cache of message status, with the result that recently 
read messages are marked unread again. 
 
This is certainly a kmail bug, but a workaround in spambayes 
seems reasonable. I added a switch to sb_mboxtrain to inhibit 
rewriting mailboxes with the X-Spambayes-Trained headers. 
 
2. I run my retrain script from cron. sb_mboxtrain displays the 
name or number of the mail message as it processes them, 
which makes for an inappropriately large cron output. The -q 
switch is a little too quiet - I would still like to see the count of 
messages trained in each mailbox at the end of training. 
 
I changed sb_mboxtrain to inhibit this status update if not 
isatty(stdout) 
 
One patch attached including both changes. 

----------------------------------------------------------------------

>Comment By: Toby Dickenson (htrd)
Date: 2004-03-25 08:07

Message:
Logged In: YES 
user_id=46460

The fix for #1 is good. 
I withdraw my suggestion for #2... redirecting to /dev/null is just 
as good. 

----------------------------------------------------------------------

Comment By: Tony Meyer (anadelonbrin)
Date: 2003-09-09 08:08

Message:
Logged In: YES 
user_id=552329

I've checked in a version for #1.  Instead of making it a 
switch I made it an option ("Headers":"include_trained"), as 
this is more consistent with the other headers.

I don't know enough about how mboxtrain is used to put the 
second one in.  Skip or someone like that should make that 
call.

BTW, all the old hammie.py script did was call the 
spambayes/hammiebulk.py script.  That's still there, so you 
could call it directly.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498105&aid=801699&group_id=61702



More information about the Spambayes-bugs mailing list