Mercurial > p > roundup > code
diff roundup/mailgw.py @ 3482:db856d488de0
fixes
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 20 Jan 2006 03:04:14 +0000 |
| parents | d3b02352484f |
| children | 90e2580f21b8 |
line wrap: on
line diff
--- a/roundup/mailgw.py Fri Jan 20 02:45:36 2006 +0000 +++ b/roundup/mailgw.py Fri Jan 20 03:04:14 2006 +0000 @@ -72,7 +72,7 @@ an exception, the original message is bounced back to the sender with the explanatory message given in the exception. -$Id: mailgw.py,v 1.169 2006-01-13 03:56:36 richard Exp $ +$Id: mailgw.py,v 1.170 2006-01-20 03:04:14 richard Exp $ """ __docformat__ = 'restructuredtext' @@ -603,19 +603,6 @@ if not from_list: from_list = message.getaddrlist('from') - # check for registration OTK - # or fallback on the default class - if self.db.config['EMAIL_REGISTRATION_CONFIRMATION']: - otk_re = re.compile('-- key (?P<otk>[a-zA-Z0-9]{32})') - otk = otk_re.search(m.group('title')) - if otk: - self.db.confirm_registration(otk.group('otk')) - subject = 'Your registration to %s is complete' % \ - config['TRACKER_NAME'] - sendto = [from_list[0][1]] - self.mailer.standard_message(sendto, subject, '') - return - # XXX Don't enable. This doesn't work yet. # "[^A-z.]tracker\+(?P<classname>[^\d\s]+)(?P<nodeid>\d+)\@some.dom.ain[^A-z.]" # handle delivery to addresses like:tracker+issue25@some.dom.ain @@ -656,6 +643,18 @@ # check for well-formed subject line m = subject_re.match(subject) if m: + # check for registration OTK + # or fallback on the default class + if self.db.config['EMAIL_REGISTRATION_CONFIRMATION']: + otk_re = re.compile('-- key (?P<otk>[a-zA-Z0-9]{32})') + otk = otk_re.search(m.group('title')) + if otk: + self.db.confirm_registration(otk.group('otk')) + subject = 'Your registration to %s is complete' % \ + config['TRACKER_NAME'] + sendto = [from_list[0][1]] + self.mailer.standard_message(sendto, subject, '') + return # get the classname if pfxmode == 'none': classname = None
