Dovecot with Postfix on Ubuntu: warning: SASL: Connect to private/auth-client failed: No such file or directory

11,360

Solution 1

I looked all over for this and didn't find anything. I'm using Dovecot 2.0.19.

Eventually found the fix by editing /etc/dovecot/conf.d/10-master.conf and setting up the following:

  # Postfix smtp-auth
  unix_listener /var/spool/postfix/private/auth_client {
    mode = 0666
    user = postfix
  }

Then restart dovecot ('service restart dovecot')

If you don't have the file /etc/dovecot/conf.d/10-master.conf, try grepping /etc/dovecot to find where it might be being configured:

cd /etc/dovecot
grep -ri postfix *

and look for a file that declares a path to somewhere in /var/spool/postfix, and adjust as needed. In my dovecot configuration, the unix_listener was commented out and was pointing to the wrong file (/var/spool/postfix/private/auth).

Solution 2

Of course you need to have the pathname of the socket match in Dovecot and Postfix, otherwise you are going to got No such file or directory errors for the obvious reason that you're connecting to a socket that does not exist.

Choose one pathname or the other and configure it the same way in Dovecot and Postfix. For example, make your Dovecot config match what Postfix is expecting:

auth default {
  ...
  socket listen {
    ...
    client {
      path = /var/spool/postfix/private/auth-client
      mode = 0660
      user = postfix
      group = mail
    }
    ...
  }
  ...
}
Share:
11,360

Related videos on Youtube

99miles
Author by

99miles

Updated on September 18, 2022

Comments

  • 99miles
    99miles over 1 year

    I can't seem to get dovecot to start. My log keeps showing this stuff:

    connect from localhost[127.0.0.1]
    Mar  1 17:15:01 mac postfix/smtpd[32526]: warning: SASL: Connect to private/auth-client failed: No such file or directory
    Mar  1 17:15:01 mac postfix/smtpd[32526]: fatal: no SASL authentication mechanisms
    Mar  1 17:15:02 mac postfix/master[21369]: warning: process /usr/lib/postfix/smtpd pid 32526 exit status 1
    Mar  1 17:15:02 mac postfix/master[21369]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
    Mar  1 17:15:03 mac postfix/smtpd[32546]: connect from localhost[127.0.0.1]
    Mar  1 17:15:03 mac postfix/smtpd[32546]: warning: SASL: Connect to private/auth-client failed: No such file or directory
    Mar  1 17:15:03 mac postfix/smtpd[32546]: fatal: no SASL authentication mechanisms
    Mar  1 17:15:04 mac postfix/master[21369]: warning: process /usr/lib/postfix/smtpd pid 32546 exit status 1
    Mar  1 17:15:04 mac postfix/master[21369]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
    

    My /etc/postfix/main.cf has:

    home_mailbox = Maildir/
    mailbox_command =
    inet_protocols = ipv4
    smtpd_sasl_type = dovecot
    smtpd_sasl_path = private/auth-client
    smtpd_sasl_local_domain =
    smtpd_sasl_security_options = noanonymous
    

    And googling makes it look like I need to add a client block like:

    client {
      path = /var/spool/postfix/auth/dovecot
      mode = 0660
      user = postfix
      group = mail
    }
    

    But it seems that dovecot has been changed since all the examples I find, so I'm not sure where to put that. I'm using Dovecot 2.0.13

    Any ideas how to fix this? Thanks!

    • 99miles
      99miles about 12 years
      If you are going to downvote a post, please tell why.
    • Phib3r Optix
      Phib3r Optix over 10 years
      None of the answers worked with my version BUT, they got me thinking and I solved it. . . So, I gave your question credit! (My symptoms match yours but my config files differ considerably.)
  • 99miles
    99miles about 12 years
    Right, but as I mentioned I don't know which file that goes in. None of my dovecot config files look like the ones I see people refer to.
  • Celada
    Celada about 12 years
    I'm sorry, I missed that part of your question. I added context to show where the client { } block goes. Too bad the example config in the distribution doesn't contain such a block.
  • 99miles
    99miles about 12 years
    The thing is I don't see any blocks that look remotely like that in the dovecot.conf or included files. See gist.github.com/1994578
  • Alex
    Alex almost 8 years
    where? in what config ?