Re: [Exim] PGsql lookup - strange behaviour ?

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Philip Hazel
日付:  
To: Robert Gomulka
CC: exim-users
題目: Re: [Exim] PGsql lookup - strange behaviour ?
On Mon, 16 Jul 2001, Robert Gomulka wrote:

> db_user:
>     driver = aliasfile
>     domains = "pgsql;select domains from domain where domain='$key'"
>     search_type = pgsql
>     query="select name from aliasmail where name='$local_part' and
> domain='$domain'"
>     transport = db_deliver

>
> db_deliver:
>     driver = aliasfile
>     domains = "pgsql;select domain from domains where domain='$key'"
>     search_type = pgsql
>     query="select name from aliasmail where alias='$local_part' and
> domain='$domain'"
>     qualify_preserve_domain

>
> THAT WORKS. But why do I have 2 so similar drivers?


What are you trying to achieve? I am not an SQL expert (I know almost
nothing) but it looks to me as though what you want is an SQL statement
that says

search the aliasmail table for an entry where EITHER name=$local_part
OR alias=$local_part, and if you find it, select the name field

I don't know how you write this in SQL, but surely there is a way to
write it as a single query?


Hmm. Perhaps the problem is quite different. I see that on the first
director you have set transport=db_deliver, but on the second one you
have not. Have you understood how aliasfile works when it has a
transport setting? It is not usual to set a transport on an aliasfile
director.


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