Email - Postfix - SMTP client authentication to a remote SMTP server

About

Postfix smtp client authentication with SASL

The Postfix SMTP client can authenticate to a remote SMTP server.

Steps

  • Generate an App Password
  • Store it
[smtp.gmail.com]:587 [email protected]:password
  • Create the database
postmap /etc/postfix/sasl/sasl_passwd
  • Test
ls /etc/postfix/sasl/sasl_passwd.db
  • Relay
relayhost = [smtp.gmail.com]:587
  • Sasl
# Enable SASL authentication
smtp_sasl_auth_enable = yes
# Disallow methods that allow anonymous authentication
smtp_sasl_security_options = noanonymous
# Location of sasl_passwd
smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd
# Enable STARTTLS encryption
smtp_tls_security_level = encrypt
# Location of CA certificates
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

Documentation / Reference





Discover More
Postfix - SASL (SMTP Authorization)

With sasl: a remote SMTP client can authenticate to the Postfix SMTP server, the Postfix SMTP client can authenticate to a remote SMTP server



Share this page:
Follow us:
Task Runner