当我们的 mx 记录指向 google 时,让 codeigniter 通过 smtp 发送到 gmail 与通过 sendmail 发送有什么区别?
目前我们正在考虑垃圾邮件,我们需要找出最好的解决方案。
我们应该使用 sendmail 还是通过 smtp 直接发送到 google?
Currently were getting considered spam and we need to figure out what is the best soulution.
Should we be using sendmail or sending via smtp directly to google?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
是的。
Yes.
如果您使用 gmail smtp 从您的域发送电子邮件,您是否考虑过在 DNS 中实施 DKIM/SPF?
DKIM 代表域密钥,是一个 dns 条目,其中包含用于授权您的域作为发件人的加密密钥。它看起来像下面这样,尽管我不确定 Google 是否已经实现了它:
SPF 是发件人保护框架,并且需要向您的 dns 添加一条 txt 记录,该记录授权其他服务器代表您的域发送邮件。谷歌的 SPF 看起来像这样:
这两者都将极大地帮助降低您的垃圾邮件分数,您可以使用 litmusapp.com 等工具来测量该分数。
或者,我使用 postmarkapp.com,这是一个电子邮件发送器(带有 smtp 和 api),可以处理大量垃圾邮件为您评分,并且在电子邮件退回时还可以反馈到您的应用程序(通过网络钩子)。
If you're using gmail smtp to send emails from your domain, have you thought about implementing DKIM/SPF in your DNS?
DKIM stands for Domain Keys, and is a dns entry containing an encryption key for authorising your domain as a sender. It'll look something like below, although i'm not sure if Google have implemented it:
SPF is sender protection framework, and entails adding to your dns a txt record that authorises other servers to send mail on behalf of your domain. An SPF for google will look something like:
Both of these will massively help reduce your spam score, which you can measure with tools like litmusapp.com.
Alternatively, I use postmarkapp.com, an email sender (with smtp and an api) which deals with a lot of the spam score for you and can also feed back to your app (via a webhook) when an email bounces.
当您调整 MX 记录时,您基本上是在调整传入的邮件。它并不真正影响发送电子邮件。因此,当您使用 sendmail 发送时,所使用的 SMTP 服务器是您在该计算机上自己的服务器。但是,当您使用 smtp 转 gmail 时,那么...那么您的 smtp 服务器就是 gmail。
当有人向您发送电子邮件时,MX 记录将指向该邮件需要发送的位置。它与外发电子邮件无关。
When you adjust the MX record, you are basically adjusting the incoming mail. It doesnt really affect outgoing email. So when you send using sendmail, the SMTP server in use is your own server on that machine. However when you use smtp to gmail, well ... then your smtp server is gmail.
When someone sends you an email, the MX record will point where that mail needs to go. It has nothing to do with outgoing email.
邮件垃圾邮件过滤器使用发送 IP 地址作为确定传入邮件是否为垃圾邮件的主要组成部分。除非您特别注意维护它,否则您的出站邮件服务器的 IP 地址(您运行 sendmail 的机器)可能在大多数主要垃圾邮件过滤器(例如 Gmail、Postini、以及雅虎到 Barracuda 和 IronPort)。
因此,为了获得最高的送达率,我建议您通过 Gmail 出站服务器发送。
该建议假设您可以在 TOS 范围内这样做; Gmail 仅供个人使用,而不是应用程序网关,因此,如果您发送的邮件数量超过大约。每天 100 条消息,您应该考虑商业中继解决方案。 Adam 提到http://postmarkapp.com;我们在雅虎处理的另外两个选择是 http://authsmtp.com 和 http://sendgrid.com。
希望有帮助。
Mail spam filters use the sending IP address as a major component of determining the spamminess of the incoming message. Unless you've specifically paid attention to maintaining it, your outbound mailserver's IP address -- the box you're running sendmail on -- is likely to have a neutral-to-bad reputation in most major spam filters (e.g. Gmail, Postini, and Yahoo to Barracuda and IronPort).
Therefore, for the highest deliverability I'd recommended you send through the Gmail outbound servers.
That recommendation is assuming you can do so within the TOS; Gmail is meant for individual use, not to be an application gateway, so if you're sending more than approx. 100 messages per day, you should instead look at a commercial relay solution. Adam mentioned http://postmarkapp.com; two other choices we dealt with at Yahoo were http://authsmtp.com and http://sendgrid.com.
Hope that helps.