[ 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 <firstname.lastname@example.org>, 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 email@example.com" | 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
> "<firstname.lastname@example.org>" being equivalent. This is nice behavior, (it
> allows people to send "subscribe email@example.com" 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 firstname.lastname@example.org" | 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