From 27f70ecc8aca813cf6724a54422746bbcdc0556e Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Fri, 1 Nov 2013 09:50:24 -0700 Subject: Fixed contrib/qmail-to-mailman.py to work with a user other than 'mailman' and to recognize more listname-* addresses. (LP: #412293) --- contrib/qmail-to-mailman.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/qmail-to-mailman.py b/contrib/qmail-to-mailman.py index 3e4e19d5..8c95a1d3 100644 --- a/contrib/qmail-to-mailman.py +++ b/contrib/qmail-to-mailman.py @@ -64,7 +64,8 @@ def main(): sys.exit(100) local = string.lower(local) - local = re.sub("^mailman-","",local) + user = os.environ.get('USER', 'mailman') + local = re.sub('^%s-' % user, '', local) names = ("root", "postmaster", "mailer-daemon", "mailman-owner", "owner", "abuse") @@ -77,10 +78,15 @@ def main(): type = "post" types = (("-admin$", "bounces"), ("-bounces$", "bounces"), + ("-bounces[-+].*$", "bounces"), + ("-confirm$", "confirm"), + ("-confirm[-+].*$", "confirm"), ("-join$", "join"), ("-leave$", "leave"), ("-owner$", "owner"), - ("-request$", "request")) + ("-request$", "request"), + ("-subscribe$", "subscribe"), + ("-unsubscribe$", "unsubscribe")) for i in types: if re.search(i[0],local): -- cgit v1.2.3