Detecting Outlook autoreply/out-of-office emails

冷暖自知 提交于 2019-11-27 11:47:30

问题


Been googling for this and haven't found anything ...

Does anybody know if there is 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.


回答1:


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.




回答2:


Look for these headers:

  • x-autorespond
  • precedence or x-precedence with value "auto_reply", "bulk" or "junk"
  • auto-submitted with value "auto-replied"
  • x-auto-response-suppress (not always, see answer below)

And subjects starting with:

  • Auto:
  • Automatic reply
  • Autosvar
  • Automatisk svar
  • Automatisch antwoord
  • Abwesenheitsnotiz
  • Risposta Non al computer
  • Automatisch antwoord
  • Auto Response
  • Respuesta automática
  • Fuori sede
  • Out of Office
  • Frånvaro
  • Réponse automatique



回答3:


It's worth noting that Exchange is supposed to suppress out-of-office emails in response to messages with a Precedence:bulk or X-Auto-Response-Suppress:OOF header:

http://blogs.technet.com/b/exchange/archive/2006/10/06/3395024.aspx




回答4:


This question often comes up in Google, so I decided to add an important note.

Don't ever use X-Auto-Response-Suppress in your filters as suggested in the other answer.

X-Auto-Response-Suppress is used by Exchange to tell other servers to not send auto-replies in response to an email. It doesn't mean that this email is an auto-response.

We had to learn it the hard way, hope you won't have to. I've also wrote a blog post with more details: http://www.jitbit.com/maxblog/18-detecting-outlook-autoreplyout-of-office-emails-and-x-auto-response-suppress-header/




回答5:


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

X-Auto-Response-Suppress:OOF

1"OOF" means "out of facility", a rudiment from Xenix(!) that M$ used for mail in the past.




回答6:


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.



来源:https://stackoverflow.com/questions/1027395/detecting-outlook-autoreply-out-of-office-emails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!