Re: [exim] (bez temata)

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Jakob Hirsch
Datum:  
To: Matiss
CC: exim-users
Betreff: 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.