[Spambayes-checkins] spambayes/scripts sb_imapfilter.py,1.39,1.40
Sjoerd Mullender
sjoerd at users.sourceforge.net
Fri Oct 1 22:30:55 CEST 2004
Update of /cvsroot/spambayes/spambayes/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25329
Modified Files:
sb_imapfilter.py
Log Message:
Quote the search string that tries to find the message again that was
just saved. Some spam mails have illegal values (such as space) in
the Message-Id, and this caused a crash in this script.
Index: sb_imapfilter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/scripts/sb_imapfilter.py,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** sb_imapfilter.py 30 Sep 2004 05:16:30 -0000 1.39
--- sb_imapfilter.py 1 Oct 2004 20:30:52 -0000 1.40
***************
*** 559,564 ****
# have to use it for IMAP operations.
self.imap_server.SelectFolder(self.folder.name)
! search_string = "(UNDELETED HEADER %s %s)" % \
! (options["Headers", "mailid_header_name"], self.id)
response = self.imap_server.uid("SEARCH", search_string)
data = self.imap_server.check_response("search " + search_string,
--- 559,565 ----
# have to use it for IMAP operations.
self.imap_server.SelectFolder(self.folder.name)
! search_string = "(UNDELETED HEADER %s \"%s\")" % \
! (options["Headers", "mailid_header_name"],
! self.id.replace('\\',r'\\').replace('"',r'\"'))
response = self.imap_server.uid("SEARCH", search_string)
data = self.imap_server.check_response("search " + search_string,
More information about the Spambayes-checkins
mailing list