Re: [Exim] Need help with smtp/authentication / using passwd…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: Terry Shows
CC: exim-users
Tárgy: Re: [Exim] Need help with smtp/authentication / using passwd file
On Mon, 15 Sep 2003, Terry Shows wrote:

> I have the following in my config file:
> ---------- clip -----------------
> authenticate_users:
>    driver = plaintext
>    public_name = LOGIN
>    server_prompts = Username:: : Password::
>   server_condition = "${if crypteq
> {${lookup{$1}lsearch{/etc/passwd}{$value}fail
> }} {$2} {yes} {no}}"
>    server_set_id = $1
> ------------- end clip -----------------

>
> All attempts fail with the following message:
>    2003-09-15 14:07:02 authenticate_users authenticator failed for
> terry.csstnlocal
> .com (terry) [192.168.1.100]: 535 Incorrect authentication data
> (set_id=terry.shows)

>
> I can successfully do this using plain text files, so I know my condition is
> right. All I changed was the "eq" to a "crypteq" and the password file to
> "/etc/passwd". I would prefer not to keep two separate password files (one
> for smtp, and another for pop3)


Others have commented on the wisdom of keeping passwords in /etc/passwd.
I will confine myself to the actual problem: the result of your ${lookup
is going to be the complete data from the password line, not just the
password. You need to use a ${extract item to extract the first item
(the password).

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book