[Mailman-Users] Can't force explicit reply to

Mark Sapiro mark at msapiro.net
Tue Mar 15 22:33:52 EDT 2016


On 03/15/2016 01:52 PM, treal tv wrote:
> I'm trying to follow the examples here and here.
>
>
http://mailman.readthedocs.org/en/release-3.0/src/mailman/handlers/docs/reply-to.html
>
>
http://www.pythonhosted.org/mailman/src/mailman/handlers/docs/reply-to.html?highlight=reply
>
>
> I can't start because it won't recognize my commands. I've tried the
> mailman shell (mailman 3 from mailman-bundler) and normal python.
>
> When trying to do:
>
>>>> listname.reply_goes_to_list  =  ReplyToMunging.explicit_header I get
>>>> back >>> listname.reply_to_address
> = 'mygood at address.net' Traceback (most recent call last): File
> "<console>", line 1, in <module> NameError: name 'mlist' is not defined


In Mailman shell, you need first to do

from zope.component import getUtility
from mailman.interfaces.listmanager import IListManager
list_manager = getUtility(IListManager)
from mailman.interfaces.mailinglist import ReplyToMunging
mlist = list_manager.get('list at example.com')

Or if you've invoked mailman shell with the list address, you only need do

from mailman.interfaces.mailinglist import ReplyToMunging

and either

mlist = m

or use m instead of mlist in the following:

Then you can do

mlist.reply_goes_to_list  =  ReplyToMunging.explicit_header

...

and finally you have to do

config.db.commit()

or you can do

from mailman.database.transaction import transaction

with transaction():
   make_some_changes()

and when you exit the with block, it will commit.


> I'm sure this is a newbie mistake but I would really appreciate any help
> on what I'm doing wrong here. Our situation is we're trying to run some
> anonymous lists, but when you set it to anonymous list, it overrides the
> "Explicit reply-to address", I'm trying to get it to use that explicit
> reply-to address, no matter where I have to configure it.


I'm not sure exactly how anonymous lists work in MM 3. Are you saying it
actually changes the explicit reply-to shown in Postorius or that it
just overrides it and puts the list address in reply-to.

If the latter, setting it in 'mailman shell' probably won't help.

Caveat: I'm not totally up to speed w/ MM3 yet. I'm struggling with
Postorius et al right now trying to get a Mailman 3 users list set up,
so I probably don't know a lot either.

In theory, you should be able to do all list management with Postorius,
but there are probably gaps. These can be reported to the issue tracker
at <https://gitlab.com/mailman/postorius/issues>.

-- 
Mark Sapiro <mark at msapiro.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