RE: [Exim] rewriting

Etusivu
Poista viesti
Vastaa
Lähettäjä: Philip Hazel
Päiväys:  
Vastaanottaja: John Horne
Kopio: exim-users
Aihe: RE: [Exim] rewriting
On Mon, 25 Oct 1999, John Horne wrote:

> On 24-Oct-99 at 12:34:55 Alexander Koch wrote:
> > After I have come to think Exim rewriting things just rock,
> > I have a problem I cannot solve, it seems.
> >
> > I have several subdomains, namely (.*).bwev.org and I want
> > $1 be looked up in a plain file (lsearch). I have a
> > smartuser director here that won't work.
> >
> >|subdomain:
> >|  driver        = smartuser
> >|  domains       = "*.bwev.org"
> >|  new_address  = ${if match{ ${domain} } {(.*)\.bwev\.org} \
> >|     { ${lookup {$1} lsearch {/etc/exim/subdomains} {$value} } }
> >|  no_more

> >
> I would say add one more '}' to the end. It looks like the 'if' isn't
> terminated correctly - hence expecting an 'else'.


And think about those \ characters. The new_address option is expanded,
so you need to write \\. instead of \. inside the regex. Also the spaces
inside { ${domain} } will be present, though it doesn't look as though
that will matter.



-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Government Policy: If it ain't broke, fix it till it is.