cat <<EOF > /etc/postfix/sasl_passwd
mail.phowork.fr <email>:<password>
EOF
postmap hash:/etc/postfix/sasl_passwd
cat <<EOF >> /etc/postfix/main.cf
### Custom SMTP config
inet_protocols = ipv4
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
# Secure channel TLS with exact nexthop name match.
smtp_tls_security_level = secure
smtp_tls_mandatory_protocols = TLSv1.2
smtp_tls_mandatory_ciphers = high
smtp_tls_secure_cert_match = nexthop
smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
relayhost = mail.phowork.fr:587
EOF
service postfix restart