I do not know Apache Camel, but I can tell you that there is no simple and safe way to detect automatic email messages in general. Headers such as auto-updates are an indicator, but unfortunately many automated scripts do not add them. I once had to write outside the office, which should not send ooo replies to any automatic messages (mailing lists, spam, newsletters, etc.). Here is what I finally came up with, maybe this will help in your case too:
Regular expressions of the sender address , which are indicated by automatic senders:
- "^ owner -"
- "^ request -"
- "- request @"
- "bounce. * @"
- "- confirm @"
- "- errors @"
- "^ no [-]? Answer"
- "^ donotreply"
- "^ postmaster @"
- "^ mailer [-_] daemon @"
- "^ mailer @"
- "^ @ mailing list"
- "^ majordom [o]? @"
- "^ Postman @"
- "^ 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 automatic messages, if they exist :
- help list
- unsubscribe list
- list-subscribe
- list owner
- list-post
- archive list
- id list
- distribution list
- x-facebook notifies
- x mailing list
- x-kron-env
- x-auto answer
- x-eBay-mailtracker
Headers that indicate automatic messages if they have a special meaning :
- x-spam flag: yes
- 'x-spam status': 'yes'
- 'X-Spam-Flag2': 'yes'
- 'seniority': '(bulk | list | junk)
- 'x-seniority': '(bulk | list | junk)
- 'x-barracuda-spam-status': 'yes'
- 'x-DSPAM result': '(spam | bl [ao] cklisted)
- 'X-Mailer': '^ Chainmail $'
- 'auto introduced': 'automatically answered'
source share