Problem: saslauthd refuses to authenticate

Problem

Your standalone saslauthd refuses to authenticate users to send emails even though they use correct credentials.

Environment

For unknown reason the saslauthd might loose the connection to the LDAP server for authenticating users. You will see the following in the logs:

May  8 01:01:02 ucs PAM-univentionmailcyrus[3935]: Failed to connect to LDAP server ucs.domain.com:7389
May  8 01:01:02 ucs PAM-univentionmailcyrus[3935]: Failed to connect to the configured LDAP servers
May  8 01:01:02 ucs PAM-univentionmailcyrus[3935]: failed to map username
May  8 01:01:04 ucs saslauthd[3935]: DEBUG: auth_pam: pam_authenticate failed: User not known to the underlying authentication module
May  8 01:01:04 ucs saslauthd[3935]: do_auth         : auth failure: [user=name@domain.com] [service=imap] [realm=domain.com] [mech=pam] [reason=PAM auth error]

Additionally Postfix might complain, too:

postfix/smtpd[24930]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory

Solution

Restart saslauthd by:

systemctl restart saslauthd
For a more automated procedure you might want to use the script posted here and use cron.

Mastodon