Re: [Exim] SQL-based SMTP AUTH.

Top Pagina
Delete this message
Reply to this message
Auteur: Eric Renfro
Datum:  
Aan: exim-users
Onderwerp: Re: [Exim] SQL-based SMTP AUTH.
On Wednesday 23 October 2002 01:19 pm, Eric Renfro wrote:
> On Wednesday 23 October 2002 11:36 am, Matt Bernstein wrote:
> > At 10:49 -0500 Eric Renfro wrote:
> > >I'm trying to switch from using LDAP-based user SMTP AUTH, to
> > > PgSQL-based lookup AUTH.
> > >
> > >My current authenticators are like:
> >
> > begin authenticators
> >
> > cram_md5:
> > driver = cram_md5
> > public_name = CRAM-MD5
> > server_secret = ${lookup pgsql{select password from member where
> > username='$1'}{$value}fail} server_set_id = $1
>
> But CRAM-MD5 seems to be very picky. My original query was as follows:
>
> dbmail_cram:
>   driver = cram_md5
>   public_name = CRAM-MD5
>   server_secret = \
>     ${if eq{$1}
>       {${lookup pgsql \
>           {SELECT userid FROM users WHERE userid = '${quote_pgsql:$1}'} \
>       }}
>       {${lookup pgsql \
>           {SELECT passwd FROM users WHERE userid = '${quote_pgsql:$1}'} \
>       }}
>     fail}
>   server_set_id = $1

>
> And, that worked, only for the first time, for the first user that authed.
>
> Once I saw this reply, I tried out your method, and it's doing the very
> exact same thing. Succeeding once, and failing any further time.


Correction:

The first CRAM-MD5 AUTH works for the first user that attempts it. After that,
the same user, or any other user can't AUTH and succeed, with CRAM-MD5.
Waiting ~10 minutes and trying again, and it begins working, once.

Seems like a cache problem?

--
Eric Renfro
Myrddin Computers & Designs - CEO/President
Sales: sales@???
Fax: (775) 243-4535