[Mailman-Developers] mm-handler

Ron Jarrell jarrell@vt.edu
Fri, 29 Mar 2002 04:50:32 -0500 (EST)


Barry - dgc's mm-handler isn't prepared to handle 2.1; it's using the
old structure for aliases.  Not surprisingly.  However, since it's
referenced in the docs as a sendmail solution, it'll probably surprise
some people who try it, when things go majorly foobar (even the wrapper
script name is wrong.)

I've gotten it working in my installation.  At some point I'll
contribute again my mc file that makes installing it a more "sendmail
like" operation then the way dgc does it.  I've got it on my production
and test servers right now, and it seems to be working cleanly.

Here's a diff against cvs.  I had to change a couple of paths above and
beyond the minimum required to get it 2.1 clean, simply to get it to
work on my machine, but otherwise this seems to do it.  David might have
his own way of fixing it, but I'm happy as is now :-).


Index: mm-handler
===================================================================
RCS file: /cvsroot/mailman/mailman/contrib/mm-handler,v
retrieving revision 1.1
diff -r1.1 mm-handler
1c1
< #!/opt/bin/perl
---
> #!/usr/local/bin/perl
5d4
< 
7,11c6,17
< ## testlist:                "|/opt/pkgs/mailman/mail/wrapper post testlist"
< ## testlist-admin:          "|/opt/pkgs/mailman/mail/wrapper mailowner testlist"
< ## testlist-request:        "|/opt/pkgs/mailman/mail/wrapper mailcmd testlist"
< ## owner-testlist:          testlist-admin
< ## testlist-owner:          testlist-admin
---
> ##
> ##testlist:              "|/home/mailman/mail/mailman post testlist"
> ##testlist-admin:        "|/home/mailman/mail/mailman admin testlist"
> ##testlist-bounces:      "|/home/mailman/mail/mailman bounces testlist"
> ##testlist-confirm:      "|/home/mailman/mail/mailman confirm testlist"
> ##testlist-join:         "|/home/mailman/mail/mailman join testlist"
> ##testlist-leave:        "|/home/mailman/mail/mailman leave testlist"
> ##testlist-owner:        "|/home/mailman/mail/mailman owner testlist"
> ##testlist-request:      "|/home/mailman/mail/mailman request testlist"
> ##testlist-subscribe:    "|/home/mailman/mail/mailman subscribe testlist"
> ##testlist-unsubscribe:  "|/home/mailman/mail/mailman unsubscribe testlist"
> ##owner-testlist:        testlist-owner
14,15c20,21
< $MMWRAPPER = "/opt/pkgs/mailman/mail/wrapper";
< $MMLISTDIR = "/var/mailman/lists";
---
> $MMWRAPPER = "/home/mailman/mail/mailman";
> $MMLISTDIR = "/home/mailman/lists";
122a129,130
> 	my @validfields = qw(admin bounces confirm join leave owner request
> 				subscribe unsubscribe);
124,132c132,139
< 	if ($addr =~ /(.*)-admin$/
< 	    || $addr =~ /(.*)-owner$/
< 	    || $addr =~ /^owner-(.*)$/) {
< 		$list = $1;
< 		$cmd = "mailowner";
< 	} elsif ($addr =~ /(.*)-request$/) {
< 		$list = $1;
< 		$cmd = "mailcmd";
< 	} else {
---
> 	$addr =~ /(.*)-(.*)$/;
> 	$list = $1;
> 	$cmd = $2;
> 	if ($list eq "owner") {
> 		$list = $cmd;
> 		$cmd = "owner";
> 	}
> 	if (!grep /^$cmd$/, @validfields) {
190c197
< 		if (! -f "$MMLISTDIR/$list/config.db") {
---
> 		if (! -f "$MMLISTDIR/$list/config.pck") {
192c199
< 			if (! -f "$MMLISTDIR/$list/config.db") {
---
> 			if (! -f "$MMLISTDIR/$list/config.pck") {