This is a blog post about an error I found in my /var/log/mail.log file reported by postfix: “SASL authentication failure: cannot connect to saslauthd server: No such file or directory”, and the solution I used to resolve it.

First off, this turned out to be a very interesting error! As I explained on the Docunext Wiki Postfix page in the section about using Postfix and Saslauthd on Debian, Postfix processes must run under a chroot.

While the submission service (port 587) in /etc/postfix/ usual runs under a chroot, I had added a new submission directive to relay outgoing messages through dkimproxy:

submission  inet  n     -       n       -       -       smtpd
    -o smtpd_etrn_restrictions=reject
    -o smtpd_sasl_auth_enable=yes
    -o content_filter=dksign:[]:10028
    -o receive_override_options=no_address_mappings
    -o smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject

For some reason, I had set chroot to “n”, and so it was unable to connect to the saslauthd socket!

The resolution for me was to simply change the second “n” to “-“, like so:

submission  inet  n     -       -       -       -       smtpd