[Mailman-Users] Mailman handler to run sync_members
jon.1234 at hotmail.co.uk
Sat Dec 13 00:25:42 CET 2014
> Date: Thu, 4 Dec 2014 20:47:37 -0800
> From: mark at msapiro.net
> On 12/04/2014 05:55 PM, Jon 1234 wrote:
>>> The get_memb script is specific to our database, but it could basically
>>> be anything, even just a straight MySQL query, that produces the desired
>>> list (In our case, the logic of determining whether a record in the
>>> table is that of a current member is complex and in some cases involves
>>> looking at dates in other records, thus the python script).
>> That sounds so similar to my situation that I'm going to push my luck, and ask if I could see an anonymised version of your get_memb script - would that be all right? Even the "who is a member?" part would be useful as, while mine would be different, it would help me with learning the necessary Python.
> OK. It's attached. It is the script I run except for database names and
> MySQL user and password.
Thank you very much for this. In the end I went for your cron method rather than a custom handler, although the script can be run at any time from a web link. I used PHP as I'm more familar with that. It updates the "is_member" MySQL database column, creates a text file of members' names and addresses from that database, runs sync_members -w=no -g=no -a=no on it, displays the output and emails it to the list administrator (along with some non-Mailman synchronisation stuff).
More information about the Mailman-Users