mirror of
https://github.com/zulip/zulip.git
synced 2025-10-30 19:43:47 +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,7 +198,8 @@ def build_email(
|
||||
# have not implemented.
|
||||
if "unsubscribe_link" in context:
|
||||
extra_headers["List-Unsubscribe"] = f"<{context['unsubscribe_link']}>"
|
||||
extra_headers["List-Unsubscribe-Post"] = "List-Unsubscribe=One-Click"
|
||||
if not context.get("remote_server_email", False):
|
||||
extra_headers["List-Unsubscribe-Post"] = "List-Unsubscribe=One-Click"
|
||||
|
||||
reply_to = None
|
||||
if reply_to_email is not None:
|
||||
|
||||
Reference in New Issue
Block a user