邮寄给注册用户的经验 [英] Experiences in mailing to registered users

查看:166
本文介绍了邮寄给注册用户的经验的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行小型社交网站。它是在PHP中(但在这种情况下并不相关)。



我的计划是让它更受欢迎,允许注册用户被通知某些事件发生在网站(如有人评论你的内容等等)。



目前,我的网站只通过SMTP(Gmail)发送简单的邮件(如带有确认链接的欢迎邮件)。不幸的Gmail有一些限制 - 每天2000个邮件(付费版本)。



所以下一步是使用一些可以让我发送比2000年更多邮件的邮件日常。有付费服务,如AuthSMTP,Sendgrid,但我更喜欢自己设置的东西。将用于从no-reply@example.com发送超过2000封邮件到注册用户的东西。



所以我的问题是:设置MTA(邮件传输代理)从php社交网站发送邮件是不错的选择?或者我应该不同的方式?



基本上我在想设置Postfix。

解决方案

首先,电子邮件似乎并不容易。运行自己的MTA是您应该考虑的事情,但并不总是最好的解决方案(取决于您的业务需求)。现在有很多服务,尽管是付费的,这可能足以满足您的需求。



如果您决定要运行自己的MTA,以下是您应该考虑的几件事:


  1. 运行Sendmail或Postfix - 如果您发送合理的电子邮件数量但是有一秒钟的邮件可能会超过10封邮件,而Postfix邮件则是每天864,000封电子邮件。


  2. 如果最终运行Postfix,并且有多个IP地址可用,您可以设置更改Postfix配置文件中IP地址的cronjob,并向程序发送一个 SIGHUP 信号。这将使Postfix开始使用不同的IP地址发送邮件,并获得一些限制,如IP,如MSN谁不允许超过 x 发送给他们的电子邮件某些时间段不考虑垃圾邮件。


  3. 垃圾邮件系统 - 在发送邮件之前,使用它扫描邮件,如果由于某种原因您的服务器感染了垃圾邮件传播病毒你会很感激你的(而不是乞求黑名单删除你)。


  4. 注册白名单程序或交付跟踪程序与各种IPS,例如微软Postmaster


  5. 注意黑名单,并确保您的IP不被列出。有很多但是主要的监控应该足够了。


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


  7. 使用一个很好的PHP库发送邮件,例如 SwiftMailer 或您的其他任何偏好。


希望这有帮助!



编辑:



现在你在评论中提到,请仔细阅读: 2003 CAN-SPAM法案


I am running small social site. It's witten in PHP (but it is not that relevant in this case).

My plan was to make it more popular by allowing registered users to be notified about certain events happening in the site (like "someone commented your content" and so).

Currently my site is sending only simple mails (like welcome mail with confirmation link) via SMTP (Gmail). Unfortunatelly Gmail has some limits - 2000 mails per day (in paid version).

So the next step would be to use something which would allow me to send more mails than 2000 daily. There are paid services like AuthSMTP, Sendgrid, but I prefer to setup something on my own. Something which would be used for sending more than 2000 mails from "no-reply@example.com" to registered users.

So my question is: Is it good option to setup MTA (Mail Transfer Agent) to send mails from php social site? Or should I go different way?

Basically I was thinking about setting up Postfix.

解决方案

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

这篇关于邮寄给注册用户的经验的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆