如何阻止 Gmail 将我的网络应用程序发送的邮件标记为垃圾邮件?

发布于 2024-07-10 14:05:00 字数 1477 浏览 7 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(6

潇烟暮雨 2024-07-17 14:05:00

主要是,为了避免垃圾邮件引擎将您的邮件分类为垃圾邮件,您应该:

  • 您保留选择加入审核日志)
  • 确保它们不是垃圾邮件(即确保只有真正选择加入的用户才会收到邮件 -确保 不要看起来太像垃圾邮件 - $$$ MAKE MONEY FAST 不是一个好的主题行
  • 确保发件人地址没有被欺骗并且看起来没有被欺骗。 使用您有权发送的域(如果您愿意,请添加有效的 SPF 记录)
  • 不要做任何看起来像恶意软件的事情(例如包含脚本、表单、Flash 等的 HTML 电子邮件),

但总的来说,主要的是:

  • 不要从已知发送垃圾邮件的 IP 地址发送它们。

最后一点意味着您不能使用共享主机。 几乎所有共享托管提供商都允许发送不符合上述任何条件的邮件。 共享托管提供商的中继几乎总是出现在许多黑名单上。

只需要在您的共享主机上安装一个易受攻击的 Web 应用程序,它就会变成垃圾邮件网关 - 这是您无法承受的。

编辑:哦,是的 - 如果您没有设置信封发件人,您的托管提供商可能会将其设置为愚蠢的东西 - 确保您将其设置为与发件人相同: - 这可以确保您的消息不被看到被欺骗了

Chiefly, to avoid a spam engine classifying your messages as spam you should:

  • Make sure they aren't spam (i.e. ensure that only users who have really opted in get mailed - make sure you keep an opt-in audit log)
  • Make sure they don't look too much like spam - $$$ MAKE MONEY FAST is not a good subject line
  • Ensure that the sender address is not spoofed and does not appear to be spoofed. Use a domain that you are authorised to send from (add valid SPF records if you like)
  • Not do anything that looks malware-ish (e.g. HTML emails containing scripts, forms, flash etc)

But by and large the main one is:

  • Do not send them from an IP address which is known for sending spam.

The last point means that YOU CANNOT USE SHARED HOSTING. Almost all shared hosting providers allow the sending of mails which don't conform to any of the above. Shared hosting providers' relays are almost always on lots of blacklists.

It only takes one vulnerable web app on your shared hosting for it to turn into a spam gateway - something which you can't afford.

EDIT: Oh yes - if you're not setting the envelope-sender, your hosting provider may have it set to something stupid - ensure that you do set it to the same as From: - this makes sure that your messages aren't seen as spoofed

半衬遮猫 2024-07-17 14:05:00
  • 请阅读 Google 的批量发送指南
  • 尝试使用域密钥识别邮件域密钥,密钥至少为 1024 位。
  • 确保您的邮件主机是有效的 A 记录,而不是 CNAME。
  • 确保您的 MX 记录设置为邮件主机的完整主机名(设置为 A 记录)。
  • 为您的邮件主机使用一致的 IP 地址。
  • 确保您可以反向查找邮件主机的 IP 地址。 这对于设置 SPF/发件人 ID 记录非常重要。
  • SPF/SenderID 信息设置为 TXT 记录
  • 配置完所有内容后,您应该验证它。 在联系 Gmail 支持之前,请确保没有警告或错误。
  • 正如 Tiberu 所说,使用垃圾邮件刺客测试您的电子邮件。 从您的应用程序向自己发送一封电子邮件,并将原始消息(包括标头)复制到文本文件,然后针对 Spam Assassin 的命令行测试运行它。
  • 如果您发送纯文本电子邮件,请确保将 Content-Type 标头中的字符集设置为 ISO-8859-1。 Gmail对此似乎很讲究。
  • Read Google's bulk sending guidelines.
  • Try using Domain Keys Identified Mail or Domain Keys, with a key that's at least 1024 bits.
  • Make sure your mail host is a valid A record, rather than a CNAME.
  • Make sure your MX record is set to the full host name of your mail host (which is set-up as an A record).
  • Use a consistent IP address for your mail host.
  • Make sure you can do a reverse lookup of your mail host's IP address. This will be important for setting up SPF/Sender ID records.
  • Set up SPF/SenderID information as a TXT record.
  • Once you've configured everything you should verify it. Make sure there are no warnings or errors before contacting Gmail support.
  • As Tiberu states, test your emails with Spam Assassin. Send yourself an email from your app and copy the raw message (including headers) to a text file and run it against Spam Assassin's command line test.
  • If you are sending plain text emails, make sure you have the charset in the Content-Type header set to ISO-8859-1. Gmail seems to be very particular about this.
寄风 2024-07-17 14:05:00

这是当今许多发送自动电子邮件的公司面临的一个常见问题,即垃圾邮件过滤器过于热情。 我看到我的经纪公司和银行只是在每封电子邮件的开头加上“请添加 '[电子邮件] protected]' 添加到您的安全发件人列表。” 请记住,这家经纪公司和银行可能拥有一支开发人员队伍,并且仍然会向人类收件人发出提醒:)大多数垃圾邮件过滤器都是基于贝叶斯算法的,他们永远不会百分百正确。

This is a common problem many companies that send out automated emails face today, overzealous spam filters. I've seen my brokerage and bank simply start off each email with "Please add '[email protected]' to your safe senders list." Keep in mind this brokerage and bank probably have an army of developers and still resort to a reminder to the human recipient :) Most spam filters are based of Bayesian algorithms, and they will never get it 100% right.

橘寄 2024-07-17 14:05:00

您还可以查看SpamAssassin 执行的测试。 当然,这不是 Gmail 使用的方式(或者谁知道呢?),但您会感觉到哪些东西可能会将您视为垃圾邮件。

归根结底,您仍然在打一场必败的仗——没有特定的方法可以摆脱垃圾邮件箱(垃圾邮件发送者会喜欢这样,呵呵),因为一个人的财务数据可能是另一个人的垃圾邮件。 请务必向您的用户发出警告,并让他们担心他们的电子邮件解决方案将邮件标记为垃圾邮件,因为他们是唯一能够真正对此采取行动的人。

编辑:好吧,我的印象是 SPF 在这种情况下实际上会有所帮助,但事实似乎并非如此。 请使用 SPF,但它不会帮助您通过垃圾邮件过滤器。

You could also take a look at the tests performed by SpamAssassin. Of course that's not what Gmail is using (or who knows?) but you'll get a feeling for the kind of things that might qualify you as spam.

At the end of the day, you're still fighting a losing battle -- there is no certain way of getting out of the spam box (spammers would love that, heh), since one man's financial data might be another one's spam. Do make sure to throw a warning to your users and let them worry about their email solution marking things as spam, since they're the only ones who can really do something about it.

Edit: Alright, I was under the impression that SPF would actually help in this situation, but it doesn't seem to be the case. Do use SPF but it won't help you past the spam filter.

变身佩奇 2024-07-17 14:05:00

我建议您阅读 Google 的批量发件人指南 ,它提供了许多建议来避免邮件被标记为垃圾邮件。

I suggest reading the Bulk Senders Guidelines from Google, it provides many advices to avoid mails from being flagged as spam.

梦幻的味道 2024-07-17 14:05:00

为什么不在注册表单上添加类似的内容呢?

某些电子邮件提供商可能会自动将电子邮件标记为垃圾邮件。 所有自动电子邮件都将从[电子邮件受保护]发送,请将其添加到您的安全列表

无论你做什么,你的电子邮件很可能会被标记为垃圾邮件,无论如何,我有来自大公司的电子邮件在响应我提出的支持请求时直接进入垃圾邮件箱。 因此,最好确保您的用户为这种可能性做好准备。

Why not have something on the signup form along the lines of.

Some email providers may automatically mark the emails as spam. All automated emails will be sent from [email protected], please add this to your safe list

Whatever you do it is likly that your emails will get marked as spam somethings anyway, ive had emails from large corperations go straight into the spam box when they were responding to support requests id made. So its better to make sure your users are prepared for that posibility.

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