I've set up pam-pgsql to lookup passwords in my database for Postfix via Saslauthd.
I can test credentials using the command line:
$ sudo testsaslauthd -u user@email.com -p password
0: NO "authentication failed"
Authentication will fail, and I don't know why.
$ sudo tail /var/log/auth.log
Feb 5 15:33:12 saslauthd[7460]: pam_unix(imap:auth): check pass; user unknown
Feb 5 15:33:12 saslauthd[7460]: pam_unix(imap:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
Feb 5 15:33:14 saslauthd[7460]: DEBUG: auth_pam: pam_authenticate failed: Authentication failure
Feb 5 15:33:14 saslauthd[7460]: do_auth : auth failure: [user=user@email.com] [service=imap] [realm=] [mech=pam] [reason=PAM auth error]
How can I know what pam-pgsql is doing? How can I get more helpful messages?