Re: [Exim] Syntax has me stumped

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Philip Hazel
Data:  
Para: Marc Perkel
CC: exim-users
Asunto: Re: [Exim] Syntax has me stumped
On Fri, 5 Oct 2001, Marc Perkel wrote:

> file = ${extract{5}{:}{${lookup \
> {$local_part}lsearch{/etc/vmail/passwd.$domain}{"{$value}.forward"}}}}
>
> What I'm trying to do is a lookup and extract (does work) and append
> ".forward" onto the value extracted and set file = to that value. I
> can't get the command right.


Hmm. Let's split that up:

file = ${extract{5}{:}\
          {\
          ${lookup{$local_part}lsearch{/etc/vmail/passwd.$domain}\
            {"{$value}.forward"}}\
          }\
        }


It's syntactially OK, but the output will be something like

"{/home/xxx}.forward"

which is not what you want. You don't want those curlies in there.

Actually, you don't need the quotes, and you can make this all much
simpler:

file = ${extract{5}{:}\
          {\
          ${lookup{$local_part}lsearch{/etc/vmail/passwd.$domain}}\
          }\
        }.forward


Have you discovered the -be option? If you'd tried your string using
that, you would have spotted the error immediately.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.