Experiences in mailing to registered users [closed]

感情迁移 提交于 2019-12-13 07:55:30

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/4532211/experiences-in-mailing-to-registered-users

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!