[Spambayes] sb_imapfilter.py not adding headers / moving messages
Joe Catina
warehauz at hotmail.com
Sun Apr 25 02:51:03 EDT 2004
>This is strange. Nothing's going wrong in the IMAP conversation, so the
>probably is either in the configuration or in imapfilter itself. It seems
>that it's choosing to write the filtered message to the INBOX folder,
>although that doesn't explain why there isn't a classification/score
>header.
>There isn't a "X-SpamBayes-Exception" header, is there?
No, there are no headers other than the X-SpamBayes-Mailid in any of the
messages.
>The code that handles this is around line 700 of sb_imapfilter.py. Could
>you add in a line that says "print cls, spamfolder.name" after the line
>that
>says "cls = msg.GetClassification()" and see what gets printed out?
Just tested that and it's looking fine .. the output was "spam INBOX.SPAM" -
so it was classified as spam properly, and then was supposed to be moved to
the spam folder specified in the configuration. But alas, it remains in the
inbox, and still is suspiciously missing the classification & score headers.
>Imapfilter doesn't use the include_trained header. IIRC, only mboxtrain
>does. It isn't needed, because imapfilter tracks the messages in the
>message info database.
Good to know! I was mainly just trying to turn on a bunch of header options
since the classification & score weren't showing up, just to test and see if
I could get any headers written.
>I hadn't noticed this :) It's a bug - basically, all spambayes headers are
>removed from the message prior to training (to avoid contamination), and
>then the messages gets moved/saved after that, so the headers are gone.
>I've checked in a fix for this, though it shouldn't really make much
>difference to anything.
Gotcha - again, I've just been staring at these headers hoping something
would show up, so that's how I caught this one. I agree that it's a
relatively moot point though, since the message is already trained & dealt
with.
So I'm still at a loss. Actually, the only thing I can think of is that
I've set the spam_folder to the same folder as the spam_train_folders -
could this be a conflict? I have a 'SPAM' folder that I want any messages
classified as spam moved to, and I'm also using this to train by manually
moving messages there. On another machine with the Outlook plugin (which
works GREAT btw), there's no problem with this setup, so I didn't think it'd
be an issue - but perhaps the IMAP setup is different. I'm grasping at
straws here ...
The counts are accurate, so the code logic branching is working fine, and
the debug output we just tested looked fine too - so it looks like something
is failing either during the msg.MoveTo() or msg.Save() calls? It's odd
because those same calls are working fine during the training process...
Unfortunately I don't know anything about the IMAP protocol ... but looking
through the output I saw this:
09:01.29 > DMNB21 APPEND INBOX.SPAM (\Seen \Deleted)
This looks like where it might be trying to put the message in the proper
directory after classification - but it looks like it might be setting the
deleted flag? Is it simply deleting the wrong message (the new copy, not
the original)?
Anyway, thanks much for the help, and to everyone involved with SpamBayes --
it truly is wonderful, which is why it's so frustrating that I can't get it
working for this setup.
_________________________________________________________________
Stop worrying about overloading your inbox - get MSN Hotmail Extra Storage!
http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1/go/onm00200362ave/direct/01/
More information about the Spambayes
mailing list