Re: [Exim] Problem with string expansion in transport

Góra strony
Delete this message
Reply to this message
Autor: Nico Erfurth
Data:  
Dla: Christian Kesselheim
CC: exim-users
Temat: Re: [Exim] Problem with string expansion in transport
Christian Kesselheim wrote:

> 32000 direct command:
> 32000 argv[0] = /usr/sbin/cyrdeliver
> 32000 argv[1] = -a

------------------------------------
> 32000 argv[2] = ${if
> 32000 argv[3] = eq{$local_part}{}{cyrus}{$local_part}}

------------------------------------
> 32000   argv[4] = -m
> 32000   argv[5] = ${substr_1:$local_part_suffix}
> 32000   argv[6] = --
> 32000   argv[7] = $local_part
> 32000 failed to expand: ${if
> 32000    error message: condition name expected, but found ""


Exim first splits the string by whitespaces in command-strings.

rewrite your expansion with doublequotes

/usr/sbin/cyrdeliver -a "${if eq{$local_part}{}{cyrus}{$local_part}}" \
-m ${substr_1:$local_part_suffix} -- $local_part

Nico


--
"Multiple exclamation marks," he went on, shaking his head,
"are a sure sign of a diseased mind." (Terry Pratchett, Eric)