Apache Camel 邮件识别自动生成的消息
我正在寻找一种方法来识别自动生成的消息,例如 Outlook 的“外出”回复。
我偶然发现了一个名为“自动提交”的标头,它应该可以解决问题,但是 Camel 没有似乎在“Message”对象中提供了此标头。参考:http://www.iana.org/assignments/auto-subscribed-keywords/auto-subscribed-keywords.xml
是否可以知道消息是自动生成的还是人工生成的?
I'm looking for a way to identify auto generated messages like Outlook's "Out of office" replies.
I stumbled upon a header called "Auto-submitted" that's supposed to do the trick, but Camel doesn't seems to provide this header in the "Message" object. Reference: http://www.iana.org/assignments/auto-submitted-keywords/auto-submitted-keywords.xml
Is it possible to know if a message is auto generated or human generated?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不了解 Apache Camel,但我可以告诉您,一般来说没有简单且安全的方法来检测自动电子邮件。像自动提交这样的标题是一个指示器,但不幸的是许多自动化脚本没有添加它们。我曾经不得不编写一个外出实现,该实现不应向任何自动消息(邮件列表、垃圾邮件、时事通讯等)发送大量回复。这是我最终想到的,也许这对您的情况也有帮助:
发件人地址正则表达式,指示自动发件人:
标题,指示自动消息(如果它们存在):
标题,表示自动消息(如果有)一个特别的value:
I don't know Apache Camel, but I can tell you that there is no simple and safe way to detect automated email messages in general. Headers like auto-submitted are an indicator, but unfortunately lots of automated scripts do not add them. I once had to write an out-of-office implementation that should not send ooo replies to any automated messages (mailing lists, spam, newsletters, etc.). Here is what I finally came up with, maybe this helps in your case as well:
Sender address regular expressions that indicate automated senders:
Headers that indicate automated messages if they exist:
Headers that indicate automated messages if they have a special value: