[Mailman-Users] newlist, rmlist, sendmail alias management

Nick Moffitt nick at zork.net
Thu Dec 9 08:50:08 CET 1999


Quoting Todd Pfaff:
> On Thu, 2 Dec 1999 claw at kanga.nu wrote:
> > In fact, there's an Exim stanza wandering about right now done by
> > Nick Moffit

	"Moffitt", actually.  And I can't claim full credit for it, as
it is based on some work that appears on the exim web site (though is
incomplete).  My apoligies for coming into this discussion a bit
late--please see my signature.

> > that avoids the need entirely for an alias file for MailMan, but
> > rather has Exim observe the presence of a
> > ~mailman/lists/<listname>/config.db file and therefor determine
> > that the list exists and all the addresses it needs.  Quite a cute
> > job really.  No alias file to update, but idential operation.

The meat of it is one transport and one director, as follows:

list_transport:
	driver = pipe
	command = MAILMAN_WRAP post ${lc:$local_part}
	current_directory = MAILMAN_DIR
	home_directory = MAILMAN_DIR
	user = MAILMAN_UID
	group = MAILMAN_GID

This basically says "When a director specifies me as a transport,
please pipe(line one) the mail through "/usr/libexec/mailman/wrapper
post <lower-case version of username goes here>"(line two).  Do it in
the mailman directory, and run as the mailing list user.


list_director:
	driver = smartuser
	require_files = MAILMAN_DIR/lists/${lc:$local_part}/config.db
	transport = list_transport

This basically means that if I get mail to "CrAcKMonKeY at CRACKMONKEY.org", and
there exists a "/var/lib/mailman/lists/crackmonkey/config.db" file,
then it runs it through the list_transport rules I specified above.
Note that the $local_part is the username, and the ${lc:...}
construction is what makes it lower-case.

> can be done similarly for sendmail...
> 
> - as mailman admin user
> cd ~mailman
> touch aliases aliases.dir aliases.pag
[...rest of alias-fu removed...]

	It can indeed, but this is not the way to do it.  What you
want to do is set up a rule that generates a mailman wrapper pipe
based on the existence of a config.db in a mailman list directory of
the same name.  Then the simple execution of newlist as a single
command will do all you need, and you'd be able to ignore newlist's
insistance that aliases be added.  

	

-- 
CrackMonkey.Org - Non-sequitur arguments and ad-hominem personal attacks
For those who were asking, the machine suffered a hard drive failure.  We lost
everything, and now we're back up with all the old accounts re-created.
This .signature is four lines long.  Whee.




More information about the Mailman-Users mailing list