[Spambayes-checkins] spambayes imapfilter.py,1.44,1.45

Tony Meyer anadelonbrin at users.sourceforge.net
Sat Jun 21 19:29:13 EDT 2003


Update of /cvsroot/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv25637

Modified Files:
	imapfilter.py 
Log Message:
imap4rev1 does not include RFC822.PEEK as a fetch option.
The correct response to this is 'bad', but we are currently
checking for 'no' (which is what Courier gives).

Change to allow for this behaviour (still falling back on RFC822).

Index: imapfilter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/imapfilter.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** imapfilter.py	12 Jun 2003 07:25:03 -0000	1.44
--- imapfilter.py	22 Jun 2003 01:29:11 -0000	1.45
***************
*** 110,113 ****
--- 110,114 ----
  
  from imaplib import Debug
+ from imaplib import error
  from imaplib import Time2Internaldate
  try:
***************
*** 320,324 ****
          # the status of the message.  Unfortunately, it appears that not
          # all IMAP servers support this, even though it is in RFC1730
!         response = imap.uid("FETCH", self.uid, self.rfc822_command)
          if response[0] != "OK":
              self.rfc822_command = "RFC822"
--- 321,329 ----
          # the status of the message.  Unfortunately, it appears that not
          # all IMAP servers support this, even though it is in RFC1730
!         try:
!             response = imap.uid("FETCH", self.uid, self.rfc822_command)
!         except error:
!             self.rfc822_command = "RFC822"
!             response = imap.uid("FETCH", self.uid, self.rfc822_command)
          if response[0] != "OK":
              self.rfc822_command = "RFC822"





More information about the Spambayes-checkins mailing list