Ubuntu/Postfix/Saslauthd - SASL authentication failure: cannot connect to saslauthd server: Permission denied

This article shows how to fix the following error message on an Ubuntu/Postfix/Saslauthd mail server - "SASL authentication failure: cannot connect to saslauthd server: Permission denied".

The Error message as shown in the log file

On a Postfix with SMTP-Auth setup on Ubuntu you see the following error in your mail log:

Apr 26 10:55:19 tcc1 postfix/smtpd[21126]: warning: SASL authentication failure: cannot connect to saslauthd server: Permission denied
Apr 26 10:55:19 tcc1 postfix/smtpd[21126]: warning: SASL authentication failure: Password verification failed
Apr 26 10:55:19 tcc1 postfix/smtpd[21126]: warning: laptop.local[192.168.1.2]: SASL PLAIN authentication failed: generic failure

 

Solution

Add the postfix user to the sasl group (this makes sure that Postfix has the permission to access saslauthd):

adduser postfix sasl

Then restart Postfix and Saslauthd:

/etc/init.d/postfix restart
/etc/init.d/saslauthd restart

On servers with systemd, use:

service postfix restart
service saslauthd restart

Falko Timme

About Falko Timme

Falko Timme is an experienced Linux administrator and founder of Timme Hosting, a leading nginx business hosting company in Germany. He is one of the most active authors on HowtoForge since 2005 and one of the core developers of ISPConfig since 2000. He has also contributed to the O'Reilly book "Linux System Administration".

Share this page:

Suggested articles

2 Comment(s)

Add comment

Comments

By: Curtis Maurand

I wend around and around with this for a week before I stumbled onto this little gem.  What you posted above will not work unless you also do the following.

  for chroot
dpkg-statoverride --remove /var/spool/var/run/saslauthd
dpkg-statoverride --add root sasl 770 /var/spool/postfix/var/run/saslauthd

For non chroot
dpkg-statoverride --remove /var/run/saslauthd
dpkg-statoverride --add root sasl 770 /var/run/saslauthd

By: Mourad

Thank you!!!!