On Fri, Nov 20, 2009 at 02:10:06PM -0500, Harold Pritchett wrote: > How do I list all of the members of all of my lists. > > Actually, I need to delete all users from a domain > and the command "remove_members --fromall --nouserack" > does not accept wildcards. > > If I can get a list of all users, I can then grep it > for the domain name and run remove_members for each > of the users which are found.
I'd probably use something like find_member example.com > outfile which will give you the email address and list memberships; this can be fed to remove_members. That may need some tidy-up, though. Another approach I might consider would be to use list_lists -b, and a while loop; something like: (untested) list_lists -b | while read L do find_member -l ${L} example.com > found-${L} remove_members --fromall --nouserack -f found-${L} ${L} rm found-${L} done Maybe skipping the outfile, but I like outfiles, rather than pipes/redirects. maybe feeding stuff through tee(1), although logs/subscribe should log those, appropriately. (I'd probably use the second suggestion, myself, having tested it first with a regexp that wouldn't do much damage.) -- ''meetings, n.: A place where minutes are kept and hours are lost.'' ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org