Re: [Exim] bug in transport-filter parsing?

Pàgina inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
A: Jeremy Harris
CC: exim-users @ exim. org
Assumpte: Re: [Exim] bug in transport-filter parsing?
On Sun, 15 Aug 2004, Jeremy Harris wrote:

> [Philip Hazel]
>> That's because the quotes are taken as part of the setting of the string
> value of the option. If you want quotes at the start and end of the value of
> an
>> option, you need
>>
>> transport_filter = "\"....\""
>
> Fine, but doesn't help me: it quotes the entire command-line I
> retrieved with the lookup - so it's all argv[0].


So put the internal \" where you want it, instead of at the end. :-)

transport_filter = "\"arg0...\" arg1 arg2"

or whatever.

Alternatively, you can use single quotes if you don't need any escaping
within the string. (See documentation for the "command" option of the
pipe transport (29.2) - the documentation for "transport_filter" points
out that it is handled in the same way.) In other words, it's all in TFM
if you know where to look...

> It seems to me that the split into argv is being done too early,
> before expanding the string. Shouldn't it be done last?


No. The split happens first so that the result of an expansion cannot
affect the number of arguments. Each argument is separately expanded.

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book