mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 04:23:46 +00:00
send_email: Remove List-Unsubscribe-Post from remote-server emails.
For remote servers, we cannot advertise `List-Unsubscribe=One-Click`, which is specified in RFC 8058[^1] to mean that the `List-Unsubscribe` URL supports a POST request with no arguments to unsubscribe. Because we show an interstitial and confirmation page, as this is not just a mailing list which is disabled if you click the link, it does not support the mail system performing the unsubscribe for the user. Remove the inaccurate header for remote servers. [^1]: https://datatracker.ietf.org/doc/html/rfc8058
This commit is contained in:
committed by
Tim Abbott
parent
0fe725fdbd
commit
8102519242
@@ -198,6 +198,7 @@ def build_email(
|
|||||||
# have not implemented.
|
# have not implemented.
|
||||||
if "unsubscribe_link" in context:
|
if "unsubscribe_link" in context:
|
||||||
extra_headers["List-Unsubscribe"] = f"<{context['unsubscribe_link']}>"
|
extra_headers["List-Unsubscribe"] = f"<{context['unsubscribe_link']}>"
|
||||||
|
if not context.get("remote_server_email", False):
|
||||||
extra_headers["List-Unsubscribe-Post"] = "List-Unsubscribe=One-Click"
|
extra_headers["List-Unsubscribe-Post"] = "List-Unsubscribe=One-Click"
|
||||||
|
|
||||||
reply_to = None
|
reply_to = None
|
||||||
|
|||||||
Reference in New Issue
Block a user