← RFC Reference

RFC 8058: One-Click Unsubscribe for Email

Required by Gmail/Yahoo Mailing Lists & Header Fields UnsubscribeBulk Email
ELI5: RFC 2369 gave email an unsubscribe URL, but clicking it opened a web page that might ask for confirmation, a login, or even be a phishing trap. RFC 8058 adds a new header that tells the email client “you can unsubscribe by sending a single HTTP POST to this URL — no browser needed, no confirmation page, just done.”

Why This Exists

RFC 2369's List-Unsubscribe header had a fundamental problem: email clients could not safely act on the URL automatically. An HTTPS URL might lead to a page with a CAPTCHA, a login form, a confirmation step, or even a malicious site. Clients had to open a browser and let the user handle it — adding friction that discouraged use.

RFC 8058 solves this by introducing the List-Unsubscribe-Post header. When present alongside an HTTPS List-Unsubscribe URL, it signals that the email client can send an HTTP POST request directly to unsubscribe the user — no browser, no confirmation, one click.

Since February 2024, Gmail and Yahoo require RFC 8058 compliance for bulk senders (those sending more than 5,000 messages per day to their users). This is no longer optional for commercial email.

How It Works

The mechanism requires two headers working together:

Required Headers

List-Unsubscribe: <https://example.com/unsub?id=abc123>,
    <mailto:unsub-abc123@example.com>
List-Unsubscribe-Post: List-Unsubscribe=One-Click

When the email client sees both headers:

  1. It displays a prominent "Unsubscribe" button in the UI.
  2. When the user clicks it, the client sends an HTTP POST to the HTTPS URL from List-Unsubscribe.
  3. The POST body is exactly: List-Unsubscribe=One-Click
  4. The sender's server processes the POST and unsubscribes the user.

The HTTP POST Request

POST /unsub?id=abc123 HTTP/1.1
Host: example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 26

List-Unsubscribe=One-Click

The Server Response

The server should return a 200 OK status to confirm the unsubscribe succeeded. Any 2xx response indicates success. The response body is not displayed to the user, so it can be empty or contain a simple confirmation.

Key Technical Details

Header Requirements

DKIM Requirement

The message must pass DKIM authentication, and the DKIM signature must cover both the List-Unsubscribe and List-Unsubscribe-Post headers. This prevents attackers from injecting or modifying unsubscribe URLs in transit. Gmail explicitly checks this.

Endpoint Implementation

; Minimal server-side handler (pseudocode)
function handleUnsubscribe(request):
    if request.method != "POST":
        return 405 Method Not Allowed

    if request.body != "List-Unsubscribe=One-Click":
        return 400 Bad Request

    subscriberId = request.queryParams["id"]
    suppressRecipient(subscriberId)
    return 200 OK

Complete Message Headers Example

From: newsletter@example.com
To: user@gmail.com
Subject: Your Weekly Update
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; d=example.com; s=sel1;
    h=from:to:subject:list-unsubscribe:list-unsubscribe-post;
    b=...
List-Unsubscribe: <https://example.com/unsub?id=abc123>,
    <mailto:unsub-abc123@example.com>
List-Unsubscribe-Post: List-Unsubscribe=One-Click
Content-Type: text/html; charset=utf-8

Common Mistakes

Deliverability Impact

Related RFCs