Skip to content

Commit 388eca6

Browse files
committed
New reply rules and limits
1 parent b969e9f commit 388eca6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/content/docs/email-routing/email-workers/reply-email-workers.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@ export default {
4040
}
4141
```
4242

43-
To mitigate security risks and abuse, replying to incoming emails has a few requirements:
43+
To mitigate security risks and abuse, replying to incoming emails has a few requirements and limits:
4444

4545
* The incoming email has to have valid [DMARC](https://www.cloudflare.com/learning/dns/dns-records/dns-dmarc-record/).
4646
* The email can only be replied to once in the same `EmailMessage` event.
47-
* The `In-Reply-To` header of the reply message must be set to the `Message-ID` of the incoming message.
4847
* The recipient in the reply must match the incoming sender.
4948
* The outgoing sender domain must match the same domain that received the email.
49+
* Both the `In-Reply-To` and `References` headers of the reply message must be set.
50+
* Every time an email passes through Email Routing or another MTA, an entry is added to the `References` list. We stop accepting replies to emails with more than 100 `References` entries to prevent abuse or accidental loops.
5051

51-
If these and other internal conditions are not met, then `reply()` will fail with an exception, otherwise you can freely compose your reply message and send it back to the original sender.
52+
If these and other internal conditions are not met, `reply()` will fail with an exception. Otherwise, you can freely compose your reply message, send it back to the original sender, and receive subsequent replies multiple times.

0 commit comments

Comments
 (0)