Ive come up with my own little function.. its not ideal but certainly does the job - no hiccups so far with it... basically i have a script called unsubuser, it prompts you for the username of the person you wish to unsub from lists, the it calls this function i wrote, displays the lists that person is subscribed to, and if its ok, press enter to begin the removal...
unsubscribe () ( cd /var/lib/mailman/lists/ #This will search for instances of the username in the available lists and chomp the output to a file that contains just the listnames grep $USERNAME * -R | sed -e s"/\// /g" | grep Binary | awk '{print $3}' | sort -u > /tmp/sub echo "This will remove $USERNAME from these lists: " cat /tmp/sub echo "Press ENTER to continue (no going back) or Control-C to quit" read -e #This unsubs the users from the lists in the file for d in `cat /tmp/sub` ; do echo "$USERNAME"@domain.com | remove_members -f - $d ; echo "Removing subscription from $d" ; done ) The only flaw i see with it, is the listadmins email address is in each of the lists, but not necessarily a member of them.. so when you go to remove a person who is also a list admin it shows all the lists... but the function still works... I would like to see a more sane way of unsubbing a person from all lists easier though... Cheers Spyro Ryan Steele wrote: > Juan Miscaro wrote: > >> --- Ryan Steele <[EMAIL PROTECTED]> wrote: >> >> >> >>> Juan Miscaro wrote: >>> >>> >>>> Is there any way to delete subscriber addresses over multiple lists >>>> easily (command line)? I am using Mailman 2.1.8 on OpenBSD 4.0. >>>> >>>> >>>> >>>> >>> Maybe something like this for a single user: >>> for list in `bin/list_lists | awk '{print $1}'` do; >>> bin/remove_members $list username >>> done >>> >>> >> Can't I just go >> >> $ bin/remove_members --fromall [EMAIL PROTECTED] >> >> ? >> >> >> > > Yes, but only if you want them removed from every list. Your request > indicated to me you only wanted to remove them from a subset of all the > lists - e.g., you said "multiple lists", not "all lists". > > >>> ...or this for multiple users >>> users='foo bar baz' >>> for list in `bin/list_lists | awk '{print $1}'` do; >>> bin/remove_members $list users >>> done >>> >>> >>> >>>> I also want to be able to remove all addresses from particular >>>> >>>> >>> domains. >>> >>> >>>> >>>> >>>> >>> You mean, remove all members from all lists belonging to a particular >>> domain name? >>> >>> >> Yes, that is what I mean. >> >> I want to be able to go >> >> $ bin/remove_members --fromall [EMAIL PROTECTED] >> >> but I read on the mailman FAQ that regexp/globs are not permitted. >> >> Juan >> >> >> > > You want to use bin/withlist, which will support regular expressions. > > >> Ask a question on any topic and get answers from real people. Go to >> Yahoo! Answers and share what you know at http://ca.answers.yahoo.com >> >> > > > This message and its attachments may contain legally privileged or confidential information. This message is intended for the use of the individual or entity to which it is addressed. If you are not the addressee indicated in this message, or the employee or agent responsible for delivering the message to the intended recipient, you may not copy or deliver this message or its attachments to anyone. Rather, you should permanently delete this message and its attachments and kindly notify the sender by reply e-mail. Any content of this message and its attachments, which does not relate to the official business of the sending company must be taken not to have been sent or endorsed by the sending company or any of its related entities. No warranty is made that the e-mail or attachment(s) are free from computer virus or other defect. ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org 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