Re: [Exim] Syntax has me stumped

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Marc Perkel
Dátum:  
Címzett: exim-users
Tárgy: Re: [Exim] Syntax has me stumped
Thanks - here's what actually worked.

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



Philip Hazel wrote:

> 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.