[Mailman-Users] Error? in accept_these_nonmembers Processing

Mark Sapiro msapiro at value.net
Wed May 2 03:28:04 CEST 2007

Barry Finkel wrote:

>I create new Mailman (2.1.9) lists via copying template files.
>One of my template files has:
>accept_these_nonmembers = ['user1 at example.com', 'user2 at example.com',
>   'user3 at example.com  (Joe Bleaux)', 'user4 at example.com']

The *_these_nonmembers lists are lists of plain email addresses without
comments or real names or regexps (beginning with ^) that match email

>(I have split the line for easier readibility.)

Actually, config_list input is Python, and in Python it is perfectly
acceptable to break a list like the above across lines. New-lines
outside of quoted strings are ignored if they occur inside parens (),
brackets [] or braces {}.

>When I create a new
>list via
>     /usr/sbin/newlist $listname
>     config_list -i $1.config $listname
>I get no complaints, and the administrator web interface shows the
>four addresses with the parenthesized name after the third address.
>I have not tested whether any of these addresses can post to the new

With the above, user3 at example.com could not post (because the code
would test whether 'user3 at example.com' is equal to 'user3 at example.com 
(Joe Bleaux)') but the others could.

>But when I want to add another address to the list (or remove
>an address) via the admin web interface, I get an error messsage about
>an incorrect address.  When I remove the parenthesized name, the error
>message is not produced.  If the parenthesized name is not valid, I
>would expect an error message during the config_list command execution.

It's not valid and your expectation is reasonable, but this isn't what
happens (I'm not saying it can't/won't be fixed).

Here's a section of the code that would normally validate the supplied

        if wtype in (mm_cfg.EmailList, mm_cfg.EmailListEx):
            # BAW: value might already be a list, if this is coming from
            # config_list input.  Sigh.
            if isinstance(val, ListType):
                return val

In other words, if accept_these_nonmembers (or any attribute which is a
list of email addresses or a list of email addresses and regexps)
comes from the GUI page, it is the contents of a text box which is a
string and it is validated and transformed to a list, but if it is
already a list, it is assumed to be from input to config_list and the
list is just assigned to the attribute without validatating its

If you want to see this fixed, the best next step is to report it in
the bug tracker at
<http://sourceforge.net/tracker/?group_id=103&atid=100103>. (Since
I've already done the analysis, I'll probably fix it, but get it in
the tracker anyway.)

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