反弹邮件处理PHP - 任何最新的解决方案? [英] Bounced mail Handling in PHP - Any up-to-date solutions?

查看:265
本文介绍了反弹邮件处理PHP - 任何最新的解决方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用PHP做一些反弹的邮件处理。浏览电子邮件是没有问题的,但投入资源编写我们自己的图书馆来解析反弹的电子邮件是非常不希望的。



我发现有3个PHP解决方案应用于处理退回的邮件,但是它们都是过时的,不再维护,我可以看到。 (PHPList,PHPMailer-BMH,Bounce Handler @ PHPClasses.org)



有谁知道处理退回的电子邮件的最新的一套规则?我不一定需要任何处理逻辑,即使只是最新的规则也令人满意。



感谢任何帮助。

解决方案

Bounce处理是不平凡的,因为您需要处理大量不同的服务器和响应。这包括由于您的电子邮件/主机/ IP已被黑名单/垃圾邮件评分而错误配置和退回的服务器。而且由于不在线的自动回复,还有大量的反弹。



我知道的一个简单的解决方案是将自己的头放入标识收件人地址的邮件中和具体发送(一个令牌)。当弹跳时,可以基于此进行验证。



另一个解决方案是将附加信息编码到发件人地址中,并相应地解析以进行反弹。为此,您需要了解电子邮件的工作原理,如果您需要反弹,通常很有用。





在这里有一些很棒的答案(但我没有找到这个答案)这有关于这个主题的许多细节。一般来说,我不了解基于PHP的许多工具来处理反弹,我知道PHPList (用于邮件列表处理的PHP组件)在其存储库中有一些内容:





编辑:相关问题与非常详尽的答案是:





编辑:不是很多,只是一些链接:


我想知道为什么电子邮件弹跳没有标准​​,可以让您轻松识别弹跳和反弹原因 - 或者是在那里? (如RFC)


有一个 RFC3834 - 关于自动回复电子邮件的建议 RFC5436筛选通知机制:mailto



Bouncing也在 RFC5321简单邮件传输协议,这明确地说明了MTA必须如果不能传递消息而返回的原因。



主要的问题是在SMTP中无法验证弹跳地址(发件人),因此发送反弹信息存在可能发生错误的人(Backscatter Spam)的问题。



因此,可靠的邮件服务器不仅可以检查弹跳,还可以使用SMTP来获得一定的质量水平,请参阅:





非传送报告的整个维基百科页面可能对图片的第一个视图很有意思。 / p>

I need to do some bounced mail processing using PHP. Going through the e-mails is no problem, but investing the resources in writing our own library to parse the bounced e-mails is very undesirable.

There are 3 PHP solutions that I've found that are supposed to be for processing bounced mail, but they are all way out of date and no longer maintained, from what I can see. (PHPList, PHPMailer-BMH, Bounce Handler @ PHPClasses.org)

Does anyone know of an up-to-date set of rules for processing bounced e-mails? I don't necessarily need any handling logic, even just an up-to-date ruleset would be satisfactory.

Thanks for any assistance.

解决方案

Bounce handling is non-trivial as you need to deal with a lot of different servers and responses. This includes those servers that are misconfigured and bounces because your email/host/IP has been blacklisted / spam-scored. And there are tons of bounces because of "out of office" auto-replies.

A simple solution I know is to put own headers into the message that identify the reciever address and the concrete sending (a token). When it bounces, the bounce can be verified based upon this.

Another solution is to encode additional information into the sender address and parse it accordingly for bounces. For this you need to know about how email works, which generally is useful if you need with bounces.

There is some great answer here on SO (but I haven't found it for this answer) that goes into many details on the topic. If I find it, I'll add it.

The general point is, that I don't know about many PHP based tools to deal with bounces, I know PHPList (PHP components for mailinglist handling) has something in their repository:

Edit: The related question with the very informative answer is:

Edit: It's not much, just some links:

I am wondering why there is no standard in email bouncing that allows you easily to identify bounces and the bounce reason - or is there? (like a RFC)

There is RFC3834 - Recommendations for Automatic Responses to Electronic Mail which go updated by RFC5436 Sieve Notification Mechanism: mailto.

Bouncing is also discussed in part in RFC5321 Simple Mail Transfer Protocol, which clearly gives a reason that an MTA must report back if a message can not be delivered.

The main problem is that the bounce-address (the sender) can not be verified in SMTP, so sending a bounce message bears the problem that it probably goes to a wrong person (Backscatter Spam).

A relyable mailer therefore not only checks for bounces but does more with SMTP to gain a certain level of quality, see:

The whole Wikipedia page of the Non delivery report might be interesting for a first view on the picture.

这篇关于反弹邮件处理PHP - 任何最新的解决方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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