Configure SMTP authentication in Postfix

Install the following packages: cyrus-sasl, cyrus-sasl-lib, cyrus-sasl-plain

Add the following lines to your Postfix main.cf file:

smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_authenticated_header = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
 

Reload Postfix Enable smtp authentication in your mail client and try to send an email