Barry Finkel wrote:
>
>>From a posting back in August:
>
>Willendrup, Peter Kjær wrote:
>>>
>>> My real question is: Is it possible to add addresses to the 'accepts' filter
>>> of a mailinglist from the commandline?
>
>And Mark Sapiro replied:
>>Not directly, but in a shell script you could prepare a file that looks like
>>
>>mlist.accept_these_nonmembers.append('usera at example.com')
>>mlist.accept_these_nonmembers.append('userb at example.com')
>>
>>and so on for all the non-members you want to add and then run
>>
>>bin/config_list -i filename listname
>>
>>where filename is the name of the above file.
>
>I have implemented a script to add an address to
>
> accept_these_nonmembers
>
>in a collection of Mailman lists, and I am wondering if there is a
>similar mechanism for deleting an address in
>
> accept_these_nonmembers
>
>in a collection of Mailman lists.
mlist.accept_these_nonmembers.remove('[EMAIL PROTECTED]')
but it would probably be better to do
user = '[EMAIL PROTECTED]'
try:
mlist.accept_these_nonmembers.remove(user)
except ValueError:
print 'User: %s not in accept_these_nonmembers' % user
or maybe just
try:
mlist.accept_these_nonmembers.remove('[EMAIL PROTECTED]')
except ValueError:
pass
but, now you're getting into the realm of Python coding and it would be
better still to write a complete Python script rather than using
config_list.
--
Mark Sapiro <[EMAIL PROTECTED]> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
------------------------------------------------------
Mailman-Users mailing list
[email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe:
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Security Policy:
http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp