Set the authorization credentials in /etc/mail/access
Define the Smart Host in /etc/mail/sendmail.mc. You should add these lines just after the commented
line in the file. In Ubuntu these would be the last lines added to the file.
Update sendmail.cf and access.db files Run these commands as root:
Restart Send Mail
-- https://docs.sendgrid.com/for-developers/sending-email/sendmail
AuthInfo:smtp.sendgrid.net "U:apikey" "P:" "M:PLAIN"Define the Smart Host in /etc/mail/sendmail.mc. You should add these lines just after the commented
\#dnl define('SMART_HOST', 'smtp.your.provider')dnlline in the file. In Ubuntu these would be the last lines added to the file.
define(`SMART_HOST', `smtp.sendgrid.net')dnl
FEATURE(`access_db')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnlUpdate sendmail.cf and access.db files Run these commands as root:
$ cd /etc/mail
$ m4 sendmail.mc >sendmail.cf
$ makemap hash access.db < accessRestart Send Mail
$ service sendmail restart-- https://docs.sendgrid.com/for-developers/sending-email/sendmail