14/07/2015

Postfix / Sasl via Courier / cannot connect to Courier authdaemond

Hello,

This small note just to remind me, what just happened as I upgrade a debian with an installed postfix using courier as SASL authentifiaction (for smtp)

1. First, the smtp daemon had no access to the courier socket.

Symptom :


tail /var/log/mail.info
SASL authentication failure: cannot connect to Courier authdaemond: Connection refused


Explanation :

For some reason, the smtp daemon is chrooted again. There maybe is a solution to allow him to access to courier socket even if it is chrooted, but I didn't find any (played some time with symbolic links but unsuccessfully. Tried to ask courier to put its socket in postfix chroot jail, but didn't work either)

So I choosed to unchroot it :

sudo emacs /etc/postfix/master.cf
smtp inet n - n - - smtpd


And then restart postfix of course.

2. Then, the smtp daemon had no right anymore to read the courier socket.

Symptom :

tail /var/log/mail.info
SASL authentication failure: cannot connect to Courier authdaemond: Permission denied


Explanation :
The rights on the socket folder went wrong. Be carefull, the rights on the socket itself where good.


ls -l /var/run/courier/authdaemon/socket
ls: cannot access /var/run/courier/authdaemon/socket: Permission denied

sudo ls -l /var/run/courier/authdaemon/socket
srwxrwxrwx 1 root root 0 Jul 14 21:31 /var/run/courier/authdaemon/socket

sudo ls -l /var/run/courier/
drwxr-x--- 2 daemon daemon 100 Jul 14 21:31 authdaemon


I choosed to add postfix in the daemon group :

sudo usermod -a -G daemon postfix


Les commentaires sont fermés.