postfix php mail,Postfix Php Mail()VS Postfix SMTP

Delivery Reputation: Would using php mail() vs SMTP make any difference with the delivery rate? From what I understand, Postfix is going to be using SMTP protocol when communicating with other servers on the internet when delivering emails, so therefore is it safe to assume that it doesnt matter if the email was sent to postfix via php mail or smpt from localhost? Does any of these 2 methods affect the email reputation is any ways even in a small way?

没有关系. Postfix可以通过mail()和SMTP接收电子邮件.处理后,postfix将通过SMTP发送.

基准吧!我没有这方面的任何数据.

这里涉及mail()和SMTP的过程是什么?

在mail()命令中,PHP调用sendmail命令,程序将您的电子邮件放在maildrop队列目录中的文件中. Pickup守护程序扫描该目录,并将电子邮件移动到清理守护程序.

在SMTP中,PHP通过SMTPd创建与后缀服务器的连接.完成SMTP仪式后,SMTPd将检查电子邮件是否允许.如果允许电子邮件,它会将其传递给清理守护程序.

Security Issue: When I searched for the difference between the two, many sites says about the security issue with php mail since a hacker can upload php script to send out spams. But I can also see another security issue with SMTP as well since the SMTP username and passwords are stored in configuration file in text which is not secure neither. Since there are security issues for both methods, does one weigh better than the other in any aspects?

正如@Tutul在另一个回答中所说,你可能希望一些垃圾邮件脚本使用mail()发送垃圾邮件.是的,这是在php中阻止邮件命令的考虑因素之一.

但是,有一个原则是:一旦某人成功将脚本放入您的Web和邮件服务器,他就可以发送PHP的使用能力,通过mail()和SMTP发送电子邮件.

在PHP本身,没有保护限制垃圾邮件发送者可以调用多少SMTP连接或mail().放置防线的一个地方是MTA(后缀).不幸的是,您无法限制从mail()命令调用的传入邮件.但是,您可以限制从SMTP连接发出的发送请求数. Policyd或postfwd可以帮助postfix节流它.

注意:以上说明是关于接收电子邮件时的限制流程.当然,你可以在发送电子邮件时加油.例如,您每分钟限制20封电子邮件到@ gmail.com以避免GMAIL黑名单守护程序阻止您.请参阅有关Postfix Performance Tuning的文档

最后的说明

恕我直言,我更喜欢通过SMTP发送电子邮件.您可以使用MTA作为防止垃圾邮件爆发的额外保护.您可能必须在PHP中处理另一个邮件队列,因为@Sanmain在另一个答案中说:)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值