[Spambayes] IMAPFilter training issues (WAS imapfilter manglingheaders!)

Meyer, Tony T.A.Meyer at massey.ac.nz
Wed Apr 23 11:15:41 EDT 2003

> UPDATE:  Just done some more debugging, and the regex match 
> seems to be failing in IMAPFolder.keys(). My server returns responses 
> like 83 (FLAGS (\Seen) UID 131)
> whereas the regex is looking for
> r"[0-9]+ \(UID ([0-9]+) FLAGS \(([\\\w]*)\)\)"
> which seems to have things in a different order.

Ah, regex's - the bane of my life ;).  This is (relatively easily fixed,
and I'll do this if Tim hasn't already.  I do get the feeling that I
need to get out a book on regex and study hard ;)

> I'm getting a growing feeling that my ISPs mailserver is very badly 
> behaved indeed!

Well, personally, I blame the RFC.  It's too generic in places - like
allowing any character in a folder name, instead of sensibly setting
aside one for a delimiter and so on.  Things like not specifying which
order the results should be returned in.

The imaplib could do a better job of this as well; I might drop in a
feature request (if it did improve a great deal, we could always bundle
a copy like with Sets and ConfigParser).

=Tony Meyer

More information about the Spambayes mailing list