[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

exim4 smtp auth via libpam-dotfile



Hi

I tried to make exim4 smtp auth against libpam-dotfile with no success. Is it suppoused to work? I used the following auth exim4 configuration (suggested in exim documentation):

plain:
   driver = plaintext
   public_name = PLAIN
   server_prompts = :
   server_condition = "${if pam{$2:${sg{$3}{:}{::}}}{1}{0}}"
# I also tried
# server_condition = "${if pam{$2:$3}{1}{0}}"
   server_set_id = $2


login:
  driver = plaintext
  public_name = LOGIN
  server_prompts = "Username:: : Password::"
  server_condition = "${if pam{$1:${sg{$2}{:}{::}}}{1}{0}}"
# I also tried
# server_condition = "${if pam{$1:$2}{1}{0}}"
  server_set_id = $1

It seems that authorization takes place, I got following line in my auth.log:

Sep 11 03:03:08 103 exim(pam_dotfile)[769]: debug|no_warn|compat05
Sep 11 03:03:08 103 exim(pam_dotfile)[769]: Helper started
Sep 11 03:03:08 103 exim(pam_dotfile)[769]: Searching file for service exim
Sep 11 03:03:08 103 exim(pam_dotfile)[769]: Authentication successful for user <validusername> Sep 11 03:03:08 103 exim(pam_dotfile)[769]: Helper exiting with return value 0
Sep 11 03:03:08 103 exim(pam_dotfile)[768]: Helper returned 0
Sep 11 03:03:08 103 exim(pam_dotfile)[768]: Authentication with user password sucessful

But exim rejects the mail with following  messages:
...
 1618 250-SIZE 52428800
 1618 250-PIPELINING
 1618 250-AUTH PLAIN LOGIN
 1618 250 HELP
 1618 Calling gnutls_record_recv(8126f70, 81290c0, 4096)
 1618 SMTP<< AUTH PLAIN AHN<somestring>=
 1618 Running PAM authentication for user "validusername"
1618 PAM error: Authentication service cannot retrieve authentication info.
 1618 plain authenticator:
 1618   $1 =
 1618   $2 = <validusername>
 1618   $3 = <validpassword>
1618 expansion failed: Authentication service cannot retrieve authentication info.
 1618 SMTP>> 435 Unable to authenticate at present
 1618 tls_do_write(8102ef8, 39)
 1618 gnutls_record_send(SSL, 8102ef8, 39)
 1618 outbytes=39
 1618 LOG: MAIN REJECT
1618 plain authenticator failed for p508e956a.dip.t-dialin.net (hurd.homeunix.org) [80.142.149.106]: 435 Unable to authenticate at present (set_id=<username>): Authentication service cannot retrieve authentication info.

What is going wrong?
I am running current unstable:
exim4                     4.22-4
libpam-dotfile         0.6-4

$ cat /etc/pam.d/exim
#%PAM-1.0
auth [success=done new_authtok_reqd=done authinfo_unavail=ignore default=die] pam_dotfile.so no_warn debug auth [success=done new_authtok_reqd=done default=die] pam_unix.so use_first_pass debug
--
Best regards, Sergey Spiridonov





Reply to: