[Spambayes-checkins] spambayes/scripts sb_imapfilter.py,1.23,1.24

Tony Meyer anadelonbrin at users.sourceforge.net
Wed Feb 4 20:31:58 EST 2004


Update of /cvsroot/spambayes/spambayes/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23730/scripts

Modified Files:
	sb_imapfilter.py 
Log Message:
imapfilter has been adding two mailid headers, so stop that.

Fixing the 'multiple ids' bug broke the fix for the 'no ids' bug, so fix it so that both work.

Index: sb_imapfilter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/scripts/sb_imapfilter.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** sb_imapfilter.py	5 Feb 2004 01:16:01 -0000	1.23
--- sb_imapfilter.py	5 Feb 2004 01:31:55 -0000	1.24
***************
*** 473,482 ****
                                  "(\\Deleted \\Seen)")
              self._check(response, 'store')
!         new_id = multiple_ids[-1]
!         
!         # Let's hope it doesn't, but, just in case, if the search
!         # turns up empty, we make the assumption that the new
!         # message is the last one with a recent flag
!         if new_id == "":
              response = imap.uid("SEARCH", "RECENT")
              new_id = response[1][0]
--- 473,482 ----
                                  "(\\Deleted \\Seen)")
              self._check(response, 'store')
!         if multiple_ids:
!             new_id = multiple_ids[-1]
!         else:
!             # Let's hope it doesn't, but, just in case, if the search
!             # turns up empty, we make the assumption that the new
!             # message is the last one with a recent flag
              response = imap.uid("SEARCH", "RECENT")
              new_id = response[1][0]
***************
*** 634,637 ****
--- 634,638 ----
                                                      evidence=True)
                  # add headers and remember classification
+                 msg.delSBHeaders()
                  msg.addSBHeaders(prob, clues)
  




More information about the Spambayes-checkins mailing list