cd /etc/mail
echo "AuthInfo:$SMTP_SERVER \"U:$USERNAME\" \"P:$PASSWORD\" \"M:PLAIN\"" >> access
makemap hash access .db < access
make
service sendmail restart
</div>
<!--If you need to connect to the SMTP server using port 465 587 (SSLTLS/STARTTLS), you'll need to do this too:
<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;">
cd /etc/pki/tls/certs
make sendmail.pem
cd /etc/mail
echo sed -ie "s/.*confCACERT_PATH.*/define(\`RELAY_MAILER_ARGSconfCACERT_PATH', \`TCP \$h 465/etc\/pki\/tls\/certs')dnl/" sendmail.mc sed -ie "s/.*confCACERT.*/define(\`confCACERT', \`\/etc\/pki\/tls\/certs\/ca-bundle.crt')dnl/" sendmail.mc sed -ie "s/.*confSERVER_CERT.*/define(\`confSERVER_CERT', \`\/etc\/pki\/tls\/certs\/sendmail.pem')dnl/" sendmail.mc sed -ie "s/.*confSERVER_KEY.*/define(\`confSERVER_KEY', \`\/etc\/pki\/tls\/certs\/sendmail.pem')dnl/" >> sendmail.mc
m4 sendmail.mc > sendmail.cf
make
service sendmail restart
</div>
-->