Re: [exim] Double quotes in transport command

Page principale
Supprimer ce message
Répondre à ce message
Auteur: John Robinson
Date:  
À: Marcin Krol
CC: exim-users
Sujet: 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.