Re: [Exim] Problem with string expansion in transport

Top Pagina
Delete this message
Reply to this message
Auteur: Andreas Metzler
Datum:  
Aan: exim-users
CC: Christian Kesselheim
Onderwerp: Re: [Exim] Problem with string expansion in transport
On Fri, Oct 03, 2003 at 05:54:50PM -0000, Christian Kesselheim wrote:
> I got a strange problem with string expansion in exim4 (ver. 4.22) on
> Debian 3.0 (woody). The following transport produces a string expansion
> error during runtime, but not if evaluating the corresponding section
> via "exim -be" directly:


> local_cyrus_pipe:
> debug_print = "T: handed over to cyrus via pipe for $local_part@$domain
> (suffix: $local_part_suffix)"
> driver = pipe
> command = /usr/sbin/cyrdeliver -a ${if eq{$local_part}{}{cyrus}{$local_part}}
> -m ${substr_1:$local_part_suffix} -- $local_part

[...]
> Expansion of "${if" from command "/usr/sbin/cyrdeliver -a ${if
> eq{$local_part}{}{cyrus}{$local_part}} -m ${substr_1:$local_part_suffix}
> -- $local_part" in local_cyrus_pipe transport failed: condition name
> expected, but found ""

[...]

Quoting spec.txt:
| The command is split up into separate arguments by Exim, and each
| argument is separately expanded, as described in section "How the
| command is run" above.

[...]
following up the reference, yields to:
| The expansion is applied to each argument in turn rather
| than to the whole line. For this reason, any string expansion item
| that contains white space must be quoted so as to be contained within a
| single argument. A setting such as

|
|      command = /some/path ${if eq{$local_part}{postmaster}{xxx}{yyy}}

|
| will not work, because the expansion item gets split between several
| arguments. You have to write

|
|      command = /some/path "${if eq{$local_part}{postmaster}{xxx}{yyy}}"


           cu andreas