[Spambayes] sb_xmlrpcserver.py keeps storage files open
Joerg Beyer
j.beyer at web.de
Sat Mar 18 10:59:39 CET 2006
Tony Meyer wrote:
>> I try to train spambayes from a script. This script detects when I move
>> a mail on my imap account (from the inbox) to other imap folder. If this
>> folder is the spam folder, then I want to train spambayes that mail as
>> spam. If the folder is a usual storage folder (like "family" for mails
>> from the family), then train spambayes this message as ham.
>
>
> Could you not use sb_imapfilter to do this?
I think the differnce is small: if I move a mail from the inbox to
either a hamor spam folder, then the training is implicit: I have to do
no other action, because the (cron job) script detects that a mail was
moved and classified as ham or spam and trains spambayes.
Is that possible with sb_imapfilter?
>
>> My mail filtering procmail pipes the mails through a sb_filter.py
>> process. Do I need to modify the xmlrpc server to write the trainings
>> data back?
>
>
> Add "Hammie.hammie.store()" to the train() code you added. If you want
> it closed, then you'll also need "Hammie.hammie.close()", but then you
> won't be able to do any more training with it.
I have done that and it seems to work. Thanks for the hint.
Joerg
More information about the SpamBayes
mailing list