Update of /cvsroot/mailman/mailman/contrib
In directory usw-pr-cvs1:/tmp/cvs-serv14228
Modified Files:
mm-handler
Log Message:
Merged in contributed updates by Ron Jarrell to work with MM2.1
better.
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.)
Ok. Diff against cvs again. Handles the VERP tokens just fine.
If I wasn't *still* here fiddling at 7am it'd probably be a tad more
elegant, but it work.
:)
Index: mm-handler
===================================================================
RCS file: /cvsroot/mailman/mailman/contrib/mm-handler,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** mm-handler 27 Oct 2001 02:30:51 -0000 1.1
--- mm-handler 5 Apr 2002 19:41:09 -0000 1.2
***************
*** 1,17 ****
! #!/opt/bin/perl
##
## Sendmail mailer for Mailman
##
-
## Simulates these aliases:
! ## 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
## Some assembly required.
! $MMWRAPPER = "/opt/pkgs/mailman/mail/wrapper";
! $MMLISTDIR = "/var/mailman/lists";
$SENDMAIL = "/usr/lib/sendmail -oem -oi";
$VERSION = '$Id$';
--- 1,23 ----
! #!/usr/local/bin/perl
##
## Sendmail mailer for Mailman
##
## Simulates these aliases:
! ##
! ##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
## Some assembly required.
! $MMWRAPPER = "/home/mailman/mail/mailman";
! $MMLISTDIR = "/home/mailman/lists";
$SENDMAIL = "/usr/lib/sendmail -oem -oi";
$VERSION = '$Id$';
***************
*** 121,133 ****
my ($addr) = @_;
my ($list, $cmd);
! if ($addr =~ /(.*)-admin$/
! || $addr =~ /(.*)-owner$/
! || $addr =~ /^owner-(.*)$/) {
$list = $1;
! $cmd = "mailowner";
! } elsif ($addr =~ /(.*)-request$/) {
$list = $1;
! $cmd = "mailcmd";
} else {
$list = $addr;
--- 127,146 ----
my ($addr) = @_;
my ($list, $cmd);
+ my @validfields = qw(admin bounces confirm join leave owner request
+ subscribe unsubscribe);
! if ($addr =~ /(.*)-(.*)\+.*$/) {
$list = $1;
! $cmd = "$2";
! } else {
! $addr =~ /(.*)-(.*)$/;
$list = $1;
! $cmd = $2;
! }
! if (grep /^$cmd$/, @validfields) {
! if ($list eq "owner") {
! $list = $cmd;
! $cmd = "owner";
! }
} else {
$list = $addr;
***************
*** 188,194 ****
$cmd= "post";
! if (! -f "$MMLISTDIR/$list/config.db") {
($list, $cmd) = &split_addr($list);
! if (! -f "$MMLISTDIR/$list/config.db") {
$was_to = $addr;
$was_to .= "\@$server" if ("$server" ne "");
--- 201,207 ----
$cmd= "post";
! if (! -f "$MMLISTDIR/$list/config.pck") {
($list, $cmd) = &split_addr($list);
! if (! -f "$MMLISTDIR/$list/config.pck") {
$was_to = $addr;
$was_to .= "\@$server" if ("$server" ne "");
_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-checkins