[Conferences] List settings - answer to private address

Carl Karsten carl at personnelware.com
Tue Apr 20 22:29:37 CEST 2010

On Tue, Apr 20, 2010 at 4:13 PM, Mike Müller <mmueller at python-academy.de> wrote:
> When I reply to a message from the list it goes
> to the private address of the sender rather than the
> list. I need to manually construct the message
> supplying the list address myself.
> Seems like other people have the same problem.
> In the last thread "Long-term planning of Python events"
> I got two private answers, where they seem to be directed
> towards the list. Just look a the archives
> http://mail.python.org/pipermail/conferences/2010-April/thread.html
> to sees if your message made it there.
> Being a Mailman list administrators myself, I know that there is an
> option `reply_goes_to_list` that can be set to either `sender`, `list`, or
> `explicit address`. I would prefer `list`, which allows to just press
> reply to answer to the list.
> Any opinions?


Here is my solution:

    message = email.message_from_string(stdin)

    # Munge the Reply-To for lists that don't.
    if not message["Reply-To"]:

        # Look for an address here...
        # check X-BeenThere, List-Post, Cc, Return-Path
        if not xrt:
            # or burried in here:
            if xrt:
                xrt = xrt.split(':')[1].rstrip('>')
                if not xrt:
                    # Return-Path: <owner-nanog at merit.edu>
                    xrt = message.get('Return-Path')

        message["X-xrt"] = xrt

        # if we have an address, see if the domain is special
        if xrt:
                    'lists.ubuntu.com', 'ubuntu.org',
                    'redhat.com', ]

            if True in [special in xrt for special in specials]:
                message["Reply-To"] = xrt

    print message

Carl K

More information about the Conferences mailing list