qmail-to-mailman.py missing commands

Bug #412293 reported by shubes
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
Mark Sapiro

Bug Description

 I have 2 patches for this script.

The first one I found at http://markmail.org/message/uuraecv4juc2l22c#query:qmail-to-mailman.py+page:1+mid:a2ulssiqja2mteii+state:results, written by Kjartan Mannes. It uses the USER environment variable instead of the hard coded 'mailman', allowing the script to work with virtual domains.
@@ -66,2 +66,3 @@
     local = string.lower(local)
- local = re.sub("^mailman-","",local)
+ user = os.environ["USER"]
+ local = re.sub("^" + user + "-","",local)

The second one I found in part at http://www.kroon.co.za/howto.php?howto=qmail_mailman, written by Jaco Kroon. Jaco's patch allows for VERP processing. During testing, I discovered that the -confirm, -subscribe, and -unsubscribe addresses were missing as well and have added them. This patch corrects both of these bugs:
@@ -77,10 +77,15 @@
     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):

I doubt that this module is used very much at all, but I think it'd be nice to have it fixed for the next poor soul who might come along and try using it. Anyone using qmail these days deserves a break. ;)

Related branches

Revision history for this message
Martin (mmokrejs-ribosome) wrote :

I am using qmail. ;-) I have applied this patch and it works fine, just tested the -unsubscribe email alias. Thanks.

Mark Sapiro (msapiro)
Changed in mailman:
assignee: nobody → Mark Sapiro (msapiro)
importance: Undecided → Low
milestone: none → 2.1.17
status: New → Confirmed
Mark Sapiro (msapiro)
Changed in mailman:
status: Confirmed → Fix Committed
Mark Sapiro (msapiro)
Changed in mailman:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers