Re: [exim] (bez temata)

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Jakob Hirsch
日付:  
To: Matiss
CC: exim-users
題目: Re: [exim] (bez temata)
Matiss wrote:

> My question is - can exim do multiple user authentication lookups?


Sure. server_condition is expanded, so you can use the power of Exim's
string expansion to use there as many lookups as you like (and as fit in
your memory), e.g. if you want to authenticate *@example.com with ldap
and everything else with mysql (using the LOGIN authenticator):

server_condition = ${if eq{${domain:$auth1}{example.com}} \
{ldap-lookup...} \
{mysql-lookup...} }

or even write the lookups you want into a file like

example.com: ${ldap-lookup...}
example.net: ${mysql-lookup...}

and use

server_condition = ${lookup {/path/to/auth-lookup-file} \
lsearch {${domain:$auth1}} \
{${expand:$value}} fail}

(all untested, of course)

Don't forget to check the corner cases (empty user or password,
non-existant user etc.) so nobody can send mail without proper
authentication.