Detecting Outlook autoreply/out-of-office emails

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

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.


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/


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