Categories
Linux Postfix Sys Admin

Postfix/SASL/Courier AuthDaemon Cannot connect to Courier authdaemond: No such file or directory

I have a Ubuntu Virtual Server handling all my mail, recently after an apt-get upgrade I was unable to send email using my Postfix Virtual User setup through Courier and SASL.

I kept getting the following error in my logs:

Aug 18 07:53:53 marvin postfix/smtpd[23938]: warning: SASL authentication
  failure: cannot connect to Courier authdaemond: No such file or directory
Aug 18 07:53:53 marvin postfix/smtpd[23938]: warning: localhost[127.0.0.1]:
  SASL LOGIN authentication failed: generic failure

After consulting with Google for at least an hour i finally hit upon a page that helped me.

I found the answer in the following howto Postfix w/o Maildrop. The authdaemon socket setup described on this page was slightly different to the usual suggestions (most help I found online suggested to create a hardlink to the socket file inside the Postfix chroot, this doesn’t work for Ubuntu cause the /var/run is on a different filesystem and a symlink didn’t work for me either). The following commands were taken directly from the howto listed above (all credit should go to the writer of that page).

/etc/init.d/courier-authdaemon stop
rm -rf /var/run/courier/authdaemon/ 
 /var/spool/postfix/var/run/courier/authdaemon/
mkdir -p /var/spool/postfix/var/run/courier/authdaemon/
ln -s /var/spool/postfix/var/run/courier/authdaemon/ 
 /var/run/courier/authdaemon
/etc/init.d/courier-authdaemon start
postfix reload

The end result is that Postfix is not reading/accessing a symlinked version of the authdaemon socket and everything works as expected.

7 replies on “Postfix/SASL/Courier AuthDaemon Cannot connect to Courier authdaemond: No such file or directory”

Thanks, my night was saved either.
After reboots this structure seem to break again. At least at my virtual server.
Any ideas?
I put this little script in the rc.local, but I would like to know the cause…

Thx man !!!!! It is what i needed to run my outlook client with SMTP !! 3 days I was on it ! 😀

I had to also do a chown, so I ended up with:

#/bin/bash

systemctl stop courier-authdaemon
rm -rf /var/run/courier/authdaemon/ /var/spool/postfix/var/run/courier/authdaemon/
mkdir -p /var/spool/postfix/var/run/courier/authdaemon/
ln -s /var/spool/postfix/var/run/courier/authdaemon/ /var/run/courier/authdaemon
chmod o+rx /var/run/courier/authdaemon
systemctl start courier-authdaemon
systemctl restart postfix

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.