diff -ruN -x'.bzr*' mailman-2.1.13/Mailman/MTA/Utils.py vhost/Mailman/MTA/Utils.py --- mailman-2.1.13/Mailman/MTA/Utils.py 2009-12-22 10:00:43.000000000 -0800 +++ vhost/Mailman/MTA/Utils.py 2010-01-28 14:16:45.046875000 -0800 @@ -23,6 +23,10 @@ from Mailman import mm_cfg +_extensions = ('admin', 'bounces', 'confirm', 'join', 'leave', 'owner', + 'request', 'subscribe', 'unsubscribe', ) + + def getusername(): username = os.environ.get('USER') or os.environ.get('LOGNAME') @@ -35,7 +39,9 @@ -def _makealiases_mailprog(listname): +def _makealiases_mailprog(listname, internal_listname=None): + if not internal_listname: + internal_listname = listname wrapper = os.path.join(mm_cfg.WRAPPER_DIR, 'mailman') # Most of the list alias extensions are quite regular. I.e. if the # message is delivered to listname-foobar, it will be filtered to a @@ -48,13 +54,12 @@ # # We escape a few special characters in the list name in the pipe command # to avoid characters that might split the pipe into two commands. - safename = re.sub('([;|&`$])', r'\\\1', listname) + safename = re.sub('([;|&`$])', r'\\\1', internal_listname) # # Seed this with the special cases. aliases = [(listname, '"|%s post %s"' % (wrapper, safename)), ] - for ext in ('admin', 'bounces', 'confirm', 'join', 'leave', 'owner', - 'request', 'subscribe', 'unsubscribe'): + for ext in _extensions: aliases.append(('%s-%s' % (listname, ext), '"|%s %s %s"' % (wrapper, ext, safename))) return aliases @@ -71,8 +76,7 @@ # Note, don't use this unless your MTA leaves the envelope recipient in # Delivered-To:, Envelope-To:, or Apparently-To: aliases = [(listname, maildir)] - for ext in ('admin', 'bounces', 'confirm', 'join', 'leave', 'owner', - 'request', 'subscribe', 'unsubscribe'): + for ext in _extensions: aliases.append(('%s-%s' % (listname, ext), maildir)) return aliases