我无法配置Postfix以通过中继向Sendgrid发送电子邮件。
我收到以下错误:“不允许未经身份验证的发件人”
答案 0 :(得分:2)
看起来它是Postfix中的SASL配置,对Sendgrid进行身份验证。我们能够使用以下内容:
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
mailbox_size_limit = 256000000
# Sendgrid Settings
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = static:SENDGRID_ACCOUNT_EMAIL_HERE:PASSWORD_HERE
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = may
header_size_limit = 4096000
relayhost = [smtp.sendgrid.net]:587