From 1584b7fac294eb6eb3bc000f3a3e5f79fe013a3f Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Tue, 4 Jan 2011 15:46:00 -0800 Subject: - Updated contrib/mm-handler-2.1.10 to better handle lists with names that look like admin addresses. Bug #697161. --- contrib/mm-handler-2.1.10 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'contrib/mm-handler-2.1.10') diff --git a/contrib/mm-handler-2.1.10 b/contrib/mm-handler-2.1.10 index a920b10d..1ff5703d 100644 --- a/contrib/mm-handler-2.1.10 +++ b/contrib/mm-handler-2.1.10 @@ -176,7 +176,12 @@ sub split_addr { # If an undefined action, restore list name $list = $addr; $cmd = "post"; + } elsif (! list_exists($list) and list_exists("$list-$cmd")) { + # Supposed command is actually part of list name, restore list name + $list = $addr; + $cmd = "post"; } + ## Otherwise use $list and $cmd as already assigned return ($list, $cmd); @@ -186,8 +191,8 @@ sub split_addr { sub list_exists { my ($name) = @_; - return 1 if (-f "$MMLISTDIR/$list/config.pck"); - return 1 if (-f "$MMLISTDIR/$list/config.db"); + return 1 if (-f "$MMLISTDIR/$name/config.pck"); + return 1 if (-f "$MMLISTDIR/$name/config.db"); return 0; } -- cgit v1.2.3