[Exim] EXIM AUTHENTICATORS

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Javier Callico
Datum:  
To: exim-users
Betreff: [Exim] EXIM AUTHENTICATORS
Hi Everybody

I'm using Exim 3.2 with MySql. I want to enable SMTP authentication.

I found 2 examples I thought can work for me but they don't.

Can anybody sent me or tell where to find an implementation of the login and
plain authenticators for Exim 3.2

The first example always accepts my emails no matter the user name or
password I'm using:

plain:
driver = plaintext
public_name = PLAIN
server_condition = "${if and {{!eq{$2}{}}{!eq{$3}{}}
{crypteq{$3}{${extract{2}{:} {${lookup mysql{select password_hash from
popbox where mbox_name = '${local_part:$2}' and domain_name =
'${domain:$2}'} {$value}{fail}}}}}}}{1}{0}}"
server_set_id = $2

login:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:::Password::"
server_condition = "${if and {{!eq{$1}{}}{!eq{$2}{}} \
{crypteq{$2}{${extract{2}{:} \
{${lookup mysql{select password_hash from popbox where mbox_name =
'${local_part:$1}' and domain_name = '${domain:$1}'} \
{$value}{fail}}}}}}}{1}{0}}"
server_set_id = $1

The second example always fails:

plain:
driver = plaintext
public_name = PLAIN
server_condition = "${if and { {!eq {$2}{}} {!eq {$3}{}} {eq
{\\{plaintext\\}$3}{${lookup mysql { select password_hash from popbox where
local_part='${extract {1}{@%!}{$2}}' and domain_name='${extract
{2}{@%!}{$2}}' }{$value}{*:*}}}}}{1}{0}}"
server_set_id = $2

login:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:::Password::"
server_condition = "${if and { {!eq {$1}{}} {!eq {$2}{}} {eq
{\\{plaintext\\}$2}{${lookup mysql { select password_hash from popbox where
local_part='${extract {1}{@%!}{$1}}' and domain_name='${extract
{2}{@%!}{$1}}' }{$value}{*:*}}}}}{1}{0}}"
server_set_id = $1


Any idea or suggestions ?

Thanks in advance

Javier