Mailman is a great mailing list manager. It’s a shame it doesn’t provide a way for you to export Member lists within the Mailman interface itself. Sure if you had SSH access you could do this quite easily. But most web hosts won’t provide you with SSH access.
So what do we do?
With the help of the Linux or Mac command line, this task becomes less tedious.
- Log into the Mailman interface of your source host.
- Go to the Member list and start with A.
- Starting from the bottom of the list (simply because it’s easier to select from the end) highlight all email addresses upwards. You’ll also highlight the rightmost column but don’t worry about that, it won’t show in the paste.
- On the command line, create a new file.
- Paste the contents of the clipboard into the file. There’ll be lots of blank lines mixed in with Tabs. Once again don’t worry.
- Rinse and repeat for the rest of the letters.
- Save the contents of the file and exit the editor.
- Run grep against the file with: grep -v ‘ ‘ <filename> | grep -v ‘^$’ | grep -v -P ‘\t’ | sort > thelist
You now have a file named “thelist” with the list of Members stripped of blank lines and tabs, ready to be imported the target Mailman instance!