<?xml version="1.0" encoding="US-ASCII"?>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
        <!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
        <!ENTITY RFC2369 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2369.xml">
        <!ENTITY RFC6376 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6376.xml">
        ]>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<?rfc toc="yes" ?>
<?rfc tocindent="yes" ?>
<?rfc tocdepth="2" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<rfc category="std" docName="draft-levine-herkula-oneclick-01" ipr="trust200902">
    <front>
        <title abbrev="One click unsubscribe">Signalling one-click functionality for list email headers</title>
        <author fullname="John Levine" initials="J." surname="Levine">
            <organization>Taughannock Networks</organization>
            <address>
                <postal>
                    <street>PO Box 727</street>
                    <city>Trumansburg</city>
                    <code>14886</code>
                    <region>NY</region>
                </postal>
                <phone>+1 831 480 2300</phone>
                <email>standards@taugh.com</email>
                <uri>http://jl.ly</uri>
            </address>
        </author>
        <author fullname="Tobias Herkula" initials="T." surname="Herkula">
            <organization>optivo GmbH</organization>
            <address>
                <postal>
                    <street>Wallstrasse 16</street>
                    <city>Berlin</city>
                    <code>10179</code>
                    <country>DE</country>
                </postal>
                <phone>+49 30 768078 129</phone>
                <email>t.herkula@optivo.com</email>
                <uri>https://www.optivo.com</uri>
            </address>
        </author>
        <date month="July" year="2016"/>
        <area>Operations and Management</area>
        <keyword>email</keyword>
        <keyword>mailing list</keyword>
        <abstract>
            <t>
                This document describes a method for signaling a one-click function for
                the list-unsubscribe email header. The need for this arises out of the
                actuality that mail software sometimes fetches URLs in mail headers, and
                thereby accidentally triggers unsubcriptions in the case of the
                list-unsubscribe header.
            </t>
        </abstract>
    </front>
    <middle>
        <section title="Introduction">
            <t>
                An <xref target="RFC2369" /> email header can contain HTTP or HTTPS URIs. In a
                List-Unsubscribe Header the HTTP or HTTPS URI should unsubscribe the
                recipient of the email from the list. But anti-spam software often
                fetches all resources in mail headers automatically, without any action
                by the user.
                As a result of this unintended malicious behavior, senders implement
                landing pages with a confirmation step to finish the unsubscribe
                request. This document addresses this part of the problem, with a POST
                action for receivers that can be distinguished by senders from other
                requests and therefore handled as a one-click unsubscription.
            </t>
        </section>
        <section title="Definitions">
            <t>
                The capitalized 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
                <xref target="RFC2119" />.
            </t>
            <t>
                One-click describes an action that directly triggers a change in a
                system's state, intended to be applied only with a user's intent.
            </t>
        </section>
        <section title="High-Level Goals">
            <t>This document has several goals.
                <list style="symbols">
                    <t>
                        Allow email senders to signal "One-Click" functionality for specific
                        HTTP and HTTPS URIs used in <xref target="RFC2369" /> email headers.
                    </t>
                    <t>
                        Allow MUA designers to implement independent user interface features for
                        a better user experience.
                    </t>
                    <t>
                        Allow MUA users to trigger intended actions in a familiar environment
                        and without leaving the MUA context.
                    </t>
                </list>
            </t>
        </section>
        <section title="Out of Scope">
            <t>
                This document does not address problems associated with intended
                malicious behavior.
            </t>
        </section>
        <section title="Implementation">
            <section title="Mail senders">
                <t>
                    An entity which is responsible for sending an email that wishes to add
                    an HTTP or HTTPS URI for one-click unsubscriptions places both a
                    List-Unsubscribe and a List-Unsubscribe-Post header in the message.  The
                    List-Unsubscribe-Post header may contain multiple key value pairs needed
                    by the sending entity.  It also MUST contain the key value pair
                    "List-Unsubscribe=One-Click".
                </t>
                <t>
                    The combination of the URI in the List-Unsubscribe header and the POST
                    arguments in the List-Unsubscribe-Post header MUST identify the mail
                    recipient, so that the unsubscription process knows what address to
                    handle.  In particular, "one click" has no way to manually ask the user
                    what address he or she wishes to unsubscribe.
                </t>
                <t>
                    The sending entity needs to provide the infrastructure to handle POST
                    requests to the specified URI in the List-Unsubscribe header.
                </t>
                <t>
                    The "One-Click" action triggered by this URI SHOULD complete promptly
                    and not burden the requester in an inappropriate way.  The sending entity
                    cannot expect that HTTP redirects are followed by the requester.
                </t>
            </section>
            <section title="Mail receivers">
                <t>
                    A receiving entity which wants to use a List-Unsubscribe HTTP URI from
                    an email that also contains a List-Unsubscribe-Post header performs an
                    HTTP or HTTPS POST to the first HTTP or HTTPS URI in the
                    List-Unsubscribe header and send the content of the
                    List-Unsubscribe-Post header as request body with the content type set
                    to "application/x-www-form-urlencoded".
                </t>
                <t>
                    The receiving entity MUST NOT perform a POST on the the HTTP or HTTPS
                    URI without user consent.  When and how the user consent is obtained is
                    not part of this specification.
                </t>
                <t>
                    The Request uses the HTTP or HTTPS verb POST. The HEAD and GET requests
                    are not intended to be used to trigger a state change.  PUT and DELETE
                    would offer similar functionality but are often unavailable.
                </t>
            </section>
        </section>
        <section title="Additional Requirements">
            <t>
                The email needs at least one valid authentication identifier. In this
                version of the specification the only supported identifier type is DKIM
                <xref target="RFC6376" />, that provides a domain-level identifier in the content of the
                "d=" tag of a validated DKIM-Signature header field.
            </t>
            <t>
                The List-Unsubscribe and List-Unsubscribe-Post headers need to be
                included in the "h=" tag of a valid DKIM-Signature header field.
            </t>
            <t>
                The domain used in the HTTP or HTTPS URI MUST align with the domain used
                in the "d=" tag of the valid DKIM-Signature header field in which the
                headers are included in the "h=" tag.
            </t>
        </section>
        <section title="IANA Considerations">
            <t>
                IANA is requested to add a new entry to the Permanent Message Header
                Field Names registry.
            </t>
            <t>
                Header field name: List-Unsubscribe-Post
            </t>
            <t>
                Applicable protocol: mail
            </t>
            <t>
                Status: standard
            </t>
            <t>
                Author/Change controller: IETF
            </t>
            <t>
                Specification document: this document
            </t>
        </section>
        <section title="Examples">
            <section title="Simple">
                <figure>
                    <preamble>Header in Email</preamble>
                    <artwork><![CDATA[
List-Unsubscribe: <https://example.com/unsubscribe.html>
List-Unsubscribe-Post: List-Unsubscribe=One-Click&recip=user@example.com
]]></artwork>
                </figure>
                <figure>
                    <preamble>Resulting POST request</preamble>
                    <artwork><![CDATA[
POST /unsubscribe.html HTTP/1.1
Host: example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 49

List-Unsubscribe=One-Click&recip=user@example.com
]]></artwork>
                </figure>
            </section>
            <section title="Complex">
                <figure>
                    <preamble>Header in Email</preamble>
                    <artwork><![CDATA[
List-Unsubscribe: <mailto:listrequest@example.com?subject=unsubscribe>,
    <https://example.com/unsubscribe.html?campaign=123456789>
List-Unsubscribe-Post: List-Unsubscribe=One-Click
]]></artwork>
                </figure>
                <figure>
                    <preamble>Resulting POST request</preamble>
                    <artwork><![CDATA[
POST /unsubscribe.html?campaign=123456789 HTTP/1.1
Host: example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 49

List-Unsubscribe=One-Click&recip=user@example.com
]]></artwork>
                </figure>
            </section>
        </section>
        <section title="Security Considerations">
            <t>
                The List-Unsubscribe-Post header will typically contain 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.
            </t>
        </section>
    </middle>
    <back>
        <references title="Normative References">
            &RFC2119;
            &RFC2369;
            &RFC6376;
        </references>
    </back>
</rfc>
