Great Circle Associates Majordomo-Workers
(September 1996)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: Obscure bug; input needed
From: Dave Wolfe <dwolfe @ risc . sps . mot . com>
Date: Fri, 20 Sep 1996 10:03:34 -0500 (CDT)
To: tibbs @ hpc . uh . edu (Jason L Tibbitts III)
Cc: majordomo-workers @ greatcircle . com
In-reply-to: <ufaohj4i76e.fsf@sina.hpc.uh.edu> from "Jason L Tibbitts III" at Sep 18, 96 03:00:41 am
Reply-to: Dave Wolfe <david_wolfe @ risc . sps . mot . com>

[ Jason L Tibbitts III writes: ]
>
> There's an obscure bug that was brought to my attention recently that
> I know how to fix, but the fix changes current (obscure) behavior.
>
> The problem is that if you're using the -l option to majordomo to give
> a default list and you try to subscribe or unsubscribe an address
> that starts with the list name (like <listname@blah.com>, which is
> reasonably common given remote exploders and such) the &valid_list
> subroutine thinks this is a list name. The result is some confusion:
>
> echo "unsubscribe fvwm@exploder.host" | mail fvwm-request
>
> results in me being unsubscribed from my list, for example.
>
> The problem is that &valid_list tries to be nice and strip off
> brackets and stuff after an `@' sign, which results in "listname" and
> "<listname@some.host>" being equivalent. This is nice behavior, (it
> allows people to send "subscribe fvwm@hpc.uh.edu" and have it work)
> but it gets in the way here.
>
> Every possible solution to this conflict results in changing
> long-standing behavior. My least-impact solution is only to strip the
> stuff after the `@' if it matches (or contains) $whereami (the host
> majordomo is running on) but even then this would miss some reasonable
> cases (like hosts with many names). A solution which requires
> coding (which isn't really a problem) is having another variable in
> majordomo.cf giving a regexp which, if it matches, will result in the
> stuff after the `@' being chunked.

An extension of this bug/long-standing behavior is that this
also works when the e-mail name matches another list:

    echo "unsubscribe otherlist@corp.com" | mail fvwm-request

results in the sender (or other specified subscriber) being unsubscribed
from "otherlist" via mail sent to "fvwm-request". Talk about spooky
action at a distance!

IMO the fix is for Mj to complain when a default list name *and* a
list name on the command are both specified. It's ambiguous. Even if
we check to be sure the list names agree, we're allowing the case you
described above when the (intended) address matches the list name. The
"listname-request" alias is a sop to listserv users, but I think it's
invalid to specify the list name in that context. If so it should be
invalid for Mj as well.

But it's probably too confusing to have one syntax when mailing to
majordomo and another when mailing to list-request, so I'd have to agree
your proposed regexp is probably the best answer. As for what happens
when the regexp doesn't get set, default it to a regexp trimming
$whereami (and complain to $whoami_owner).

BTW, there's a regexp in valid_list that's going to way too much work:

    # clean up $clean_list
    $clean_list =~ s/[^-_0-9a-zA-Z]*//g;

This matches the null string between every character (when it doesn't
match the character). Make it this instead:

    $clean_list =~ s/[^-_0-9a-zA-Z]+//g;
				   ^      + instead of *

-- 
 Dave Wolfe    *Not a spokesman for Motorola*
 Motorola MMTG  6501 Wm. Cannon Dr. W. OE112  Austin  TX  78735-8598



Follow-Ups:
References:
Indexed By Date Previous: Re: Make problem in 1.94b2?
From: Jason L Tibbitts III <tibbs@hpc.uh.edu>
Next: Weird-ass "resend" bug du jour
From: "Roger B.A. Klorese" <rogerk@QueerNet.ORG>
Indexed By Thread Previous: Re: Obscure bug; input needed
From: Jason L Tibbitts III <tibbs@hpc.uh.edu>
Next: Re: Obscure bug; input needed
From: Jason L Tibbitts III <tibbs@hpc.uh.edu>

Google
 
Search Internet Search www.greatcircle.com