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.
This is the one that worked for me after 4 hours of reading docs
Thanks!