Re: [Exim] mysql lookup for relay_domains

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Philip Hazel
日付:  
To: Nigel Cass
CC: exim-users
題目: Re: [Exim] mysql lookup for relay_domains
On Fri, 28 Jul 2000, Nigel Cass wrote:

> Surely if we're after setting relay domains and the table holds a list
> of all of them............
>
> Our query is just.....
>
> Select * FROM Domains
>
> we don't need a WHERE clause because we want them all anyway.....


> > relay_domains = mysql;select Domain from Domains where Domain="$key"


No. You are thinking that relay_domains is like an expanded string which
ends up with a list of domains to be tested. It ain't like that;
relay_domains is a list of items against which the current domain is
tested. The setting above means "run this lookup; if you get an answer,
the domain is a relay domain". If you ran your query instead, it would
always succeed, so the answer would always be "yes".

It's this way because it is an extension from the index lookup methods
that Exim had first of all. You are doing a probe for a single domain,
not looking up a list.

It is true you don't need "select Domain" - any old "select xxx" would
do, since the data that is returned is ignored. It is the "where" clause
that is vital.


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