Re: [Exim] MySQL Authentication

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Dan Egli
日付:  
To: Matt Bernstein
CC: exim-users
題目: Re: [Exim] MySQL Authentication
I'm not 100% sure what Crypteq does but I think so. I can run with a
password file using crypteq just fine. And the password file is created
using the system Crypt() call, which is what (porportedly) the MySql
Encrypt() function does, pass the string to Crypt() and return the result.
Here's what I do to add users to a simple password file:
fprintf(pwfile, "%s:%s\n", argv[1], crypt(argv[2], "a7"));

Note that the a7 is a "salt:" (randomizer/key for the encryption sequence).
Crypteq{} works grand on this file. But when I try it from MySQL, it bombs.

And yes I meant AuthMail='Y' :> Didn't take my finger off the shift enough
:>

----- Original Message -----
From: "Matt Bernstein" <mb@???>
To: "Dan Egli" <dmegli@???>
Cc: <exim-users@???>
Sent: Tuesday, March 26, 2002 1:37 AM
Subject: Re: [Exim] MySQL Authentication


> On Mar 25 Dan Egli wrote:
>
> >a sample user would look like:
> >-------------------------------------
> >| bitwize | Y | 25M | jk76asd523 |
> >--------------------------------------
> >
> >the passwd is encrypted using the Encrypt() function in MySql. But I am
> >unable to get Exim to accept the password. When I try testing the SMTP

AUTH
> >exim always returns authentication failure. Here is what I am trying to

use
> >as my auth lookup line:
> >
> >server_condition = "${if crypteq{$2} \
> >            {${lookup mysql{SELECT passwd \
> >                     FROM users \
> >                     WHERE AuthMail = "Y" and
> >userID='${local_part:$1}'}}}{1}{0}}"

>
> 1. Does MySQL Encrypt() do the same as crypteq{} ? If you were to store
>    the passwords in plaintext (and implement good security on that table)
>    you could also use AUTH CRAM-MD5, as well as trivialising the others.

>
> 2. Presumably you mean AuthMail = 'Y'
>
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim

details at http://www.exim.org/ ##
>
>
>