[Exim] SMTP Authentication

Pàgina inicial
Delete this message
Reply to this message
Autor: Søren Hansen
Data:  
A: exim-users
Assumpte: [Exim] SMTP Authentication
--
I'm quite new at Exim, and I'm having a bit of trouble getting SMTP
authentication to work.

Here are the relevant bits of exim.conf:

host_auth_accept_relay = *

plain:
driver = plaintext
public_name = PLAIN
server_condition = "${if
crypteq{$2}{${extract{1}{:}{${lookup{$1}lsearch{/etc/exim/passwd}{$value}{*:*}}}}}{1}{0}}"
server_set_id = $1

I want it to work with most clients. I haven't done SMTP authentication
before so I don't really know which are the most common mechanisms..

My /etc/exim/passwd contains but a single line:
sha:foo

I'm not sure how to interpret that server_condition (as I said, I'm
quite new to exim). I can hardly even break it into parts. This is my
guess:
${lookup{$1}lsearch{/etc/exim/passwd}{$value}{*:*}}

lsearch can look through text files. lookup calls lsearch and tells it
to search for a key $1. My guess is that $1 expands to the username
supplied in the SMTP AUTH string by the client, correct?
If so, the password "foo" is returned to extract. Extract returns the
first field seperated by ":"'s, which in this case is "foo", right?
Now this is crypteq'ed to $2, which I'm guessing is the password from
SMTP AUTH. So far so good.. What is /etc/exim/passwd supposed to look
like to make this work? I can't seem to figure it out.

--
Søren Hansen                    Linuxkonsulent I/S
Open source specialist          http://www.linuxkonsulent.dk
sha@???
--
Content-Description: Dette er en digitalt underskrevet brevdel


[ signature.asc of type application/pgp-signature deleted ]
--