我怎样才能在.NET实现VERP(可变信封返回路径)?信封、路径、NET、VERP

2023-09-06 17:59:17 作者:爱一瞬间的悲伤

我想implamant在.NET这种反弹的处理协议,但之后我研究升技我发现了附带.NET不支持VERP要求信封分配的基本类

I want to implamant this bounce handling protocol in .NET but after I researched abit I found out that the basic classes that come with .NET don't support envelope assignment required by VERP

有没有变通或者其他的方法?

Is there a work around or another method?

推荐答案

您绝对可以VERP使用实施 System.Net.Mail ,只是生成一个唯一的地址,每个地址,然后在消息反弹,你的包罗万象电子邮件帐户将得到它,你就会知道什么地址无效。

You can definitely implement VERP using System.Net.Mail, just generate a unique from address for each to address, then when the message bounces, your catch-all email account will receive it and you will know what to address to invalidate.

下面是一个一步一步的例子:

Here's a step-by-step example:

您将发送电子邮件至 someuser@somedomain.com 。 您生成一个GUID一个随机的唯一地址,例如:     F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4-customers@mydomain.com 您保持这种关联以上的地址地址字典或数据库表。 您收到一个反弹邮件到包罗万象收件箱,其中recepient是 F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4-客户@ MYDOMAIN .COM ,因此... 您废止 someuser@somedomain.com 在你的数据库。 You will send an email to someuser@somedomain.com. You generate a random unique from address from a GUID, for example: F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4-customers@mydomain.com You keep a dictionary or database table that associates the from address above with the to address. You receive a bounce email to a catch-all inbox where the recepient is F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4-customers@mydomain.com, therefore... You invalidate someuser@somedomain.com in your DB.