Add and Removelist from .txt file
I have few member lists under Mailman and I came across a situation where I would like to remove quite some members from different lists. What I'm doing now is browse through each list, searching for the particular email address and delete it. This method cost me alot of time.
Is there any way for me to remove email addresses which compiled in a text file from all the lists? Is there any command which able to import the email from text file and remove from Mailman automatically?
For those who came across the same situation before, please kindly advice. My mailman version is 2.1.6.
Many thanks!
View this message in context: http://www.nabble.com/Add-and-Removelist-from-.txt-file-tf1996930.html#a5481... Sent from the Mailman - Users forum at Nabble.com.
At 1:17 AM -0700 2006-07-25, Eric Oye wrote:
Is there any way for me to remove email addresses which compiled in a text file from all the lists? Is there any command which able to import the email from text file and remove from Mailman automatically?
See FAQ 4.9. There is the find_member command, as well as the list_members and list_lists commands. It should be easy enough to script these commands, if they don't do everything you want and you don't want to try to write some of your own Python using the withlist command.
-- Brad Knowles, <brad@stop.mail-abuse.org>
"Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin (1706-1790), reply of the Pennsylvania
Assembly to the Governor, November 11, 1755
Founding Individual Sponsor of LOPSA. See <http://www.lopsa.org/>.
i know about that command, but it cant help to add or remove the email i written in the text file. Do you have any idea or any command that can retreive those email address i store at the text file and do adding n removing on mailman? Thanks a lot
View this message in context: http://www.nabble.com/Add-and-Removelist-from-.txt-file-tf1996930.html#a5482... Sent from the Mailman - Users forum at Nabble.com.
What Brad said is correct. You will find the answer to your question in the /bin directory. You should read the find_member file for how to locate the members that are subscribed to what list and read the add_members and remove_members files to help you construct a command.
A simple example for mass adding regular subscribers to a list from a text file is:
bin/add_members -r /path/to/textfile -w n -a n listname
A simple example for mass removing subscribers using a text file:
bin/remove_members -f /path/to/textfile -n -N listname
--Catherine
At 04:41 AM 7/25/2006, Eric Oye wrote:
i know about that command, but it cant help to add or remove the email i written in the text file. Do you have any idea or any command that can retreive those email address i store at the text file and do adding n removing on mailman? Thanks a lot
Thanks for the help, i had try the remove command you provide. It do help for removing members from list to list. But wat if i have lots of list in my server. Is impossible for me to remove the members by entering the list name one by one.
bin/remove_members -f /path/to/textfile -n -N listname
THis command sure can delete member by retreive the email address from the text file. But it just can delete by entering one list name at a time. I had try to put all the email address in a text file name membersname.txt while enter all the list i have in a text file name listname.txt. Below is the command i came out with, but it doesn't work.
bin/remove_members -f bin/membersname.txt -n -N -f bin/listname.txt
Does anyone have the solution to solve my problem. I wan to delete members that i enter in a text file and need the server to search for the correct list to delete them but not manually find the list to delete members. Thanks fort the support.
Eric
-- View this message in context: http://www.nabble.com/Add-and-Removelist-from-.txt-file-tf1996930.html#a5514... Sent from the Mailman - Users forum at Nabble.com.
Try something like this:
bin/remove_members -f /path/to/file --fromall -n -N
That will remove members listed in the "/path/to/file" from "all lists" without sending user or admin acknowledgements.
Hint1: Backup your lists. Hint2: Don't put your text file inside your /bin directory. You can have it located anywhere on your server, e.g., /home/www/subsfile.txt
--Catherine
At 10:22 PM 7/26/2006, Eric Oye wrote:
Thanks for the help, i had try the remove command you provide. It do help for removing members from list to list. But wat if i have lots of list in my server. Is impossible for me to remove the members by entering the list name one by one.
bin/remove_members -f /path/to/textfile -n -N listname
THis command sure can delete member by retreive the email address from the text file. But it just can delete by entering one list name at a time. I had try to put all the email address in a text file name membersname.txt while enter all the list i have in a text file name listname.txt. Below is the command i came out with, but it doesn't work.
bin/remove_members -f bin/membersname.txt -n -N -f bin/listname.txt
Does anyone have the solution to solve my problem. I wan to delete members that i enter in a text file and need the server to search for the correct list to delete them but not manually find the list to delete members. Thanks fort the support.
Eric
Eric Oye wrote:
But wat if i have lots of list in my server. Is impossible for me to remove the members by entering the list name one by one.
bin/remove_members -f /path/to/textfile -n -N listname
#!/bin/sh
for list in ls lists
do bin/remove_members -f /path/to/textfile -n -N $list
done
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Thanks Mark, it do help, really thanks for the solution.
Anyway, those had involve in the forum, thanks you very much as well
View this message in context: http://www.nabble.com/Add-and-Removelist-from-.txt-file-tf1996930.html#a5516... Sent from the Mailman - Users forum at Nabble.com.
participants (4)
-
Brad Knowles
-
Catherine Maxwell
-
Eric Oye
-
Mark Sapiro