Welcome to Nick's Random Musings

Of course I don't know what I'm doing, what fun would that be?


postfix and dovecot, living together


computers, linux
Nick Gully, Denver

If you want to send via a postfix mail server, it will need to conncet to dovecot, on debian this can take a few tweaks to get working.

I found the solution in: http://serverfault.com/questions/383212/sasl-plain-authentication-failed-another-step-is-needed-in-authentication http://ubuntuforums.org/showthread.php?t=1024866

If you see errors like:

Dec 31 22:46:56 machinename postfix/submission/smtpd[3891]: warning: SASL authentication failure: Password verification failed
Dec 31 22:46:56 machinename submission/smtpd[3891]: warning: c-71-229-153-32.hsd1.co.comcast.net[71.229.153.32]: SASL PLAIN authentication failed: authentication failure
Dec 31 22:51:05 machinename postfix/submission/smtpd[4039]: warning: SASL: Connect to private/auth failed: No such file or directory
Dec 31 22:51:05 machinename postfix/submission/smtpd[4039]: fatal: no SASL authentication mechanisms

In dovecot: /etc/dovecot/dovecot.conf

#addition for letting postfix use dovecot for send auth
auth default {
    auth_mechanisms = plain login
	   passdb pam {
				      }
	   userdb passwd {
			      }
	   socket listen {
	          client {
				          # Assuming the default Postfix $queue_directory setting
				          path = /var/spool/postfix/private/auth
					      mode = 0660
					      # Assuming the default Postfix user and group
					      user = postfix
					      group = postfix
					 }
			    }
}

In postfix: /etc/postfix/main.cf

smtpd_sasl_auth_enable = yes

#ngg this tells us to use dovecot for sasl auth
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_authenticated_header = yes

smtpd_sasl_security_options = noanonymous

Then kick and restart. The dovecot config is older but should work.