Re: [exim] Double quotes in transport command

Startseite
Nachricht löschen
Nachricht beantworten
Autor: John Robinson
Datum:  
To: Marcin Krol
CC: exim-users
Betreff: Re: [exim] Double quotes in transport command
On 07/01/2008 15:35, Marcin Krol wrote:
> Hello everyone,
>
> I'm trying to pass mail subject to the transport command:
>
> command = /etc/domeny/mailfilter.cmd  -j \"$h_subject\"    -u  ${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}} ...

>
> What I get as an argument to mailfilter.cmd, however, is one double quote!
>
> -j " -u da7
>
> ? Just why does it do that?
>
> If I delete backslashed doublequotes, the $h_subject variable gets expanded as expected, but I need to quote it to be passed as single argument in case subject contains whitespace characters.
>
> Docs say:
>
>     If an argument appears in double quotes, backslash is interpreted as an escape character in the usual way.

>
> But even if I use
>
> -j "\"$h_subject\""
>
> ..the effect is still the same.


I don't think the quotes need backslashed, but you probably do need to
terminate the $h_ expansion - there isn't a header subject": so you
might try blah -j "$h_Subject:" -u etc.

Cheers,

John.