[Mailman-Users] extract emails from a list

Trevor Cullingsworth trevor.cullingsworth at pleasant.net
Fri Jul 15 20:48:49 CEST 2005


Hi James,

This script should do the trick.  It is what I use.

#!/bin/bash
#
#-- list_inquiry.sh
#
Mailman_Dir=/usr/lib/mailman
Script_Output=/tmp/list_inquiry.txt
#
#
#-- Change directory to mailman bin directory
cd /$Mailman_Dir/bin
#
#
echo "Subscribers of each list in company" > $Script_Output
echo >> $Script_Output
#
#-- Get all list names and put into a for loop
for mail_lists in `./list_lists -b`
do
        echo "$mail_lists:" >> $Script_Output

        #-- Get list of members for each list
        ./list_members $mail_lists >> $Script_Output

        echo >> $Script_Output
        echo >> $Script_Output
done
#
#
#-- End of Script


Trevor Cullingsworth


James wrote:

>Is it possible to get a list of all mailing lists with their
>respective members and dump this info in one text file?
>
>eg. 
>
>list1
>user1 at domain.com
>user2 at domain.com
>
>list2
>user1 at domain.com
>user3 at domain.com
>
>etc.
>------------------------------------------------------
>Mailman-Users mailing list
>Mailman-Users at python.org
>http://mail.python.org/mailman/listinfo/mailman-users
>Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
>Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
>Unsubscribe: http://mail.python.org/mailman/options/mailman-users/trevor.cullingsworth%40pleasant.net
>
>Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp
>  
>



More information about the Mailman-Users mailing list