How to export a list of users from Mailman

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: announce
Mailman 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!

Listing the names of users

Hi I am wondering if is posibble to get a list of users's names, something like.

john@example.com John Example
marybar@example2.com Mary Bar
...

if you execute

if you execute ./list_members --help, it prints a help page. On it it says:
--fullnames / -f
Include the full names in the output.

So, do ./list_members -f listname

Lily

list_members "command not found"

So what does it mean when I keep getting "command not found" for list_members?

Hi, Thanks for this!!! I was

Hi,

Thanks for this!!!

I was a great help!!!

CG

Export password

Hi,
I'm thinking to have user integration between mailman and MySQL based application.
Do you know is there anyway to export mailman created password so I can populate it to MySQL?

Thanks

Some of us probably don't have command line access to Mailman

The websites I manage on a commercial hosting service use a Plesk (http://en.wikipedia.org/wiki/Plesk) interface to the web interface to Mailman (http://www.gnu.org/software/mailman/mailman-member/node9.html).

In this case, the way to "export" the addresses in a Mailman email list is directly with Plesk:

1. Login to Plesk
2. Click on the domain containing the mail list.
3. Under "Services" click the "Mail" icon.
4. Click the "Mailing lists" tab near the top of the page.
5. Click on the name of the mailing list you want to export.

The entire list membership will be displayed and you can select and copy it and paste it into a text editor.

(In the above, "Click" may mean "double click" depending on your setup.)

Thanks for an advice. It

Thanks for an advice. It seems to me it is quite easy. As for me I found a very nice book with lots of tips in Programming at the pdf search engine http://pdf.rapid4me.com . Such things as this book and your articles make everything much easier.

© 2007 Matt Westgate