Re: [exim] Allow user%domain auth

Top Page
Delete this message
Reply to this message
Author: Daniel Tiefnig
Date:  
To: exim-users
Subject: Re: [exim] Allow user%domain auth
Konstantin Kletschke wrote:
> On my setup I have user/pass in the courier SQL database doupled, one
> user name with @, one with %

[...]
> But may be, there is a possibility to do this more elegant...


Sure, one can use an authenticator like this:

driver = plaintext
public_name = PLAIN
server_prompts = :
server_condition = \
   ${if crypteq {$3}\
     {${lookup mysql{ \
       SELECT password FROM table \
        WHERE username='${quote_mysql:${extract{1}{[@%]}{$2}}}' \
          AND domain='${quote_mysql:${extract{2}{[@%]}{$2}{$value}{}}}'}\
       {$value}} } {1}{0}}
server_set_id = $2


The SQL differs a little bit, but I think the idea is clear.


lg,
daniel