configuration其他SMTP提供商的后缀

我想使用SendGrid作为我的电子邮件发送服务,但也想使用Postfix的内部队列机制来pipe理通过Sendgrid发送的邮件。

所以基本上我想要做的是configurationPostfix通过Sendgrid的SMTP发送邮件,我将configuration我的应用程序使用本地Postfix发送邮件。

我的问题是,我怎样才能configurationPostfix使用外部SMTP? 看这里,但没有看到有用的东西。

看起来你已经弄清楚了,但为了将来可以引用任何正在寻找的人:

1)编辑你的Postfixconfiguration文件

打开你的/etc/postfix/main.cfconfiguration文件并编辑它以获得下列值:

 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = static:yourSendgridUsername:yourSendgridPassword smtp_sasl_security_options = noanonymous smtp_tls_security_level = may start_tls = yes header_size_limit = 4096000 relayhost = [smtp.sendgrid.net]:587 

2)重新启动你的后缀服务器

在terminal中运行以下命令

 /etc/init.d/postfix restart 

3)开始发送

你们都准备好了,开始发送SendGrid账号!


如果遇到任何问题,您可以随时询问我们的24/7支持团队或在@SendGrid上发送推文。