[spambayes-dev] Use of email factory function

Tony Meyer tameyer at ihug.co.nz
Fri Aug 6 07:25:17 CEST 2004

> It doesn't work and I wonder how it can work in your 
> environment.

I did say I did limited testing.  The tests didn't raise any of the
(incorrect) BadIMAPResponse exceptions, so they didn't cause problems.  I've
fixed those, thanks.

> Also, since in sb_imapfilter.py imap is no longer a global 
> variable, the call to imap.close() in IMAPSession.SelectFolder()
> causes a NameError exception.  Should that be self.close() instead?

This one I missed because I don't expunge.  It should be
self.imap_server.close(), and I've fixed this, too, thanks.

> When a message can't be parsed in IMAPMessage.get_full_message, 
> message.insert_exception_header is called.  The argument is 
> data["RFC822"], but that key doesn't exist.  It should be 
> self.rfc822_key instead.

This is a bug present in the old version that was simply carried through.
I've fixed this too (and will backport), thanks.

> And then there is a reference to "self" in insert_exception_header, so 
> that causes NameError exception.  I don't know whether it is still 
> necessary to insert a mailid header in the message after your 
> Message-Id changes, but if so, maybe the id should be passed as a
> parameter?

Missed this one because I didn't raise an exception.  Changed to pass the id
as a parameter, thanks.

=Tony Meyer

More information about the spambayes-dev mailing list