Re: [exim] Allow user%domain auth

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Daniel Tiefnig
日付:  
To: exim-users
題目: 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