A great Open Source and free application for managing mailing lists is Mailman. It has a web interface for both admins and end-users, and usually comes with most hosting packages you sign up for on the web.
One limitation to this web interface however, is it doesn’t have the ability to export your user list. So what do you do if want to backup your data or move to another mailing solution? You’ve got to pop open that command line and dig in.
You need to find where mailman is installed. You can do this with: find / -name list_members -print which tells you the location of the mailmain executable program list_members. We’ll be using that later. Once that’s found, navigate to that directory.
Hopefully you’re in some location like /usr/local/mailman/bin, and you probably see other mailman specific programs in that folder as well. Now, to use list_members, you need the name of your mailing list. You’d think that well, the name of your mailing list is the name of your mailing list. But it’s not always the case. For example, if you run the program ./list_lists from your current folder you’ll see something like:
root@localhost [/usr/local/mailman/bin]# ./list_lists
2 matching mailing lists found:
Announce - [no description available]
Mailman - Mailman site list
So then if you try to run list_members you might get:
root@localhost [/usr/local/mailman/bin]# ./list_members Announce No such list: announceMailman complains about the list not being found. Odd, huh? Here’s the surefire way to get your list name. Inside the mailman folder is another folder named *lists* which stores your email lists. So you can just take a peek in there and find out your real list name.
root@localhost [/]# cd /usr/local/mailman/lists/ root@localhost [/usr/local/mailman/lists]# ls ./ ../ announce_example.com/ mailman/
Ah, so our real list name is announce_example.com. Now we can go back and export our user list with the following command.
root@localhost [/]# /usr/local/mailman/bin/list_members announce_example.com > subscribers.txt
Your subscriber emails are exported to the file subscribers.txt line by line that you can then take with you. Whew!
