[Mailman-Users] getting list members from mysql

Mark Sapiro mark at msapiro.net
Sun Sep 14 22:08:32 CEST 2008


Peter Molnar wrote:
>
>Yes, we have a DB, and currently I have a PHP script, that extracts names
>and e-mail addresses in the form "Name" <email at domain.com>, ...

>Previously, we removed all list members from the list, and
>then added everybody using the PHP generated list, but I'd like to avod
>this, and to use MySQL.


As Fil suggested, you could just feed your script output into Mailman's
bin/sync_members. This is much more efficient than removing and
re-adding everyone.

If you want Mailman to use the MySQL database directly, you need a
custom MemberAdaptor for the list. If all you want to be able to do is

a) get a list of members, and
b) find out if some arbitrary address is a member or is allowed to
   post,

this MemberAdaptor could be very simple. The read-only LDAP
MemberAdaptor at
<http://webserver.offal.homelinux.org/LDAPMemberAdaptor/V3.0/LDAPMemberAdaptor/>
together with Fil's MySQL MemberAdaptor at
<http://trac.rezo.net/trac/rezo/browser/Mailman/> can give you an idea
of what's involved.

You would only need to implement a few methods and just return
appropriatee defaults for everything else.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Users mailing list