summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e25b0ff)
raw | patch | inline | side by side (parent: e25b0ff)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 26 Sep 2002 00:01:51 +0000 (00:01 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 26 Sep 2002 00:01:51 +0000 (00:01 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1241 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/mailgw.py | patch | blob | history |
diff --git a/roundup/mailgw.py b/roundup/mailgw.py
index 90e98afaef9c31db11370b63ccec2d2dcb4a5ad0..0af651dccf03a4b4713fcbac6458f9d96e4b5c0b 100644 (file)
--- a/roundup/mailgw.py
+++ b/roundup/mailgw.py
an exception, the original message is bounced back to the sender with the
explanatory message given in the exception.
-$Id: mailgw.py,v 1.90 2002-09-25 05:13:34 richard Exp $
+$Id: mailgw.py,v 1.91 2002-09-26 00:01:51 richard Exp $
'''
import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri
return Message(s)
subject_re = re.compile(r'(?P<refwd>\s*\W?\s*(fwd|re|aw)\s*\W?\s*)*'
- r'\s*(\[(?P<classname>[^\d\s]+)(?P<nodeid>\d+)?\])?'
- r'\s*(?P<title>[^[]+)?(\[(?P<args>.+?)\])?', re.I)
+ r'\s*(P<quote>")?(\[(?P<classname>[^\d\s]+)(?P<nodeid>\d+)?\])?'
+ r'\s*(?P<title>[^[]+)?"?(\[(?P<args>.+?)\])?', re.I)
class MailGW:
def __init__(self, instance, db):
else:
title = ''
+ # strip off the quotes that dumb emailers put around the subject, like
+ # Re: "[issue1] bla blah"
+ if m.group('quote') and title.endswith('"'):
+ title = title[:-1]
+
# but we do need either a title or a nodeid...
if nodeid is None and not title:
raise MailUsageError, '''