HACKER Q&A
📣 whack

How do email services prevent auto-reply loops?


Suppose persons A and B are both out-of-office, and have enabled their respective auto-reply feature. Person A then sends an email to person B.

In a naive email service, that initial email will trigger an auto-response from B, which will then trigger another auto-response from A, which will trigger another auto-response from B... and you wind up with an infinite loop.

I hear that most email services already have systems in place to detect and prevent the above loop from happening. How is this implemented?

By checking to see if the sender has already sent an identical email recently?

By checking to see if the message contains various hard-coded strings such as "out of office"?

By checking to see if the reply was sent almost immediately after the original message was sent?

All of the above heuristics seem like they could be broken under various scenarios. Are email services using some other more deterministic way to detect auto-reply emails?


  👤 deedubaya Accepted Answer ✓
Email servers will add a message header if an auto-responder shouldn't respond to the message. A google search will provide more details.