[Mailman-Users] programmatically managing list membership

Barry Finkel b19141 at britaine.ctd.anl.gov
Thu Nov 29 18:46:44 CET 2007

Scott Chapman <mail at scottechapman.com> wrote:

>Is there a way to programmatically manage th members of a list?
>I am am managing a club, where we track current and former membership in 
>a database. One wouldlike to b able to send an email to all the current 
>members, but that requires a SQL query.
>Is there a way for me to do this? Thanks in advance!

I do it every day.  Once a day, for some of my lists, someone creates
a file of subscribers; this comes from a database.  I have cron jobs
that take each (possibly changed) file and run

     ./sync_members -w=no -g=no -d=no -a=no -f  filename  $listname

This will quietly synchronize the membership list.  I get the output
of the cron, so I can keep track of who was unsubscribed and who was
subscribed.  One problem - if an address in the database is incorrect,
then the subscriber address will be unsubscribed eventually by Mailman
at the end of its bounce processing.  If the bad address has not been
corrected, it will be re-subscribed the next time the cron job is run.

My script does some other processing, as I allow for static entries
(persons automatically subscribed to a list even though they are not
in the database).
Barry S. Finkel
Computing and Information Systems Division
Argonne National Laboratory          Phone:    +1 (630) 252-7277
9700 South Cass Avenue               Facsimile:+1 (630) 252-4601
Building 222, Room D209              Internet: BSFinkel at anl.gov
Argonne, IL   60439-4828             IBMMAIL:  I1004994

More information about the Mailman-Users mailing list