[Mailman-Users] Redirect all -bounce emails

Mark Sapiro msapiro at value.net
Fri Sep 22 16:48:39 CEST 2006

Tom Kavanaugh wrote:
>I am currently re-directing all the lists -admin -bounce -owner -confirm
>-join -leave -owner -request -subscribe -unsubsribe to mailman at name.com
>Currently, I administer all the mail lists and so this works well.
>Going forward, I would like to make the list ownership of each list to the
>relevant project manager. So, the -admin, -bounce, etc of every list will
>have to go to a different email.
>My Mailman/Handlers/SMTPDirect.py looks like below. This was done from my
>previous posting in this discussion forum.
># Envelope sender (bounces) is always the site list.
>    envsender = 'mailman at name.com'
>Is it possible for :
>lista -admin -bounce -owner -confirm etc to go to name1 at name.com
>listb -admin -bounce -owner -confirm etc to go to name2 at name.com
>listc -admin -bounce -owner -confirm etc to go to name3 at name.com

I have looked at the post at
and the surrounding thread. I am still a bit hazy on this as it
relates to the -admin, -owner, -confirm, etc. addresses since the
SMTPDirect.py modification only deals with bounces by effectively
replacing the -bounces address with the address of the site list.

The prior thread seems to indicate that using aliases was problematic
because more than one server was involved and you didn't have access
to the incoming mail server for the domain. If it is the case that all
the list mail comes to your server somehow and is then delivered to
Mailman via aliases, then as Patrick suggests, you can use these
aliases to send the mail anywhere you want.

If you want to address just bounces in the same manner as your current
SMTPDirect.py modification that changes

    # Calculate the non-VERP envelope sender.
    envsender = msgdata.get('envsender')
    if envsender is None:
        if mlist:
            envsender = mlist.GetBouncesEmail()
            envsender = Utils.get_site_email(extra='bounces')


    # Envelope sender (bounces) is always the site list.
    envsender = 'mailman at example.com'

You could instead change it to

    # Envelope sender (bounces) is always the first list owner.
    if mlist:
        envsender = mlist.owner[0]
        envsender = 'mailman at example.com'

This would set the envelope sender of any message sent on behalf of a
list to the first address in the 'owner' attribute, and set it to the
fixed address if there wasn't a specific list involved.

Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list