element-hq / element-hq/synapse

Emails sent from Synapse should include headers that enable automated bounce and complaint handling

Open
#14,684 0 comments 0 reactions 0 assignees View on GitHub
A-3PID O-Occasional S-Minor T-Enhancement
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#14684](https://github.com/matrix-org/synapse/issues/14684).

---

**Description:**

Various email providers require you to keep your bounce & complaints rates low to keep being able to sending through them. Various providers also provide reports or feedback on which emails have bounced or been complained about. For low traffic homeservers it maybe possible to handle these reports manually, but it is less feasible for high traffic homeservers so there should be automation.

Proposal:
* Each and every email sent via Synapse includes 2 emails headers: 1 with a URL to an API indicating that this email bounced, 1 with a URL to an API indicating that this email was complained about
* The URL should include enough parameters to provide the context (e.g. sender MXID, email type) that would allow Synapse to handle the bounce / complaint report
* Alternatively at sending time, Synapse could store the context against message-id in the email and the API provides that message-id back
* Homeserver administrators could setup a system that automatically processes bounce / complaint reports from the email provider and call the appropriate API
* On the API being called Synapse performs appropriate actions. The appropriate actions likely differ per report type and per email type and would require discussion, e.g.:
* For repeated bounces to "You have new messages" emails we probably want to remove the pusher
* For complaints about being invited to a room we may want to block further attempts to that email address for that room
* For complaints about email address verification emails we may either not want to block at all or just block for a short period of time

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.