3.25. How do I remove subscribers from a list and put them on a different list?
There are situations where you want to move subscribers off of one list and replace them with other subscribers. Or there are situations where you add a number of people to your new list and you realize you added the wrong list.
It might be easiest to remove everyone and start over. Unfortunately, there is no button that allows you to do that from mailman. But with the help of your system administrator (and about 15 seconds of their time), you can clear out your subscribers list.
For simplicity I have divided this FAQ entry into three sections:
1) How to get a copy of the list of subscribers on the old list.
2) How to add those subscribers to a new list en masse.
3) How to remove all subscribers from a list.
I hope this is useful!
1) How to obtain the list of current members.
To do that, send a message to email@example.com, and in the body of the message specify:
Note that the list must be set to allow list members to view the list. If you have set it to have only the administrator view the list, Mailman is overly cautious and will not mail out the subscriber list, even if this command is coming from an administrator.
See <How do I extract (export) a list of my list's members (subscribers)?> for more complete information.
2) To add the subscribers to a different list, just copy and paste the names of subscribers (there is no limit, and adding 1000 names at a time seems fine) into the appropriate box in the membership management page of mailman. It might be a good idea to suppress your standard "welcome" message and just send out a regular message to the list to let everyone know of the change.
3) To remove the subscribers from your list, you will need to have access to the machine on which mailman runs. On that machine, you have to run the sync_members command. Now, if you don't actually need to use the old list right away you can just disable automatic subscription to the list. Go to the "privacy options" page and set the second option, what steps are required to subscribe, to "confirm+approval" or just "approval" so that as list owner, you can intercept these attempts and redirect people. And another setting you might want to modify is the "unsubscribe" message. There does not seem to be a way to turn unsubscribe messages off completely, but at least you can change the message to let people know the unsubscribe is really just a migration.
Anyway, getting back to the work of actually removing the subscribers... here is what your admin should do to clear out the old list:
./sync_members options -f file listname
So that you can actually specify a replacement for your list. (Using this command, you could actually maintain your mailing list with a piece of desktop software, and have a programmer create scripts to automatically upload the people who are going to get your e-newsletter.)
Getting back to the point of this faq, what your admin has to do to wipe the list clean is just leave out the file name:
admin@yourhost: cd /var/lib/mailman
admin@yourhost: bin/sync_members -f - <nameof list to change>
^D (i.e. you just type Control-D on your keyboard)
So when you leave out the file name, mailman waits for you to type the file, and pressing Control-D means you have not specified any file, so the list will be "sync'd" with a blank file. Then you will see a series of unsubscribe messages slowly scrolling:
Removed: firstname.lastname@example.org ( email@example.com)
Removed: firstname.lastname@example.org ( email@example.com)
Removed: firstname.lastname@example.org ( email@example.com)
Until the list is cleared out and has zero subscribers.
Last changed on Fri Feb 24 20:56:43 2006 by Mark Sapiro
Converted from the Mailman FAQ Wizard
This is one of many Frequently Asked Questions.