On 24/08/06, John Burnham <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]

-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to