Max Al Farakh Blog

Detecting Outlook autoreply/out-of-office emails and X-Auto-Response-Suppress header

Aug 15 2014 :: by Max

In our helpdesk app we have a method called IsUselessEmail(). Its purpose is to filter through all incoming email and drop all bounces, autoreplies etc. This is a tough problem since we need to drop as much garbage as possible, but pass through any useful emails.

We've been constantly refining that method over the years adding more and more filters. Recently I've been googling for what others are doing and saw a lot of people suggesting to add X-Auto-Response-Suppress (as well as other headers we've already had) to the filters. We've added it, ran some basic tests and deployed the app. Later that day we've lost tens of perfectly good emails.

Do not use X-Auto-Response-Suppress

Information about X-Auto-Response-Suppress header is practically non-existent. All we have from official sources is this mysterious MSDN page, which doesn't explain its purpose. After some digging, I found out that this header is used only by Microsoft Exchange and it's purpose is to prevent other Exchange servers from sending auto-replies in response to an email with that header. It doesn't mean that this email is garbage at all.

If anything, you can use X-Auto-Response-Suppress the other way around. You can add something like this to your outgoing email to minimize the number of useless emails you get in response:

X-Auto-Response-Suppress:OOF

So, don't ever use X-Auto-Response-Suppress in your filters or you risk loosing many perfectly good email.

Headers that are safe to use

Through trial and error we've figured out what headers you actually should use to detect auto-responses. Here they are:

  • X-Autoreply
  • X-Autorespond
  • auto-submitted with a value of "auto-replied"

If any of those are present in an email, then that email is an auto-reply


'Detecting Outlook autoreply/out-of-office emails and X-Auto-Response-Suppress header' was written by Max by Max. co-counder


comments