Configure Postfix to Use External SMTPSetup postfix

Set up Relay Server:

The final edit in the /etc/postfix/main.cf file is related to the settings needed for Postfix to use the external SMTP server. The settings instruct Postfix to deliver emails via a relay host, which is an external SMTP server.

Find and update the following line of the configuration file as follows:

relayhost = [SMTP-SERVER-ADDRESS]:587
  • Replace SMTP-SERVER-ADDRESS with the SMTP server IP address or hostname.

Add the following lines to the end of the file:

smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_use_tls = yes
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

Save the changes and exit the editor.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *