[spambayes-dev] Support for X-Spambayes-Trained headers insb_imapfilter

Tony Meyer tameyer at ihug.co.nz
Thu Dec 9 00:17:00 CET 2004


> I use sb_filter from procmail to filter and autotrain 
> incoming messages which end up on a cyrus imap server. 
> I then use sb_imapfilter for retraining mistakes.  The
> problem here is that sb_filter uses the
> X-Spambayes-Trained header to indicate how a message was 
> trained, whereas sb_imapfilter only looks at the
> messageinfo db.  I've modified sb_imapfilter to use the
> X-Spambayes-Trained header to determine if
> untraining is required, and update it accordingly.
> 
> Is there interest in these changes?  If so, I can clean it up for
> submission, adding an option to choose between the two 
> methods of tracking message training.

I would (personally) have preferred an optional change that let sb_filter
add appropriate entries to the messageinfo database, but yes I think we'd be
interested.  Please make sure that the diff is a context diff against
current CVS (1.1's sb_imapfilter is very different to 1.0.x's).

It's up to you how you submit the patch, but I would like it to work like
this:

  * Don't add yet another option (there are so many already!)

  * Have it fall back to looking for the X-Spambayes-Trained header if it
can't find an entry in the messageinfo db.

  * Don't add the header (avoiding rewriting the messages is nice with
IMAP), just update the messageinfo db.  This should work as long as nothing
else is needed access to that header (sb_filter doesn't ever read it,
right?)

This would appear in 1.1, most probably.

=Tony.Meyer



More information about the spambayes-dev mailing list