[Mailman-Developers] Creation/deletion of lists through-the-web
Jay R. Ashworth
Wed, 9 May 2001 10:13:21 -0400
On Wed, May 09, 2001 at 01:45:36AM -0400, Barry A. Warsaw wrote:
> Last night I got inspired to add back the through-the-web creation and
> deletion of mailing lists. I've now got this working for Postfix and
> can work with other MTAs with a little help from y'all. I will soon
> be checking all this code into the 2.1 codebase, so watch
> mailman-checkins shortly. (And hey, it only took 24 hours from
> inception to completion! :).
Ain't Python great?
> Now, how to integrate this with MTAs? One reason why ttw list
> creation and deletion hasn't been (re-)added to Mailman until now is
> that you typically have to do some manual and difficult crud like edit
> an /etc/aliases file and run `newaliases' (as root!). I've figured a
> way around this with Postfix, and of course Exim can be configured to
> automatically recognize new mailing lists, so I figured it was time to
> do it. I'm hoping that Sendmail, Qmail, and other MTA users amongst
> yourselves will contribute the code to glue this together for other
IMHO, the proper solution for sendmail is for the admin to put an
:include: in /etc/aliases pointing to /home/mailman/data/aliases, and
rebuild that from scratch against the current list of lists every time
that list changes.
> It's moderately well-published what Postfix expects as entries in the
> dbhash (and it's easy to figure out by dumping a newaliases generated
> .db file) so, when creating a new list, Mailman can add the necessary
> keys and values to make Postfix happy. Let's say Mailman is installed
> as /home/mailman and writes its new list alias entries to the dbhash
> file at /home/mailman/data/aliases.db. By adding
> "hash:/home/mailman/data/aliases" to your Postfix's alias_maps
> variable, Postfix will automatically deliver to your new list.
> Deleting is as simple as removing the keys from the dbhash.
> Note that you do /not/ want to add this file to alias_databases since
> newaliases won't be touching it.
You're working at the 'compiled' level there, right?
> There's one last bit of glue, and here's where you come in (I'm
> speaking to the one of you who is still reading this. :). There's a
> new variable in Defaults.py.in called MTA which must point to a module
> in the Mailman/MTA directory. This implements the MTA-specific
> operations needed when creating or deleting a list. The API is that
> this module should provide two functions: create() and remove() both
> of which take a MailList object. They should do whatever is necessary
> to inform the MTA that it's alias database has changed. For Postfix
> it's really not a lot of code.
I suspect you'll need one more: how to get the aliases database rebuilt
when it's been changed.
Jay R. Ashworth firstname.lastname@example.org
Member of the Technical Staff Baylink
The Suncoast Freenet The Things I Think
Tampa Bay, Florida http://baylink.pitas.com +1 727 804 5015