Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

A while ago I installed the postfix mail server on my ubuntu 10.04 VPS. At the time it was working good but now it's just stopped working. I was trying to enable SASL authentification and somewhere it must have went really wrong. I've studied the postfix main.cf and done everything in an orderly fashion to ensure that it is nothing wrong. I also have Dovecot installed and configured dovecot.conf to run with Postfix.

If I try to do telnet localhost 25 while logged in on the server I just get: Connection closed by foreign host.

If I try to do telnet mail.example.com 25 "from the outside" I get: telnet: Unable to connect to remote host: No route to host

And when I check the server log after the failed attempts I see this:

Jun 28 15:49:31 msv postfix/smtpd[11839]: initializing the server-side TLS engine
Jun 28 15:49:31 msv postfix/smtpd[11839]: connect from localhost.localdomain[127.0.0.1]
Jun 28 15:49:31 msv postfix/smtpd[11839]: warning: SASL: Connect to /var/spool/postfix/private/auth failed: Connection refused
Jun 28 15:49:31 msv postfix/smtpd[11839]: fatal: no SASL authentication mechanisms
Jun 28 15:49:32 msv postfix/master[11598]: warning: process /usr/lib/postfix/smtpd pid 11839 exit status 1
Jun 28 15:49:32 msv postfix/master[11598]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

main.cf file looks like this:

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no
append_dot_mydomain = no
delay_warning_time = 4h
myhostname = mail.example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydomain = example.com
myorigin = $mydomain
mydestination = $mydomain
relayhost =
mynetworks = 127.0.0.1
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
smtpd_use_tls = yes
smtpd_tls_loglevel = 2
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_sasl_auth_enable = yes
smtpd_client_restrictions = permit_sasl_authenticated, permit_mynetworks,  reject_unauth_destination
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks
smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_destination broken_sasl_auth_clients = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = /var/spool/postfix/private/auth
smtpd_sasl_security_options = noanonymous 

Dovecot.conf file looks like this:

protocols = imap imaps
disable_plaintext_auth = no
log_timestamp = "%b %d %H:%M:%S "
ssl = yes
ssl_cert_file = /etc/postfix/ssl/smtpd.crt
ssl_key_file = /etc/postfix/ssl/smtpd.key
mail_location = maildir:~/mail
mail_access_groups = mail
auth_username_chars = abcdefghijklmnopqrstuvwxyz
protocol imap {
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
}

auth default {
mechanisms = plain login
  passdb pam {
  }
  userdb passwd {
  }
  socket listen {
      client {
      path = /var/spool/postfix/private/auth
      user = postfix
      group = postfix
      mode = 0660
    }
  }
}
share|improve this question

migrated from stackoverflow.com Jun 28 '12 at 17:22

This question came from our site for professional and enthusiast programmers.

    
is dovecot turned on? –  qweet Jun 28 '12 at 17:24
    
What's the output of sudo ls -l /var/spool/postfix/private/auth? –  mgorven Jun 28 '12 at 18:41

2 Answers 2

I think you either need to disable sasl:

smtpd_sasl_auth_enable = no

or, you need to enable (start) saslauthd. Once you have done either of those, you should resolve:

Jun 28 15:49:31 msv postfix/smtpd[11839]: warning: SASL: Connect to /var/spool/postfix/private/auth failed: Connection refused
share|improve this answer
    
Agreed - the problem is as user325181 points out, that postfix is trying to access an authentication method that isn't responding. –  Jenny D May 15 '13 at 8:50

Check the permissions of the /var/spool/postfix/private/auth file. It should be accessible by the sasl user. This rings a bell from setting up my last sasl server.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.