Re: [exim] second condition in plaintext AUTH

Etusivu
Poista viesti
Vastaa
Lähettäjä: Peter Bowyer
Päiväys:  
Vastaanottaja: Exim, Users
Aihe: Re: [exim] second condition in plaintext AUTH
On 24/08/06, John Burnham <jpb15@???> wrote:
> Use a lookup of some type. Here's an example:
>
> login:
>  driver = plaintext
>  public_name = LOGIN
>  server_prompts = "Username:: : Password::"
>  server_condition = "\
>                      ${if and { \
> {eq{$1}{${lookup pgsql{select username from eximdata where username ='$1'}}}} \
> {eq{$2}{${lookup pgsql{select password from eximdata where username ='$1'}}}} \
> }{yes}{no}}"
>  server_set_id = $1

>
> Probably not the most efficient way of doing things (and the password is stored
> unecrypted in the database table), but it should give you an idea of where to
> start looking.
> John


Don't forget that you need to specifically fail the auth on a blank
username. That query will probably authenticate a blank username and
blank password.

Peter

--
Peter Bowyer
Email: peter@???