Sergio Basurto Juarez wrote:
> I need help with smtp authentication in exim, the
> question is because is not clear how to implement
> cram_md5 with postgresql, the specific questions are
> as follow:
Exim does not care, how your database, table or columns are named. You
tell Exim how it can get the password, that's all what Exim needs. And
you tell Exim the data to acces the db-server (host, user, password,
database), it will connect to it when it needs to.
I have this running with mysql, but the database should not really matter:
hide mysql_servers = /vmail/exim/xxxxxxxx
[...]
begin authenticators
cram_md5:
driver = cram_md5
public_name = CRAM-MD5
server_secret = ${lookup mysql{ \
select password from popbox \
where local_part = '${quote_mysql:${extract {1}{@%!}{$1}}}' \
and domain_name = '${quote_mysql:${extract {2}{@%!}{$1}}}' \
}{$value}{fail}}
server_set_id = $1
This is for users that authenticate with "user!domain" (virtualmail
setup), the lookup will be even simpler if you will have only username
and password in your database.
And remember that for cram-md5 you need to have the plaintext password
in your database.