[Mailman-Users] remove all members from specific domain

Mark Sapiro msapiro at value.net
Tue Apr 18 01:30:48 CEST 2006


Christopher Adams wrote:

>Does remove_members allow wild cards?


No


>I am thinking now that I probably need to script this. 

#! bin/sh
for list in `bin/list_lists --bare`
do bin/list_members $list | grep @example\.com$ |\
 bin/remove_members --fromall --file=-
done

where example.com is the member domain to remove. The --fromall isn't
required and doesn't change the final result, but it shortens the
later lists from list_members.

-- 
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