当我们的 mx 记录指向 google 时,让 codeigniter 通过 smtp 发送到 gmail 与通过 sendmail 发送有什么区别?

发布于 2024-09-19 06:44:35 字数 82 浏览 14 评论 0原文

目前我们正在考虑垃圾邮件,我们需要找出最好的解决方案。

我们应该使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

煮茶煮酒煮时光 2024-09-26 06:44:35

是的。

  • 在第一种情况下,您将邮件发送到 Gmail 的 SMTP 服务器进行传送。
  • 在第二个中,您将消息分发给 sendmail,根据其配置,它会将消息分发给 ISP 的 SMTP 服务器(或任何其他配置)或直接分发给 Google 的 SMTP 服务器。无论如何,Google MX 记录中的 SMTP 服务器可能与您所说的“Gmail 的 SMTP 服务器”不同(即,第一个可能不会中继)。

Yes.

  • In the first case, you are handing out the message to Gmail's SMTP server for the delivery.
  • In the second one, you are handing out the message to sendmail, which, depending on its configuration, will hand it to your ISP's SMTP server (or whatever else is configured) or directly to Google's SMTP servers. In any case, the SMTP servers in Google's MX records may be different form what you call "Gmail's SMTP server" (i.e., the first may not relay).
云雾 2024-09-26 06:44:35

如果您使用 gmail smtp 从您的域发送电子邮件,您是否考虑过在 DNS 中实施 DKIM/SPF?

DKIM 代表域密钥,是一个 dns 条目,其中包含用于授权您的域作为发件人的加密密钥。它看起来像下面这样,尽管我不确定 Google 是否已经实现了它:

gm._domainkey TXT "k=rsa p=sdhisgnsdgnejrneikslnmvdfkls"

SPF 是发件人保护框架,并且需要向您的 dns 添加一条 txt 记录,该记录授权其他服务器代表您的域发送邮件。谷歌的 SPF 看起来像这样:

mydomain.com. TXT "v=spf1 include:aspmx.googlemail.com -all"

这两者都将极大地帮助降低您的垃圾邮件分数,您可以使用 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:

gm._domainkey TXT "k=rsa p=sdhisgnsdgnejrneikslnmvdfkls"

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:

mydomain.com. TXT "v=spf1 include:aspmx.googlemail.com -all"

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.

绻影浮沉 2024-09-26 06:44:35

当您调整 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.

不回头走下去 2024-09-26 06:44:35

邮件垃圾邮件过滤器使用发送 IP 地址作为确定传入邮件是否为垃圾邮件的主要组成部分。除非您特别注意维护它,否则您的出站邮件服务器的 IP 地址(您运行 sendmail 的机器)可能在大多数主要垃圾邮件过滤器(例如 Gmail、Postini、以及雅虎到 Barracuda 和 IronPort)。

因此,为了获得最高的送达率,我建议您通过 Gmail 出站服务器发送。

该建议假设您可以在 TOS 范围内这样做; Gmail 仅供个人使用,而不是应用程序网关,因此,如果您发送的邮件数量超过大约。每天 100 条消息,您应该考虑商业中继解决方案。 Adam 提到http://postmarkapp.com;我们在雅虎处理的另外两个选择是 http://authsmtp.comhttp://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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文