RFC 8058 PROPOSED STANDARD EMAIL · UNSUBSCRIBE · HEADERS

Signaling One-Click Functionality for List Email Headers

A signed email header that tells mail systems they can unsubscribe a user with one automatic HTTPS POST.

On rfc-editor.org ↗
PUBLISHED
January 2017
AUTHORS
J. Levine, T. Herkula
STREAM
IETF
NEW HEADER
List-Unsubscribe-Post
ONLY ALLOWED VALUE
List-Unsubscribe=One-Click
REQUEST METHOD
HTTPS POST
REQUIRED SIGNATURE
DKIM, covering both headers
REDIRECTS
MUST NOT be returned
DOI
10.17487/RFC8058
ERRATA
Reported errata

RFC text

Contents
Original text · RFC Editor View on rfc-editor.org ↗
Internet Engineering Task Force (IETF)                         J. Levine
Request for Comments: 8058                          Taughannock Networks
Category: Standards Track                                     T. Herkula
ISSN: 2070-1721                                              optivo GmbH
                                                            January 2017


        Signaling One-Click Functionality for List Email Headers

Abstract

   This document describes a method for signaling a one-click function
   for the List-Unsubscribe email header field.  The need for this
   arises out of the actuality that mail software sometimes fetches URLs
   in mail header fields, and thereby accidentally triggers
   unsubscriptions in the case of the List-Unsubscribe header field.

Status of This Memo

   This is an Internet Standards Track document.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in Section 2 of RFC 7841.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   http://www.rfc-editor.org/info/rfc8058.

Copyright Notice

   Copyright (c) 2017 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction and Motivation . . . . . . . . . . . . . . . . .   2
   2.  Definitions . . . . . . . . . . . . . . . . . . . . . . . . .   3
   3.  Implementation  . . . . . . . . . . . . . . . . . . . . . . .   4
     3.1.  Mail Senders  . . . . . . . . . . . . . . . . . . . . . .   4
     3.2.  Mail Receivers  . . . . . . . . . . . . . . . . . . . . .   5
   4.  Additional Requirements . . . . . . . . . . . . . . . . . . .   5
   5.  Header Syntax . . . . . . . . . . . . . . . . . . . . . . . .   5
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .   5
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   6
   8.  Examples  . . . . . . . . . . . . . . . . . . . . . . . . . .   7
     8.1.  Simple  . . . . . . . . . . . . . . . . . . . . . . . . .   7
     8.2.  Complex . . . . . . . . . . . . . . . . . . . . . . . . .   7
     8.3.  Complex with 'multipart/form-data'  . . . . . . . . . . .   7
   9.  Normative References  . . . . . . . . . . . . . . . . . . . .   8
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .   8

1.  Introduction and Motivation

   A List-Unsubscribe email header field [RFC2369] can contain HTTPS
   [RFC7230] URIs.  In that header field, the HTTPS URI is intended to
   unsubscribe the recipient of the message from the list.  But anti-
   spam software often fetches all resources in mail header fields
   automatically, without any action by the user, and there is no
   mechanical way for a sender to tell whether a request was made
   automatically by anti-spam software or manually requested by a user.
   To prevent accidental unsubscriptions, senders return landing pages
   with a confirmation step to finish the unsubscribe request.  A live
   user would recognize and act on this confirmation step, but an
   automated system would not.  That makes the unsubscription process
   more complex than a single click.

   Operators of broadcast marketing lists tend to be primarily concerned
   about deliverability of their mail: whether the mail is delivered to
   the recipients and how the messages are presented, e.g., whether in
   the primary inbox or in a junk folder.  Many mail systems allow
   recipients to report mail as spam or junk, and mail streams from
   senders whose mail is often reported as junk tend to have poor
   deliverability.  Hence, the mailers want to make it as easy as
   possible for recipients to unsubscribe; if an unsubscription process
   is too difficult, the recipient's alternative is to report mail from
   the sender as junk until the mail no longer appears in the
   recipient's inbox.

   Operators of recipient mail systems are aware that their users do not
   make a clear distinction between unsubscription and junk.  In some
   cases, they allow trustworthy mailers to request notification when
   their mail is reported as junk so they can unsubscribe the recipient,
   but the process of identifying trustworthy mailers and notifying them
   does not scale well to large numbers of small mailers.  This
   specification provides a way for recipient systems to notify the
   mailer automatically, using only information within the mail message,
   and without prearrangement.  Some recipient systems might wish to
   send an unsubscription notice to mailers whenever a user reports a
   message as junk, or they might offer the user the option of reporting
   and unsubscribing.

   If a mail recipient is unsubscribing manually and the unsubscription
   process requires confirmation, the resulting web page is presented to
   the recipient who can then click the appropriate button.  But when
   the unsubscribe action is combined with a user junk report, there is
   no direct user interaction with the mailer's website.  Similarly, if
   a mail system automatically unsubscribes recipient mailboxes that
   have been closed or abandoned, there can be no interaction with a
   user who is not present.  In those cases, the unsubscription process
   has to work without manual intervention, and in particular without
   requiring that software attempt to interpret the contents of a
   confirmation page.

   This document addresses this part of the problem, with an HTTPS POST
   action for mail receivers.  Mail senders can distinguish this action
   from other unsubscribe requests and handle it as a one-click
   unsubscription without manual intervention by the mail recipient.

   This document has two goals:

   o  Allow email senders to signal that a List-Unsubscribe header field
      [RFC2369] has one-click functionality.

   o  Allow MUA (Mail User Agent) users to unsubscribe from mailing
      lists in a familiar environment and without leaving the MUA
      context.  A receiving system can process an unsubscription request
      in the background without further interaction and know that it can
      be fully processed by the mail sender's system.

2.  Definitions

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in [RFC2119] when written
   in all capital letters.

3.  Implementation

3.1.  Mail Senders

   A mail sender that wishes to enable one-click unsubscriptions places
   one List-Unsubscribe header field and one List-Unsubscribe-Post
   header field in the message.  The List-Unsubscribe header field MUST
   contain one HTTPS URI.  It MAY contain other non-HTTP/S URIs such as
   MAILTO:.  The List-Unsubscribe-Post header MUST contain the single
   key/value pair "List-Unsubscribe=One-Click".  As described below, the
   message MUST have a valid DomainKeys Identified Mail (DKIM) signature
   that covers at least the List-Unsubscribe and List-Unsubscribe-Post
   headers.

   The URI in the List-Unsubscribe header MUST contain enough
   information to identify the mail recipient and the list from which
   the recipient is to be removed, so that the unsubscription process
   can complete automatically.  Since there is no provision for extra
   POST arguments, any information about the message or recipient is
   encoded in the URI.  In particular, one-click has no way to ask the
   user what address or from what list the user wishes to unsubscribe.

   The POST request MUST NOT include cookies, HTTP authorization, or any
   other context information.  The unsubscribe operation is logically
   unrelated to any previous web activity, and context information could
   inappropriately link the unsubscribe to previous activity.

   The URI SHOULD include an opaque identifier or another hard-to-forge
   component in addition to, or instead of, the plaintext names of the
   list and the subscriber.  The server handling the unsubscription
   SHOULD verify that the opaque or hard-to-forge component is valid.
   This will deter attacks in which a malicious party sends spam with
   List-Unsubscribe links for a victim list, with the intention of
   causing list unsubscriptions from the victim list as a side effect of
   users reporting the spam, or where the attacker does POSTs directly
   to the mail sender's unsubscription server.

   The mail sender needs to provide the infrastructure to handle POST
   requests to the specified URI in the List-Unsubscribe header, and to
   handle the unsubscribe requests that its mail will provoke.

   The mail sender MUST NOT return an HTTPS redirect, since redirected
   POST actions have historically not worked reliably, and many browsers
   have turned redirected HTTP POSTs into GETs.

   This document does not update [RFC2369], so the usage of List-
   Unsubscribe URIs other than for one-click remains unchanged.

3.2.  Mail Receivers

   A mail receiver can do a one-click unsubscription by performing an
   HTTPS POST to the HTTPS URI in the List-Unsubscribe header.  It sends
   the key/value pair in the List-Unsubscribe-Post header as the request
   body.

   The POST content SHOULD be sent as 'multipart/form-data' [RFC7578] or
   MAY be sent as 'application/x-www-form-urlencoded'.  These encodings
   are the ones used by web browsers when sending forms.  The target of
   the POST action is the same as the one in the GET action for a manual
   unsubscription, so this is intended to allow the same server code to
   handle both.

   The mail receiver MUST NOT perform a POST on the HTTPS URI without
   user consent.  When and how the user consent is obtained is not part
   of this specification.

4.  Additional Requirements

   The message needs at least one valid authentication identifier.  In
   this version of the specification, the only supported identifier type
   is DKIM [RFC6376].  Hence, senders MUST apply at least one valid DKIM
   signature to the message.

   The List-Unsubscribe and List-Unsubscribe-Post headers MUST be
   covered by the signature and included in the "h=" tag of a valid
   DKIM-Signature header field.

   If the message does not have the required DKIM signature, the mail
   receiver SHOULD NOT offer a one-click unsubscribe for that message.

5.  Header Syntax

   The following ABNF imports fields, WSP, and CRLF from [RFC5322].

   fields =/ list-unsubscribe-post

   list-unsubscribe-post = "List-Unsubscribe-Post:" 0*1WSP postarg CRLF

   postarg = "List-Unsubscribe=One-Click"

6.  Security Considerations

   The List-Unsubscribe header can contain a plaintext or encoded
   version of the recipient address, but that address is usually also in
   the To: header.  This specification allows anyone with access to a
   message to unsubscribe the recipient of the message, but that's
   typically the case with existing List-Unsubscribe, just with more
   steps.

   A malicious mailer could send spam with content intended to provoke
   large numbers of unsubscriptions and with suitably crafted headers to
   send POST requests to servers that perhaps don't want them.  But it's
   been possible to provoke GET requests in a similar way for a long
   time (and much easier, due to spam filter auto-fetches), so the
   chances of significantly increased annoyance seem low.  The content
   of the List-Unsubscribe-Post header is limited to a single known key/
   value pair to prevent an attacker from creating malicious messages
   where the POST operation could simulate a user filling in an
   arbitrary form on a victim website.

   The unsubscribe operation provides a strong hint to the mailer that
   the address to which the message was sent was valid, and could in
   principle be used as a way to test whether an email address is valid.
   In practice, though, there are simpler ways such as embedding image
   links into the HTML of a message and seeing whether the recipient
   fetches the images.

   Since the mailer's server that receives the POST request cannot in
   general tell where the request is coming from, the URI SHOULD contain
   an opaque identifier or another hard-to-forge component to identify
   the list and recipient address.  That can ensure that the request
   originated from the List-Unsubscribe and List-Unsubscribe-Post
   headers in a message the mailer sent.  Also, the request MUST NOT
   include cookies or other context information to prevent the server
   from associating the request with previous web requests.

7.  IANA Considerations

   IANA has added a new entry to the "Permanent Message Header Field
   Names" registry.

   Header field name: List-Unsubscribe-Post

   Applicable protocol: mail

   Status: standard

   Author/Change controller: IETF

   Specification document: RFC 8058

8.  Examples

8.1.  Simple

   Header in Email

   List-Unsubscribe: <https://example.com/unsubscribe/opaquepart>
   List-Unsubscribe-Post: List-Unsubscribe=One-Click

   Resulting POST request

   POST /unsubscribe/opaquepart HTTP/1.1
   Host: example.com
   Content-Type: application/x-www-form-urlencoded
   Content-Length: 26

   List-Unsubscribe=One-Click

8.2.  Complex

   Header in Email

   List-Unsubscribe:
       <mailto:listrequest@example.com?subject=unsubscribe>,
       <https://example.com/unsubscribe.html?opaque=123456789>
   List-Unsubscribe-Post: List-Unsubscribe=One-Click

   Resulting POST request

   POST /unsubscribe.html?opaque=123456789 HTTP/1.1
   Host: example.com
   Content-Type: application/x-www-form-urlencoded
   Content-Length: 26

   List-Unsubscribe=One-Click

8.3.  Complex with 'multipart/form-data'

   Header in Email

   List-Unsubscribe:
       <mailto:listrequest@example.com?subject=unsubscribe>,
       <https://example.com/unsubscribe.html/opaque123456789>
   List-Unsubscribe-Post: List-Unsubscribe=One-Click
   Resulting POST request

   POST /unsubscribe.html/opaque=123456789 HTTP/1.1
   Host: example.com
   Content-Type: multipart/form-data; boundary=---FormBoundaryjWmhtjORrn
   Content-Length: 124

   ---FormBoundaryjWmhtjORrn
   Content-Disposition: form-data; name="List-Unsubscribe"

   One-Click
   ---FormBoundaryjWmhtjORrn--

9.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <http://www.rfc-editor.org/info/rfc2119>.

   [RFC2369]  Neufeld, G. and J. Baer, "The Use of URLs as Meta-Syntax
              for Core Mail List Commands and their Transport through
              Message Header Fields", RFC 2369, DOI 10.17487/RFC2369,
              July 1998, <http://www.rfc-editor.org/info/rfc2369>.

   [RFC5322]  Resnick, P., Ed., "Internet Message Format", RFC 5322,
              DOI 10.17487/RFC5322, October 2008,
              <http://www.rfc-editor.org/info/rfc5322>.

   [RFC6376]  Crocker, D., Ed., Hansen, T., Ed., and M. Kucherawy, Ed.,
              "DomainKeys Identified Mail (DKIM) Signatures", STD 76,
              RFC 6376, DOI 10.17487/RFC6376, September 2011,
              <http://www.rfc-editor.org/info/rfc6376>.

   [RFC7230]  Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
              Protocol (HTTP/1.1): Message Syntax and Routing",
              RFC 7230, DOI 10.17487/RFC7230, June 2014,
              <http://www.rfc-editor.org/info/rfc7230>.

   [RFC7578]  Masinter, L., "Returning Values from Forms: multipart/
              form-data", RFC 7578, DOI 10.17487/RFC7578, July 2015,
              <http://www.rfc-editor.org/info/rfc7578>.

Authors' Addresses

   John Levine
   Taughannock Networks
   PO Box 727
   Trumansburg, NY  14886
   United States of America

   Phone: +1 831 480 2300
   Email: standards@taugh.com
   URI:   http://jl.ly


   Tobias Herkula
   optivo GmbH
   Wallstrasse 16
   Berlin  10179
   Germany

   Phone: +49 30 768078 129
   Email: t.herkula@optivo.com
   URI:   https://www.optivo.com

AI ELI5

On this page
PROBLEMAnti-spam software often fetches URLs in mail headers automatically, so a plain unsubscribe link can trigger accidental unsubscriptions. Confirmation pages protect against that, but they make unsubscribing hard for automated systems.
MECHANISMThe sender adds a List-Unsubscribe-Post header with the fixed value List-Unsubscribe=One-Click. A receiver, with user consent, sends that pair in an HTTPS POST to the HTTPS URI in List-Unsubscribe. The message must carry a DKIM signature covering both headers.
WHY IT MATTERSSenders can tell a deliberate one-click request from an automatic fetch, and receivers can unsubscribe users in the background without parsing a confirmation page.

§1The Accidental Unsubscribe Problem

A List-Unsubscribe header field (RFC 2369) can hold HTTPS URIs meant to unsubscribe the recipient. But anti-spam software often fetches resources in mail headers without any action by the user, and a sender cannot mechanically tell an automatic fetch from a manual request.

To avoid accidents, senders return landing pages with a confirmation step. A person recognizes it, an automated system does not, so unsubscribing becomes more than one click.

Mailers care about deliverability and want unsubscribing to be easy, because a recipient who finds it hard may report the mail as junk instead. Recipient systems know users do not clearly separate unsubscribing from reporting junk. When an unsubscribe is combined with a junk report, or a system removes closed or abandoned mailboxes, nobody is there to click a confirmation page.

If a robot tries every link in your mail, it might press "stop sending me this" for you. A confirmation page stops that, but then a robot can never press it on purpose.

§2Goals and the Basic Idea

The RFC adds an HTTPS POST action for mail receivers. Senders can tell it apart from other unsubscribe requests and handle it as a one-click unsubscription with no manual step.

It has two goals: let senders signal that a List-Unsubscribe header has one-click functionality, and let users of a Mail User Agent (MUA) unsubscribe in a familiar place without leaving it. The receiving system can process the request in the background, knowing the sender's system can fully handle it.

The document does not update RFC 2369, so List-Unsubscribe URIs used any other way work as before.

The mail program sends one small, special message to the sender's website, and the website knows exactly what to do.

§3What Mail Senders Must Do

A sender places one List-Unsubscribe header and one List-Unsubscribe-Post header in the message. The first MUST contain one HTTPS URI and MAY contain other non-HTTP/S URIs such as MAILTO:. The second MUST contain the single pair List-Unsubscribe=One-Click.

Because there is no provision for extra POST arguments, the URI MUST carry enough to identify the recipient and the list. It SHOULD include an opaque or hard-to-forge component, and the server SHOULD verify it. This deters attackers who send spam with unsubscribe links for a victim list, or who POST directly to the unsubscription server.

The POST request MUST NOT include cookies, HTTP authorization or other context, since unsubscribing is unrelated to earlier web activity. The sender MUST NOT return an HTTPS redirect, because redirected POSTs have historically not worked reliably and many browsers turned them into GETs.

The sender puts a secret-code link in each email. The link has to say who you are and which list, because the special message carries nothing else.

§4What Mail Receivers Do

A receiver does a one-click unsubscription by sending an HTTPS POST to the HTTPS URI in List-Unsubscribe, with the key/value pair from List-Unsubscribe-Post as the request body.

The body SHOULD be sent as multipart/form-data (RFC 7578) and MAY be sent as application/x-www-form-urlencoded. These are the encodings browsers use for forms, and the target is the same as for a manual GET unsubscription, so the same server code can handle both.

The receiver MUST NOT POST without user consent. How and when consent is obtained is outside this specification.

The mail program only presses the button after you say it is okay, and it presses it the same way a web form would.

§5The DKIM Requirement

The message needs at least one valid authentication identifier. In this version only DKIM (RFC 6376) is supported, so senders MUST apply at least one valid DKIM signature.

The List-Unsubscribe and List-Unsubscribe-Post headers MUST be covered by the signature and listed in the h= tag of a valid DKIM-Signature header. If the signature is missing, the receiver SHOULD NOT offer one-click unsubscribe for that message.

The sender signs the letter so the mail program can tell the unsubscribe link really came from the sender and was not swapped.

§6Header Syntax and IANA Entry

The new header is defined in ABNF, importing fields, WSP and CRLF from RFC 5322. Its only legal argument is List-Unsubscribe=One-Click.

IANA added List-Unsubscribe-Post to the "Permanent Message Header Field Names" registry, with applicable protocol mail, status standard and the IETF as change controller.

The rules for writing the new header are very strict: there is only one allowed sentence.

HEADER ABNF FROM THE RFC
List-Unsubscribe-Post
fields =/ list-unsubscribe-post

list-unsubscribe-post = "List-Unsubscribe-Post:" 0*1WSP postarg CRLF

postarg = "List-Unsubscribe=One-Click"

§7Security Considerations

The unsubscribe header can include the recipient address, but it is usually also in the To: header. The specification lets anyone with access to a message unsubscribe its recipient, which the RFC notes is typically already true of List-Unsubscribe, just with more steps.

A malicious mailer could try to provoke many unsubscriptions with crafted headers. The RFC judges this unlikely to add much annoyance, since provoking GET requests has long been possible and is easier. The header content is limited to one known key/value pair so an attacker cannot make a POST that simulates a user filling in an arbitrary form on a victim site.

An unsubscribe tells the mailer the address was valid, but the RFC notes simpler ways exist, such as image links. The URI should hold an opaque identifier, and the request carries no cookies, so the server cannot link it to earlier requests.

The only message allowed is one fixed sentence, so a trickster cannot use it to make your mail program fill in some other website's forms.

§8Worked Examples

The RFC gives three examples. The simplest has a single HTTPS URI in List-Unsubscribe, and the resulting POST sends List-Unsubscribe=One-Click as application/x-www-form-urlencoded with a Content-Length of 26.

A second example has both a mailto: URI and an HTTPS URI with an opaque query value. The third shows the same pair sent as multipart/form-data with a form boundary, where the form field is named List-Unsubscribe and its content is One-Click.

The examples show a real header and the exact little message that gets sent back when the button is pressed.

SIMPLE EXAMPLE FROM THE RFC (SECTION 8.1)
Header and resulting POST
List-Unsubscribe: <https://example.com/unsubscribe/opaquepart>
List-Unsubscribe-Post: List-Unsubscribe=One-Click

POST /unsubscribe/opaquepart HTTP/1.1
Host: example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 26

List-Unsubscribe=One-Click

§9References