Detecting Outlook autoreply/out-of-office emails

前端 未结 7 903
旧巷少年郎
旧巷少年郎 2020-12-08 07:55

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

相关标签:
7条回答
  • 2020-12-08 08:30

    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:

    1. All
    2. DR, OOF, AutoReply
    3. DR, RN, NRN, OOF, AutoReply
    4. OOF
    5. DR, RN, OOF, AutoReply
    6. OOF, AutoReply
    0 讨论(0)
提交回复
热议问题