RE: [Exim] SMTP AUTH concern

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Andy De Petter
Dátum:  
Címzett: randall ehren
CC: exim-users
Új témák: [Exim] multiple condition statements
Tárgy: RE: [Exim] SMTP AUTH concern
That seems to work fine here, but I have virtual domains..

shouldn't I be able to use ${domain}:$1 and ${local_part} to perform my
queries?

-a

> -----Original Message-----
> From: exim-users-admin@??? [mailto:exim-users-admin@exim.org]On
> Behalf Of randall ehren
> Sent: maandag 15 januari 2001 9:04
> To: Andy De Petter
> Cc: Phil Brutsche; exim-users@???
> Subject: RE: [Exim] SMTP AUTH concern
>
>
> here is my setup, also available at
> http://isber.ucsb.edu/~randall/exim-mysql/exim/configure
>
> the passwords are stored using mysql's ENCRYPT function, same as unix
> crypt.
>
> # matt dunham
> #  mod by: randall s. ehren 20001108 - do user lookups for smpt
> authentication
> plain:
>   driver = plaintext
>   public_name = PLAIN
>   server_condition = "${if and { \
>                         {!eq{$2}{}} \
>                         {!eq{$3}{}} \
>                         {crypteq{$3}{${lookup mysql{SELECT password FROM
> users WHERE login='$2'}{$value}fail}}} \
>                         } {yes}{no}}"
>   server_set_id = $2

>
> # login authenticator - here $1 is the userid and $2 is the
> password. otherwise all else is
> # the same as above
>
>
> login:
>   driver = plaintext
>   public_name = LOGIN
>   server_prompts = "Username:: : Password::"
>   server_condition = "${if and { \
>                         {!eq{$1}{}} \
>                         {!eq{$2}{}} \
>                         {crypteq{$2}{${lookup mysql{SELECT password FROM
> users WHERE login='$1'}{$value}fail}}} \
>                         } {yes}{no}}"
>   server_set_id = $1

>
>         - randall s. ehren -=- 805 893-5632
>            system administrator -=- isber.ucsb.edu
>         institute for social, behavioral, and economic research
>          randall.cell@???

>
> On Mon, 15 Jan 2001, Andy De Petter wrote:
>
> >
> > Hello,
> >
> > I've tried this now:
> >
> > ----------
> > plain:
> >     driver = plaintext
> >     public_name = PLAIN
> >     server_condition = "\
> >         ${if crypteq{$3}{${lookup mysql
> {QUERY_SMTP_AUTH_PLAIN} {$value}fail}}
> > {yes}
> > {no}}"
> >     server_set_id = $2

> >
> > login:
> >     driver = plaintext
> >     public_name = LOGIN
> >     server_prompts = "Username:: : Password::"
> >     server_condition = "\
> >         ${if crypteq{$2}{${lookup mysql
> {QUERY_SMTP_AUTH_LOGIN} {$value}fail}}
> > {yes}
> > {no}}"
> >     server_set_id = $1
> > ----------

> >
> > with the following queries:
> >
> > QUERY_SMTP_AUTH_PLAIN = SELECT DISTINCT password FROM
> MYSQL_AUTHTABLE WHERE
> > MYSQL_DOMAINFIELD LIKE '${domain:$2}' AND MYSQL_USERNAMEFIELD LIKE
> > '${local_part:$2}' AND MYSQL_ISALIASFIELD='no'
> >
> > QUERY_SMTP_AUTH_LOGIN = SELECT DISTINCT password FROM
> MYSQL_AUTHTABLE WHERE
> > MYSQL_DOMAINFIELD LIKE '${domain:$1}' AND MYSQL_USERNAMEFIELD LIKE
> > '${local_part:$1}' AND MYSQL_ISALIASFIELD='no'
> >
> > but now I can't authenticate at all... I get the error:
> >
> > 435 Unable to authenticate at presetn: "lookup" failed, and "fail"
> > requested: MYSQL: no data found
> >
> > At first I'ld say, that the query doesn't give any results
> back, but when I
> > change the query to:
> >
> > QUERY_SMTP_AUTH_PLAIN = SELECT DISTINCT password FROM
> MYSQL_AUTHTABLE WHERE
> > MYSQL_DOMAINFIELD LIKE 'krameria.net' AND MYSQL_USERNAMEFIELD LIKE
> > 'test' AND MYSQL_ISALIASFIELD='no'
> >
> > it still doesn't work (and I get results, when executing the
> query manually
> > on my mysql client)..
> >
> > any ideas?
> >
> > -Andy
> >
> > --
> > ......................................................................
> > :                                                                    :
> > :                           Andy De Petter <adepette@???>   :
> > :    Skynet   NV/SA                                System Engineer   :
> > :                                                                    :
> > : Kol. Bourgstraat 124          _,'|            _.-''``-...___..--'; :
> > :    1140  Brussels            /, \'.      _..-' ,      ,--...--'''  :
> > :                             < \   .`--'''      `     /|            :
> > :   IPv6 ADP17-6BONE           `-,;'              ;   ; ;            :
> > :    ICQ # 1548957        __...--''     __...--_..'  .;.'            :
> > :                        (,__....----'''      (,..--''               :
> > : http://www.skynet.be                                               :
> > ......................................................................

> >
> > The opinions expressed are personal.
> >
> >
> >
> > --
> > ## List details at

http://www.exim.org/mailman/listinfo/exim-users Exim details at
http://www.exim.org/ ##
>



--
## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
details at http://www.exim.org/ ##