Sample for authentication {Re: [Exim] (no subject)}

Pàgina inicial
Delete this message
Reply to this message
Autor: Christian Vogel
Data:  
A: exim-users
Assumptes vells: [Exim] (no subject)
Assumpte: Sample for authentication {Re: [Exim] (no subject)}
Hi,

all our users are stored in a MySQL database, this is what we use
on the exim side:

On Thu, Jul 01, 2004 at 05:05:45PM -0400, Ravi wrote:
> can anybody provide me exim mail relay authentication script that i can
> use so e-mail clients ( both outlook & netscape) can get mails.


# get encrypted password from DB, $1="user@host" (for LOGIN
# authentication)
SQL_POP_AUTH_1 = ${lookup mysql{SELECT password FROM pop WHERE \
        username='${quote_mysql:${extract{1}{@#}{$1}}}' AND \
        domain='${quote_mysql:${extract{2}{@#}{$1}}}'}{$value}{fail}}


# get encrypted password from DB, $2="user@host" (for PLAIN
# authentication)
SQL_POP_AUTH_2 = ${lookup mysql{SELECT password FROM pop WHERE \
        username='${quote_mysql:${extract{1}{@#}{$2}}}' AND \
        domain='${quote_mysql:${extract{2}{@#}{$2}}}'}{$value}{fail}}


auth_plaintext:
        driver = plaintext
        public_name = PLAIN
        server_condition = ${if crypteq{$3}{SQL_POP_AUTH_2}{yes}{no}}
        server_set_id = $2


auth_login:
        driver = plaintext
        public_name = LOGIN
        server_prompts = "Username:: : Password::"
        server_condition = ${if crypteq{$2}{SQL_POP_AUTH_1}{yes}{no}}
        server_set_id = $1



Chris


--
Christian Vogel -- chris@???