Smarthost 配置配置 sSMTP 中继 sendgrid

Smarthost configuration to configure sSMTP to relay sendgrid

"clear problem statement" 是如何配置 sSMTP 以将 sendgrid 中继为智能主机?

默认的 sSMTP 配置是::

$ cat /etc/ssmtp/ssmtp.conf
root=postmaster
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=mail
#rewriteDomain=
hostname=spinoza 

使用 Exim4,我们可以使用以下配置(它正在运行)将 SMTP 配置为智能主机::

root@me:/etc/exim4# grep -E 'sendgri|smart' update-exim4.conf.conf
dc_eximconfig_configtype='smarthost'
dc_smarthost='smtp.sendgrid.net::587'
root@me:/etc/exim4#

试试这个:

mailhub=smtp.sendgrid.com:587
UseSTARTTLS=YES
FromLineOverride=YES
AuthUser=login_sendgrid
AuthPass=password_sendgrid