Re: [Exim] Router error

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Philip Hazel
Data:  
Para: Vadim Vygonets
CC: exim-users
Asunto: Re: [Exim] Router error
On Thu, 4 Nov 1999, Vadim Vygonets wrote:

> Quoth robert rotman on Wed, Nov 03, 1999:
> >   domains = ${lookup mysql{select domain from mail_adm where 
> >                            domain='${domain}'}{$value}fail}

> >
> > lookuphost_mysql router: failed to expand "${lookup mysql{select domain
> > from mail_adm where domain='${do
> > main}'}{$value}fail}" lookup failed and "fail" requested: MYSQL: no data
> > found
>
> Try to remove the word "fail":
>   domains = ${lookup mysql{select domain from mail_adm where 
>                            domain='${domain}'}{$value}}


I don't quite understand what you are doing here. The value of "domains"
is a list of domains; what you have done is to look up the current
domain and use the result as a list of domains. Since you have selected
domain, I suppose this does in fact work when the domain exists, as it
returns its own name, which will then match. So omitting "fail" will
work because the list of domains will then be empty when the domain
doesn't exist.

However, a slightly simpler syntax can be used when you merely want to
accept the domain if it can be found by a lookup (not paying any
attention to the value of the lookup):

domains = mysql;select domain from mail_adm where domain='${key}'

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