将电子邮件传送到程序&防止垃圾邮件快速提交
我正在开发一个网站,理想情况下,任何人都可以向指定地址发送电子邮件并将照片附加到他们的消息中(例如,通过 iPhone)。该地址将被设置为将电子邮件通过管道传输到 PHP 脚本,然后该脚本将处理该照片并将其存储在我们的服务器上。
我发现这个系统很容易被滥用:有人在自己的服务器上设置一个页面,反复向该地址发送垃圾邮件照片,从而堵塞我们的存储空间和服务器资源。有人对如何最小化这种风险有建议吗?
谢谢!
I'm working on a site where, ideally, anyone will be able to email a specified address and attach a photo to their message (e.g. from an iPhone). This address will be set to pipe the email to a PHP script, which will then process this photo store it on our server.
I can see this system being pretty easy to abuse: someone sets up a page on their own server to repeatedly spam the address with photos, clogging up our storage space and server resources. Anyone have a suggestion on how to minimize this risk?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
几个选择,从我的脑海中浮现出来。不过,我会使用组合:
from
地址被攻击者欺骗,他们还需要知道代码,否则邮件会被拒绝A few options, off of the top of my head. I'd use a combination, though:
from
address is spoofed by an attacker, they'd also need to know the code or else the message is rejected我在这里没有看到万无一失的方法。但是,您可以将此过程视为用户注册过程。一旦有人向您发送电子邮件,您会将电子邮件存储在临时存储中,将自动生成的消息发送回原始电子邮件地址,要求他们单击唯一的链接来确认或使用一些特殊文本回复该电子邮件。
I don't see a fool proof method here. However you can treat this process like a user registration process. Once someone sends an email to you, you store the email in a temp storage, send an auto generated message back to the originating email address, asking them to click on a unique link to confirm or replying to that email with some special text.