Re: [Mailman-Users] Deleting Address in accept_these_nonmembers (was Add to filter from commandline?)

From a posting back in August:
Willendrup, Peter Kjær wrote:
I have two mailinglists sitting on the same machine, one being the general user mailinglist (A) and the other one the software developer list (B) (B is reachable by a commonly known 'support' email adress).
Is there an easy way to allow members of list A to write messages to list B without being members of B?
See <http://sourceforge.net/tracker/index.php?func=detail&aid=1220144&group_id=103&atid=300103> for a patch to allow this.
My current solution is to add the members of A to the accepts filter of list B - something that I am currently doing using the web interface...
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.
Alternatively, you could just prepare an input file that looks like
accept_these_nonmembers = [ 'usera at example.com', 'userb at example.com', 'userc at example.net', 'userd at example.net', ]
wherein all the addresses (not just adds) for accept_these_nonmembers are listed, and then run the same config_list command. See
bin/config_list --help
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.
Barry S. Finkel Computing and Information Systems Division Argonne National Laboratory Phone: +1 (630) 252-7277 9700 South Cass Avenue Facsimile:+1 (630) 252-4601 Building 222, Room D209 Internet: BSFinkel@anl.gov Argonne, IL 60439-4828 IBMMAIL: I1004994

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('user@example.com')
but it would probably be better to do
user = 'user@example.com' 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('user@example.com') 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 <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Mark Sapiro wrote:
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.
See <http://www.msapiro.net/scripts/non_members> (mirrored at <http://fog.ccsf.cc.ca.us/~msapiro/scripts/non_members> and <http://veenet.value.net/~msapiro/scripts/non_members>) for an example.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Barry Finkel
-
Mark Sapiro