[Mailman-Developers] Creation/deletion of lists through-the-web

J C Lawrence claw@kanga.nu
Thu, 10 May 2001 10:43:17 -0700

On Thu, 10 May 2001 13:10:46 -0400 
Barry A Warsaw <barry@digicool.com> wrote:

>>>>>> "JCL" == J C Lawrence <claw@kanga.nu> writes:

>>> If I understand what you're asking, yes.  IOW, I don't muck
>>> about in the plain text aliases file, but I write directly to
>>> the file that newaliases would produce.

JCL> Then what happens when I need to manually touch that alias file
JCL> for some reason (eg I edit the aliases to insert demime in the
JCL> pipeline) and have postfix rebuild it?  You need to touch both
JCL> the plain text alias file and the DBM.

> Two suggestions:

> - If you want to insert demime in front of the pipeline for all
> lists, then edit Mailman/MTA/Utils.py to generate whatever
> expansion of the aliases you want.  Currently these expand to


> - If you only want to insert demime in front of some lists and not
> others, then I would suggest writing a custom module for the
> Mailman/MTA directory and using that instead (i.e. setting MTA =
> 'MyCustomMTA' in mm_cfg.py).

That's taking something which is simple and obvious, which every
SysAdm out there who has ever touched mail on a *nix system
understands editing alias files, and then turning it into something
special cased for Mailman.


> That having been said, I'm adding a command line script
> (bin/genaliases) that will re-generate both the dbhash alias file
> and the plain-text alias file based on the list of mailing lists.

Yeesh.  No.

If you touch the DBM file you need to touch the aliases file,
always.  Otherwise you're in the position of actively working to
deceive admins in regard to the state of their mail system (what
they can see says one thing, what they can't see says another, and
they have to have specialised knowledge to know that there's likely
to be a difference).

> What I don't want to do is use the plain text file as the
> canonical database file for integration with the MTA.  I fear the
> grepping and cut-n-paste that would have to be done
> programmatically would be too fragile.  


Put a comment block at the top of the file stating that this file is
maintained by the CGI at URL <whatever>.  Include a warning that
manual editing *might* break supports for this file format.  Have
newlist and the CGI always use the same formating.  As all you are
relly interested in are the ^listname:[ \t]*.* lines, they're easy
enough to match and edit.

> And then you still have to get newaliases run, which poses
> problems in its own right.

Nope.  You do both: touch the text file AND the DBM.

J C Lawrence                                       claw@kanga.nu
---------(*)                          http://www.kanga.nu/~claw/
The pressure to survive and rhetoric may make strange bedfellows