[Mailman-Developers] Interacting with mailman remotely through APIs / wrappers

Lennon Day-Reynolds lennon at reed.edu
Mon May 21 22:59:52 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Barry Warsaw wrote:
> [...]
> I wonder if there isn't a cleaner way to integrate PHP and Python.   
> Does anybody know?  Or is some form of IPC really the only way to go?
> 
> Writing command line interfaces to provide the functionality you want  
> should not be difficult at all, if you are comfortable writing Python.

I've built applications that manipulate Mailman data using both the
internal Python APIs and the command-line scripts, and I can say that
both have their pleasantries and annoyances in about equal share.

Generally, the command-line tools are "good enough," and are certainly
easier to expose to anything not written in Python. However, the
argument handling is just different enough between tools to make a
totally general bridge difficult to write without special cases for each
action (add/list/remove member, add/show/delete list, etc.).

We have Perl and Ruby apps using the CLI tools to manipulate list
membership, though most run either under cron or an interactive SSH
session to the Mailman server.

The Python APIs can be faster, and certainly give you more powerful
(read: unrestricted) access to list data. For operations over large
numbers of lists, though, the unmarshalling of list pickles seems to be
the limiting factor, not the Python startup overhead.

One such all-Python application I've developed for use here at Reed uses
web.py and the Mailman Python APIs to expose a quick 'opt-in' interface
to a subset of our campus mailing lists. We rely on our LDAP directory
and web single-sign-on infrastructure to simplify the subscription
process: basically, after completing SSO auth, users can simply check
the subscription box next to each list name, and be automatically added
to (or removed from) it.

I'm eagerly looking forward to MM3 (or at least the SQLAlchemy branch)
making much of the hackish local customization work I've done
unnecessary. The XML-RPC interface sounds interesting, too, though I
don't know that it will really offer enough to prompt a rewrite of all
our command-line driven add-ons.

Lennon Day-Reynolds
Systems Programmer
Reed College
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGUghIRtirLnfvQskRAoaMAKCpAwxGPFJzXyEMgTJDLyLo7Hs+uwCdHP/l
HMJgJcyut94SzbgOC9IAcRo=
=77oH
-----END PGP SIGNATURE-----


More information about the Mailman-Developers mailing list