需要生成持续性瞬态故障
更新:当我发现并非所有邮件服务器都按照“标准”返回错误时,4.xx 与 5.xx 成为我最不用担心的问题。 我现在选择将所有类型的退回邮件作为失败处理,但我将这个问题留在这里,以防它得到答案并帮助其他人。
我的任务是编写一个程序来读取 POP3 帐户,并区分作为永久失败(5.xx 传递状态)和持久暂时失败(4.xx 传递状态)返回的邮件,并对 4.x 进行重试。 xx DSN 并将电子邮件标记为不适合 5.xx DSN。 手动编辑 DSN 正文以将 5.xx 更改为 4.xx 非常容易,但管理层更希望返回“真正的”4.xx。 我这样做遇到了很多麻烦。
测试环境是Windows 2003 Server,运行MS的SMTP和POP3。 我已经尝试超过目标电子邮件地址(5.xx)的配额并锁定帐户(2.xx,他们无法收到电子邮件)。
这是为了租赁结束通知,以防有人感兴趣,这就是为什么我们有兴趣将电子邮件标记为坏邮件或重试失败不是永久性的。
Update: A 4.x.x vs a 5.x.x became the least of my worries when I discovered that not all mail servers return errors according to the "standard". I'm opting to handle all types of returned mail as failures now but I'm leaving this question here in case it gets an answer and helps someone else.
I've been tasked with writing a program to read a POP3 account and differentiate between mail returned as a permanent failure (5.x.x delivery status) and a persistent transient failure (4.x.x delivery status), doing a retry for the 4.x.x DSNs and flagging the email as bad for the 5.x.x DSNs. It's easy enough to hand-edit a DSNs body to change a 5.x.x to a 4.x.x but management would prefer that a "real" 4.x.x be returned. I'm having a lot of trouble doing so.
Test environment is a Windows 2003 Server running MS's SMTP and POP3. I've already tried exceeding the quota on the target email address (5.x.x) and locking the account (2.x.x and they can't get the email).
This is for end-of-lease notices, in case anyone is interested, which is why we're interested in flagging the emails as bad or retrying it the failure wasn't a permanent one.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
产生暂时性故障并不难。 我想到了一些:
Generating a transient failure isn't that hard. A few come to mind: