[Spambayes-checkins] spambayes/scripts sb_imapfilter.py,1.37,1.38
Sjoerd Mullender
sjoerd at users.sourceforge.net
Thu Aug 19 15:11:48 CEST 2004
Update of /cvsroot/spambayes/spambayes/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31678/scripts
Modified Files:
sb_imapfilter.py
Log Message:
Fix the regular expression to match the Message-ID header by stopping
on newline. I have seen a couple of spam with a header
Message-ID: <H[20
The r.e. matched a whole bunch more (up to the next > in the header
which was a few lines later). This eventually resulted in a crash in
IMAPMessage.Save when the message couldn't be found again after it was
saved.
Index: sb_imapfilter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/scripts/sb_imapfilter.py,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** sb_imapfilter.py 9 Aug 2004 07:01:38 -0000 1.37
--- sb_imapfilter.py 19 Aug 2004 13:11:45 -0000 1.38
***************
*** 672,676 ****
"\:\s*(\d+(?:\-\d)?)"
# Search for our custom id first, for backwards compatibility.
! for id_header in [custom_header_id, "Message-ID\: ?\<([^\>]+)\>"]:
mo = re.search(id_header, data["RFC822.HEADER"], re.IGNORECASE)
if mo:
--- 672,676 ----
"\:\s*(\d+(?:\-\d)?)"
# Search for our custom id first, for backwards compatibility.
! for id_header in [custom_header_id, "Message-ID\: ?\<([^\n\>]+)\>"]:
mo = re.search(id_header, data["RFC822.HEADER"], re.IGNORECASE)
if mo:
More information about the Spambayes-checkins
mailing list