[Exim] authentication with shadow passwd files

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: bhoc
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [Exim] authentication with shadow passwd files
Not that this subject is completely new;
I don't mind having two separate password databases (one for exim, one for
the system) - in fact I played around with a cron job that exported
entries from /etc/shadow to /etc/exim/auth which works okay for me.

OTOH, I don't want user accounts for each and every host_auth_accept_relay
user (this is a mail hub anyway) and I just created the auth file from
scratch. In mini_httpd (www.acme.com/software/mini_httpd) there's a nice
cgi-able htpasswd program that collaborates like a charm with exim.
(wouldn't it be nice to put something like that into the distribution, say
as exim_passwd or so?)

For your reference, here a snipped from my exim.conf:

plain:
  driver = plaintext
  public_name = PLAIN
  server_condition = "\
    # $2 = Username | $3 = password
    ${if and {{!eq{$2}{}}{!eq{$3}{}} \
    {crypteq{$3}{${extract{1}{:} \
    {${lookup{$2}lsearch{/etc/exim/auth}{$value}{*:*}}}}}}}{1}{0}}"
  server_set_id = $2


login:
  driver = plaintext
  public_name = LOGIN
  server_prompts = "Username:: : Password::"
  server_condition = "\
    # $1 = Username | $2 = password
    ${if and {{!eq{$1}{}}{!eq{$2}{}} \
    {crypteq{$2}{${extract{1}{:} \
    {${lookup{$1}lsearch{/etc/exim/auth}{$value}{*:*}}}}}}}{1}{0}}"
  server_set_id = $1


--Ben (tictactux at surfeu in ch)