10

I've googled this error and nothing I've read/tried works - anyone know what it is

Error log:

Feb 23 22:35:36 localhost postfix/smtpd[5278]: connect from localhost.localdomain[127.0.0.1]
Feb 23 22:35:36 localhost postfix/smtpd[5278]: warning: SASL: Connect to smtpd failed: No such file or directory
Feb 23 22:35:36 localhost postfix/smtpd[5278]: fatal: no SASL authentication mechanisms
Feb 23 22:35:37 localhost postfix/master[5214]: warning: process /usr/libexec/postfix/smtpd pid 5278 exit status 1
Feb 23 22:35:37 localhost postfix/master[5214]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling

postfix/main.cf:

queue_directory = /var/spool/postfix
smtpd_sasl_type = dovecot
smptd_sasl_path = private/auth
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes

dovecot/conf.d/10-master.conf:

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

Dovecot is available in postfix:

[root@localhost ~]# postconf -a
cyrus
dovecot

Socket:

[root@localhost conf.d]# ls -l /var/spool/postfix/private/auth
srw-rw-rw-. 1 postfix postfix 0 Feb 23 22:46 /var/spool/postfix/private/auth

Telnet time out straight away:

[root@localhost ~]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

Auth works:

[root@localhost ~]# doveadm auth adrian
Password:
passdb: adrian auth succeeded
extra fields:
  user=adrian

OS: Centos 6.4 Dovecot: 2.1.17 Postfix: 2.6.6

Edit result of postconf -n:

[root@localhost ~]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = localhost
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
mynetworks = 192.168.124.0/24 168.100.189.0/28, 127.0.0.0/8
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
relay_domains = hash:/etc/postfix/relay_domains
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks        permit_sasl_authenticated        reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_type = dovecot
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
6
  • 1
    What's the output of postconf -n?
    – masegaloeh
    Feb 24, 2015 at 6:08
  • Cannot post - added as edit Feb 24, 2015 at 7:21
  • Do you have a file /etc/postfix/sasl/smtpd.conf with the following content: pwcheck_method: saslauthd\n mech_list: PLAIN LOGIN? (mind the newline)
    – sebix
    Feb 24, 2015 at 9:56
  • And I have smtp_sasl_type = dovecot in my postfix config more.
    – sebix
    Feb 24, 2015 at 10:03
  • Actually your case is weird... The error log was specific for cyrus SASL, because postfix looking for smtpd.conf file. And yet, your configuration states that you use dovecot for auth service :(. Did you override it in master.cf?
    – masegaloeh
    Feb 25, 2015 at 3:22

2 Answers 2

11

As you can see, there's no smtpd_sasl_path in our output of postconf -n

Why? The answer is easy. Because there's no smtpd_sasl_path set. Have a look at your first snippet: There's a typo in it. You wrote smptd_sasl_path = private/auth -- but there's a difference between smtpd and smptd.

Because Postfix doesn't have informations where to find the socket, Postfix is claiming the "failing connect".

Fix it and it'll work. :-)

And, at the end: Remember for the next time: Reading postconf -n carefully and make sure, that Postfix has the same information as you believe Postfix should have, is always an important step to find the failure.

4
  • +1 for finding a typo :)
    – masegaloeh
    Feb 26, 2015 at 8:32
  • Thank you Peer and sorry to bother you as the author about such a silly mistake - I stared out that code for hours even looking for a type - just did not see it. Feb 26, 2015 at 15:47
  • Wow, I found the guy who keeps resetting my irc connection. Sep 16, 2015 at 16:05
  • +1 because I spent hours and my issue was smtp_ instead of smtpd_ ...gotta have the d.
    – Donald P
    Nov 4, 2015 at 21:30
2

Had the same error, different issue.

Had to edit /etc/dovecot/conf.d/10-master.conf and uncomment unix_listener and add the user and group lines.

service auth {
   unix_listener /var/spool/postfix/private/auth {
      mode = 0660
      user = postfix
      group = postfix
   }

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .