@@ -72,7 +72,7 @@ class node. Any parts of other types are each stored in separate files
7272an exception, the original message is bounced back to the sender with the
7373explanatory message given in the exception.
7474
75- $Id: mailgw.py,v 1.169 2006-01-13 03:56:36 richard Exp $
75+ $Id: mailgw.py,v 1.170 2006-01-20 03:04:14 richard Exp $
7676"""
7777__docformat__ = 'restructuredtext'
7878
@@ -603,19 +603,6 @@ def handle_message(self, message):
603603 if not from_list :
604604 from_list = message .getaddrlist ('from' )
605605
606- # check for registration OTK
607- # or fallback on the default class
608- if self .db .config ['EMAIL_REGISTRATION_CONFIRMATION' ]:
609- otk_re = re .compile ('-- key (?P<otk>[a-zA-Z0-9]{32})' )
610- otk = otk_re .search (m .group ('title' ))
611- if otk :
612- self .db .confirm_registration (otk .group ('otk' ))
613- subject = 'Your registration to %s is complete' % \
614- config ['TRACKER_NAME' ]
615- sendto = [from_list [0 ][1 ]]
616- self .mailer .standard_message (sendto , subject , '' )
617- return
618-
619606 # XXX Don't enable. This doesn't work yet.
620607# "[^A-z.]tracker\+(?P<classname>[^\d\s]+)(?P<nodeid>\d+)\@some.dom.ain[^A-z.]"
621608 # handle delivery to addresses like:[email protected] @@ -656,6 +643,18 @@ def handle_message(self, message):
656643 # check for well-formed subject line
657644 m = subject_re .match (subject )
658645 if m :
646+ # check for registration OTK
647+ # or fallback on the default class
648+ if self .db .config ['EMAIL_REGISTRATION_CONFIRMATION' ]:
649+ otk_re = re .compile ('-- key (?P<otk>[a-zA-Z0-9]{32})' )
650+ otk = otk_re .search (m .group ('title' ))
651+ if otk :
652+ self .db .confirm_registration (otk .group ('otk' ))
653+ subject = 'Your registration to %s is complete' % \
654+ config ['TRACKER_NAME' ]
655+ sendto = [from_list [0 ][1 ]]
656+ self .mailer .standard_message (sendto , subject , '' )
657+ return
659658 # get the classname
660659 if pfxmode == 'none' :
661660 classname = None
0 commit comments