Configuring authentication for outbound e-mail
With our current mail server setup, we can retrieve e-mail remotely and we can send mail from the local box, but we cannot send mail from remote systems. In order to enable this functionality, we need to configure Postfix to require auth for sending outbound mail from remote users. Typically, this requires setting up a SASL server of some variety like Cyrus saslauthd
. In our case, we're going to use Dovecot's built in SASL server.
How to do it…
Configure Dovecot to expose its SASL interface to Postfix by editing
/etc/dovecot/conf.d/10-master.conf
:service auth { … unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } … }
Configure Postfix to authenticate via SASL by editing
master.cf
and adding:submission inet n - n - - smtpd -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o smtpd_sasl_type=dovecot -o smtpd_sasl_path=private/auth -o smtpd_sasl_security_options=noanonymous...