Re: [Exim] Syntax has me stumped

Pàgina inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
A: Marc Perkel
CC: exim-users
Assumpte: 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.