检测 Outlook 自动回复/外出电子邮件
有没有办法,给定一个 Outlook 电子邮件项目,检测它是否是由“外出助手”发送的?
Outlook 是否在对象上设置任何属性或任何标头信息来标识电子邮件本身? 我希望不必解析“外出”等主题行。
如果有一些标准,那就太好了,这样来自其他电子邮件服务(如 Gmail)的自动回复也可以被检测到,但对我来说 Outlook 是最高优先级。
Is there a way, given an Outlook email item, to detect whether it was sent by the "Out Of Office Assistant"?
Is there any property that Outlook sets on the object, or any header information, that identifies an email as such? I was hoping not to have to parse the subject line for "Out Of Office", etc.
It would be great if there were some standard, so autoreplies from other email services (like Gmail) could also be detected, but for me Outlook is the highest priority.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
切勿按照此答案X-Auto-Response-Suppress >。
Exchange 使用
X-Auto-Response-Suppress
来告诉其他服务器不要发送自动回复以响应电子邮件。 这并不意味着这封电子邮件是自动回复。有关更多详细信息,请参阅我的博客:
Don't ever use
X-Auto-Response-Suppress
in your filters as suggested in this answer.X-Auto-Response-Suppress
is used by Exchange to tell other servers not to send auto-replies in response to an email. It doesn't mean that this email is an auto-response.See my blog for more details: http://www.jitbit.com/maxblog/18-detecting-outlook-autoreplyout-of-office-emails-and-x-auto-response-suppress-header/
查找以下标头:
并且主题开头为:
Look for these headers:
And subjects starting with:
值得注意的是,Exchange 应该抑制外出电子邮件,以响应带有
Precedence:bulk
或X-Auto-Response-Suppress:OOF
标头的邮件:https://web.archive.org/web/20160301155816/http://blogs.technet.com/b/exchange/archive/2006/10/06/3395024.aspx
It's worth noting that Exchange is supposed to suppress out-of-office emails in response to messages with a
Precedence:bulk
orX-Auto-Response-Suppress:OOF
header:https://web.archive.org/web/20160301155816/http://blogs.technet.com/b/exchange/archive/2006/10/06/3395024.aspx
有一个标头字段 (http://www.iana .org/assignments/auto-subscribed-keywords/auto-subscribed-keywords.xhtml),但似乎 MS Outlook 没有设置它(至少 Outlook 2003 没有设置)。
我想你必须解析主题行。
There is a header field (http://www.iana.org/assignments/auto-submitted-keywords/auto-submitted-keywords.xhtml) but it seems that MS Outlook does not set it (at least, not Outlook 2003).
I guess that you have to parse the subject line.
该问题询问有关检测自动回复/外出电子邮件的信息,此处的许多答案都引用了
X-Auto-Response
标头,该标头指示 Microsoft Exchange 如何处理传入的邮件自动回复。 这是错误的方向; 键入此标头无助于检测自动响应消息。(尽管理论上自动响应会使用它来防止自动响应的无限交换。)其他答案中有很多死链接。 看来微软的文档链接不会持久。
[MS-OXCMAIL]:RFC 2822 和 MIME 到电子邮件对象转换算法 §2.1.3.2.20 自动响应抑制 (存档链接)似乎是当前的此标头的权威文档(尽管 RFC 2822 已被 RFC 5322(2008 年)。
X-Auto-Response-Suppress 标头值:
示例标题:
顺序无关紧要。
我个人觉得
NDR
相当奇怪,因为它是退回邮件的另一个名称,通常不会观察邮件内容(即标头)。 这是 SMTP 级别 (RFC 821/2821/5321),而不是 .eml 级别(RFC 822/2822/5322)。在〜百万电子邮件示例中,我观察到此标头最常见的值为:
All
DR、OOF、AutoReply
DR、RN、NRN、OOF 、自动回复
OOF
DR、RN、OOF、自动回复
OOF、自动回复
The question asks about detecting autoreply/out-of-office emails and a lot of the answers here refer to the
X-Auto-Response
header, which instructs Microsoft Exchange on how to deal with an incoming message with auto-responses. This is the wrong direction; keying on this header does not help detect an auto-response message. (Though theoretically auto-responses would use it in order to prevent an infinite exchange of auto-responses.)There are lots of dead links in other answers. It appears Microsoft's documentation links don't last.
[MS-OXCMAIL]: RFC 2822 and MIME to Email Object Conversion Algorithm §2.1.3.2.20 Auto Response Suppress (archive link) appears to be the current definitive documentation for this header (even though RFC 2822 was obsoleted by RFC 5322 in 2008).
X-Auto-Response-Suppress header values:
Example header:
Order does not matter.
I personally find
NDR
rather odd since it is another name for a bounce, which typically does not observe message content (i.e. headers). That's SMTP-level (RFC 821/2821/5321) rather than .eml-level (RFC 822/2822/5322).In a ~million-email sample, I observed the most common values of this header to be:
All
DR, OOF, AutoReply
DR, RN, NRN, OOF, AutoReply
OOF
DR, RN, OOF, AutoReply
OOF, AutoReply
我查看了 Outlook 自动回复电子邮件的标题,但没有发现任何特殊之处。
您可以在这里尝试一个小技巧 - 只需跟踪邮件服务器向用户发送邮件的时间即可。 如果邮件服务器在几秒内(比如不到 10 秒)收到回复邮件,则可能是自动回复。 将此与主题解析结合起来,以便更好地检测自动回复邮件。 这不是一个具体的方法,但我想它会起作用。
I looked into header of Outlook auto reply emails but didn't find any special.
You can try a little trick here - Just keep track of time at which your mail server sends out the mail to users. If the mail server receives a reply mail within few seconds (say less than 10 seconds), its probably an auto reply. Incorporate this with subject parsing to get better detection of auto reply mails. Its not a concrete method but I guess it will work.
根据 Exchange Server 2007 外出 (OOF)1 - Exchange 团队博客,的权威标志Exchange 的外出回复为
1:“OOF”表示“不在办公室”,M$ 过去用于邮件的 Xenix(!) 的雏形< /a>.
According to Exchange Server 2007 Out of Office (OOF)1 - Exchange Team Blog, the authoritative sign of an Exchange's Out-of-Office reply is
1: "OOF" means "out of facility", a rudiment from Xenix(!) that M$ used for mail in the past.