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 O
The question asks about detecting autoreply/out-of-office emails and a lot of the answers here refer to the X-Auto-Response
header, which instructs Microsoft Exchange on how to deal with an incoming message with auto-responses. This is the wrong direction; keying on this header does not help detect an auto-response message. (Though theoretically auto-responses would use it in order to prevent an infinite exchange of auto-responses.)
There are lots of dead links in other answers. It appears Microsoft's documentation links don't last.
[MS-OXCMAIL]: RFC 2822 and MIME to Email Object Conversion Algorithm §2.1.3.2.20 Auto Response Suppress (archive link) appears to be the current definitive documentation for this header (even though RFC 2822 has was obsoleted by RFC 5322 in 2008).
X-Auto-Response-Suppress header values:
None
(No meaning given, but this should be self-explanatory)
All
(No meaning given, but this should be self-explanatory)
DR
Suppress delivery reports from transport.
NDR
Suppress non-delivery reports from transport.
RN
Suppress read notifications from receiving client.
NRN
Suppress non-read notifications from receiving client.
OOF
Suppress Out of Office (OOF) notifications.
AutoReply
Suppress auto-reply messages other than OOF notifications.
Example header:
X-Auto-Response-Suppress: RN, NRN
Order does not matter.
I personally find NDR
rather odd since it is another name for a bounce, which typically does not observe message content (i.e. headers). That's SMTP-level (RFC 821/2821/5321) rather than .eml-level (RFC 822/2822/5322).
In a ~million-email sample, I observed the most common values of this header to be:
All
DR, OOF, AutoReply
DR, RN, NRN, OOF, AutoReply
OOF
DR, RN, OOF, AutoReply
OOF, AutoReply