Re: [Exim] Virtual domains and plain/login authentication

Top Page
Delete this message
Reply to this message
Author: Tamas TEVESZ
Date:  
To: romero
CC: exim-users
Subject: Re: [Exim] Virtual domains and plain/login authentication
On Thu, 27 Jun 2002, [iso-8859-1] Víctor Romero wrote:

 >         The wrong thing come here: I put it the following in the login: section

>
 > login:
 >    driver = plaintext
 >    public_name = LOGIN
 >    server_prompts = "Username:: : Password::"
 >    server_condition = "${if
 > crypteq{$2}{${extract{1}{:}{${lookup{$1}lsearch{/etc/virtual-domains/${domain}/passwd}{$value}{*:*}}}}}{1}{0}}"
 >    server_set_id = $1

>
 >     ( Note the ${domain} in the server_condition )

>
 >     I think it should work but I get the this log :

>
> 2002-06-27 13:46:13 Authentication failed for pasarela2.bingdata.net (victor)
> [213.0.106.196]:
> 435 Unable to authenticate at present: failed to open
> /etc/virtual-domains//passwd for linear s
> earch: No such file or directory
>
>
 >     I presume the variable ${domain} its not present in the login namespace so I
 > wonder if theres a way to do this thing...


you've gone wrong at an important place here (at least, that's what i
think. it's a common enough problem, that makes me presume that ;)

{${extract{1}{:}{${lookup{$1}lsearch{/etc/virtual-domains/${domain}/passwd}{$value}{*:*}}

if your password file looks like

    username:(encrypted)password


which i suppose it does, then this extract{} stuff is most irrelevant
here. i once posted a verbose-ish explanation why it is so, you might
want to search for that. (fact is i'm too lazy to look for it myself
or write it again :) in short, don't extract. just lsearch.

wrt $domain being present, i think it's not there, you're right in
this point. authentication goes by usernames and passwords. you don't
even know (hence you can't have) the domain at the auth stage.


--
[-]