Apache Camel 邮件识别自动生成的消息

发布于 2024-11-14 21:57:34 字数 321 浏览 3 评论 0原文

我正在寻找一种方法来识别自动生成的消息,例如 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花之痕靓丽 2024-11-21 21:57:34

我不了解 Apache Camel,但我可以告诉您,一般来说没有简单且安全的方法来检测自动电子邮件。像自动提交这样的标题是一个指示器,但不幸的是许多自动化脚本没有添加它们。我曾经不得不编写一个外出实现,该实现不应向任何自动消息(邮件列表、垃圾邮件、时事通讯等)发送大量回复。这是我最终想到的,也许这对您的情况也有帮助:

发件人地址正则表达式,指示自动发件人:

  • “^owner-”
  • “^request-”
  • “-request@”
  • “反弹。*@"
  • "-confirm@"
  • "-errors@"
  • "^no[-]?reply"
  • "^donotreply"
  • "^postmaster@"
  • "^mailer[-_]daemon@"
  • "^mailer@"
  • "^listserv@"
  • "^majordom[o]?@"
  • "^mailman@"
  • "^nobody@"
  • "^bounce"
  • "^www(-data)?@"
  • "^mdaemon@"
  • "^root@"
  • "^ news(letter)?@"
  • "^webmaster@"(角色地址 - 在您的情况下可能不是一个好的指示符)
  • “^administrator@”(角色地址 - 在您的情况下可能不是一个好的指示符)
  • “^support@” (角色地址 - 在您的情况下可能不是一个好的指标)

标题,指示自动消息(如果它们存在):

  • list-help
  • list-unsubscribe
  • list-subscribe
  • list-owner
  • list-post
  • list-archive
  • list-id
  • mailing-List
  • x-facebook-notify
  • x-mailing-list
  • x-cron-env
  • x-autoresponse
  • x-eBay-mailtracker

标题,表示自动消息(如果有)一个特别的value:

  • 'x-spam-flag':'yes'
  • 'x-spam-status':'yes'
  • 'X-Spam-Flag2': 'yes'
  • 'precedence':'(bulk|list|junk )'
  • 'x-优先级':'(bulk|list|junk)'
  • 'x-barracuda-spam-status':'是'
  • 'x-dspam-result':'(spam|bl[ao]cklisted)'
  • 'X-Mailer':'^Mail$'
  • '自动提交':'自动回复'

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:

  • "^owner-"
  • "^request-"
  • "-request@"
  • "bounce.*@"
  • "-confirm@"
  • "-errors@"
  • "^no[-]?reply"
  • "^donotreply"
  • "^postmaster@"
  • "^mailer[-_]daemon@"
  • "^mailer@"
  • "^listserv@"
  • "^majordom[o]?@"
  • "^mailman@"
  • "^nobody@"
  • "^bounce"
  • "^www(-data)?@"
  • "^mdaemon@"
  • "^root@"
  • "^news(letter)?@"
  • "^webmaster@" (role address - may not be a good indicator in your case)
  • "^administrator@" (role address - may not be a good indicator in your case)
  • "^support@" (role address - may not be a good indicator in your case)

Headers that indicate automated messages if they exist:

  • list-help
  • list-unsubscribe
  • list-subscribe
  • list-owner
  • list-post
  • list-archive
  • list-id
  • mailing-List
  • x-facebook-notify
  • x-mailing-list
  • x-cron-env
  • x-autoresponse
  • x-eBay-mailtracker

Headers that indicate automated messages if they have a special value:

  • 'x-spam-flag':'yes'
  • 'x-spam-status':'yes'
  • 'X-Spam-Flag2': 'yes'
  • 'precedence':'(bulk|list|junk)'
  • 'x-precedence':'(bulk|list|junk)'
  • 'x-barracuda-spam-status':'yes'
  • 'x-dspam-result':'(spam|bl[ao]cklisted)'
  • 'X-Mailer':'^Mail$'
  • 'auto-submitted':'auto-replied'
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文