smtp auth, postfix+sasl+pam - authentication failure

When using Postfix with SASL authentication, the service field of the SASL authentication attempt will be filled with ’smtp’. Thus, on my system an attempt to run the command testsaslauthd -u alan -p mypassword -s smtp would fail, yet testsaslauthd -u alan -p mypassword would succeed. It appeared that the pam service ’smtp’ was not authenticating users correctly. That points the finger at the following file, recently changed by a gentoo update:

/etc/pam.d/smtp
# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/files/smtp.pam,v 1.2 2004/0
#auth required /lib/security/pam_stack.so service=system-auth
#account required /lib/security/pam_stack.so service=system-auth
auth required system-auth
account required system-auth

I edited the file to use the first, and original, two lines, instead of the updated ones. Seems those absolute pathnames are important.

/etc/pam.d/smtp
# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/files/smtp.pam,v 1.2 2004/0
#auth required /lib/security/pam_stack.so service=system-auth
#account required /lib/security/pam_stack.so service=system-auth
auth required system-auth
account required system-auth

Please note that smtpd_recipient_restrictions is order-sensitive! List permit entries first!


About this entry