向注册用户邮寄邮件的经验

发布于 2024-10-09 19:21:20 字数 1459 浏览 0 评论 0原文

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

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

发布评论

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

评论(1

晨与橙与城 2024-10-16 19:21:20

首先,电子邮件并不像看上去那么容易。虽然运行您自己的 MTA 是您应该考虑的事情,但它并不总是最好的解决方案(取决于您的业务需求)。有很多服务,尽管是付费服务,但目前可能足以满足您的需求。

如果您确实决定要运行自己的 MTA,则应考虑以下几点:

  1. 运行 Sendmail 或 Postfix - 如果您要发送合理数量的电子邮件,则这是一个偏好问题。但是如果每秒发送超过 10 封电子邮件,请使用 Postfix(即每天 864,000 封电子邮件)。

  2. 如果您最终运行 Postfix 并且有多个可用的 IP 地址,则可以设置一个 cronjob 来更改 Postfix 配置文件中的 IP 地址并向程序发送 SIGHUP 信号。这将使 Postfix 开始使用不同的 IP 地址发送邮件,并绕过 MSN 等 IP 地址的一些限制,这些限制不允许在特定时间跨度内向其发送超过 x 封电子邮件,而不将其视为垃圾邮件.

  3. Spamassasin - 在发送消息之前使用它来扫描您的消息,如果由于某种原因您的服务器感染了垃圾邮件传播病毒,您会庆幸拥有它(而不是乞求黑名单将您删除)。< /p>

  4. 使用各种 IPS 注册白名单计划或投递跟踪计划,例如 Microsoft 的 Postmaster.

  5. 密切关注黑名单并确保您的 IP 不在其中。它们有很多,但监控主要的就足够了。

  6. 如果您想代表另一个域或子域发送邮件,您将需要正确设置反向 DNS 和可能的一些 SPF 记录。

  7. 使用良好的 PHP 库发送邮件,例如 SwiftMailer 或您喜欢的任何其他库。

希望这有帮助!

编辑:

既然您在评论中提到了它,也请仔细阅读:2003 年反垃圾邮件法案

First of all, e-mail is not an easy of a subject as it may seem. While running your own MTA is something you should consider, it's not always the best solution (depends on your business requirements). There's a lot of services, despite being paid ones, that will probably suffice for your needs, for now.

If you do decide that you want to run your own MTA, here's a few things you should consider:

  1. Run Sendmail or Postfix - it's a matter of preference if you're sending a reasonable amount of email. But over 10 emails a second, go with Postfix (that's 864,000 emails per day).

  2. If you end up running Postfix and you have multiple IP addresses available, you can setup a cronjob that changes the IP address in Postfix's configuration file and send a SIGHUP signal to the program. This will make Postfix start using the different IP address for sending mail and gets around a few restrictions for IP's like MSN who don't allow more than x emails delivered to them in a certain timespan without considering them spam.

  3. Spamassasin - Use it to scan your messages before sending them, if for some reason your server is infected with a spam spreading virus, you'll be thankful you have it (instead of then begging the blacklists to remove you).

  4. Sign up for whitelist programs or delivery tracking programs with various IPS's, such as Microsoft's Postmaster.

  5. Keep an eye on blacklists and ensure that your IP(s) are not listed on them. There are a lot of them but monitoring the major ones should suffice.

  6. You'll need to properly setup reverse DNS and possibly some SPF records if you want to send mail on behalf of another domain or subdomain.

  7. Use a good PHP library for sending mail, such as SwiftMailer or any other of your preference.

Hope this helps!

EDIT:

Now that you mention it in the comments, also please read, very carefully: 2003 CAN-SPAM Act

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