main.cf 957 B

123456789101112131415
  1. relayhost = [your-smtp-server-addr]:587 ; Replace [your-smtp-server-addr] with your SMTP server address
  2. smtp_sasl_auth_enable = yes
  3. smtp_sasl_security_options = noanonymous
  4. smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
  5. smtp_use_tls = yes
  6. smtpd_relay_restrictions = permit_mynetworks
  7. mydestination = localhost
  8. myhostname = postfix
  9. mynetworks = 127.0.0.0/8, 172.0.0.0/8, 192.168.0.0/16, 10.0.0.0/8, [::1]/128
  10. smtp_tls_security_level = may
  11. smtpd_tls_security_level = none
  12. smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd # <-- (Optional) Remove when using inline credentials
  13. # --> (Optional) When using inline credentials, uncomment the following line and replace the placeholders with your SMTP server address and credentials
  14. # smtp_sasl_password_maps = inline:{ [your-smtp-server-addr]:587=username:password } # <-- Replace [your-smtp-server-addr] with your SMTP server address, and username:password with your SMTP server credentials
  15. # <--