Mercurial > p > roundup > code
comparison roundup/mailgw.py @ 1859:492a962b6d6f
Make signature matching more precise: only match '-- '...
(note the space) as a signature starter [SF#827775].
| author | Johannes Gijsbers <jlgijsbers@users.sourceforge.net> |
|---|---|
| date | Fri, 24 Oct 2003 14:59:38 +0000 |
| parents | 4ac11e7fa11a |
| children | ea63531ddeec |
comparison
equal
deleted
inserted
replaced
| 1857:dc6f2155e5b4 | 1859:492a962b6d6f |
|---|---|
| 71 set() method to add the message to the item's spool; in the second case we | 71 set() method to add the message to the item's spool; in the second case we |
| 72 are calling the create() method to create a new node). If an auditor raises | 72 are calling the create() method to create a new node). If an auditor raises |
| 73 an exception, the original message is bounced back to the sender with the | 73 an exception, the original message is bounced back to the sender with the |
| 74 explanatory message given in the exception. | 74 explanatory message given in the exception. |
| 75 | 75 |
| 76 $Id: mailgw.py,v 1.133 2003-10-04 11:21:47 jlgijsbers Exp $ | 76 $Id: mailgw.py,v 1.134 2003-10-24 14:59:38 jlgijsbers Exp $ |
| 77 """ | 77 """ |
| 78 | 78 |
| 79 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri | 79 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri |
| 80 import time, random, sys | 80 import time, random, sys |
| 81 import traceback, MimeWriter, rfc822 | 81 import traceback, MimeWriter, rfc822 |
| 1034 | 1034 |
| 1035 | 1035 |
| 1036 def parseContent(content, keep_citations, keep_body, | 1036 def parseContent(content, keep_citations, keep_body, |
| 1037 blank_line=re.compile(r'[\r\n]+\s*[\r\n]+'), | 1037 blank_line=re.compile(r'[\r\n]+\s*[\r\n]+'), |
| 1038 eol=re.compile(r'[\r\n]+'), | 1038 eol=re.compile(r'[\r\n]+'), |
| 1039 signature=re.compile(r'^[>|\s]*[-_]+\s*$'), | 1039 signature=re.compile(r'^[>|\s]*-- $'), |
| 1040 original_msg=re.compile(r'^[>|\s]*-----\s?Original Message\s?-----$')): | 1040 original_msg=re.compile(r'^[>|\s]*-----\s?Original Message\s?-----$')): |
| 1041 ''' The message body is divided into sections by blank lines. | 1041 ''' The message body is divided into sections by blank lines. |
| 1042 Sections where the second and all subsequent lines begin with a ">" | 1042 Sections where the second and all subsequent lines begin with a ">" |
| 1043 or "|" character are considered "quoting sections". The first line of | 1043 or "|" character are considered "quoting sections". The first line of |
| 1044 the first non-quoting section becomes the summary of the message. | 1044 the first non-quoting section becomes the summary of the message. |
