On Sat, May 25, 2002 at 11:04:58PM +0200, Florian Weimer wrote:
> The following transport
>
> | list_subscribe_transport:
> | driver = pipe
> | user = MAILMAN_USER
> | group = MAILMAN_GROUP
> | current_directory = MAILMAN_HOME
> | home_directory = MAILMAN_HOME
> | log_output
> | command = /usr/local/sbin/ezmlm-to-mailman \
> | ${sg{$local_part}{-(?:un)?subscribe\$}{}} \
> | $domain \
> | ${sg{$local_part}{^.*-}{}}
>
> is invoked with "authors-subscribe" for $local_part.
>
> Enabling debugging reveals that
>
> | direct command:
> | argv[0] = /usr/local/sbin/ezmlm-to-mailman
> | argv[1] = ${sg{$local_part}{-(?:un)?subscribe\$}{}}
> | argv[2] = $domain
> | argv[3] = ${sg{$local_part}{^.*-}{}}
>
> is expanded to:
>
> | direct command after expansion:
> | argv[0] = /usr/local/sbin/ezmlm-to-mailman
> | argv[1] = authors
> | argv[2] = lists.cert.uni-stuttgart.de
> | argv[3] = authors
>
> while I would have expected:
>
> | direct command after expansion:
> | argv[0] = /usr/local/sbin/ezmlm-to-mailman
> | argv[1] = authors
> | argv[2] = lists.cert.uni-stuttgart.de
> | argv[3] = subscribe
>
> Is my expectation wrong? If yes, why?
I think i understand that's happening.
Your first search-replace modifies tha $local_part variable (unfortunately)
so that when you work with it again, its value is already "subscribe"
You can verify this by replacing
${sg{$local_part}{^.*-}{}}
with just $local_part
I'm afraid I don't have a solution to your problem though, you'd somehow
have to make a copy of local_part before you start applying a substitution
to it.
Marc
--
Microsoft is to operating systems & security ....
.... what McDonalds is to gourmet cooking
Home page:
http://marc.merlins.org/ | Finger marc_f@??? for PGP key