<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>

<!-- 
     draft-crocker-dkim-dkor-00
  
     Documentation is at https://authors.ietf.org/en/templates-and-schemas
-->


<!DOCTYPE rfc  [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" docName="draft-crocker-dkim-dkor-00"
  ipr="trust200902" submissionType="IETF" xml:lang="en" version="3">

  <front>
    <title abbrev="DKOR">DomainKeys Originator Recipient (DKOR)</title>

    <seriesInfo name="Internet-Draft" value="draft-crocker-dkim-dkor-00"/>

    <author fullname="Dave Crocker" initials="D" surname="Crocker">
      <organization>Brandenburg Internetworking</organization>
      <address>
        <email>dcrocker@bbiw.net</email>
        <uri>https://bbiw.net</uri>
      </address>
    </author>

    <date year="2025"/>

    <area>General</area>
    <workgroup>Internet Engineering Task Force</workgroup>
    <!-- "Internet Engineering Task Force" is fine for individual
      submissions.  If this element is 
      not present, the default is "Network Working Group", which 
      is used by the RFC Editor as a nod to the history of the 
      RFC Series. -->
    <keyword>email</keyword>
    <keyword>DKIM</keyword>
    <keyword>DKIM replay</keyword>

    <abstract>
      <t>DKIM associates a domain name with a message stream, using cryptographic methods, to permit
        reliable and accurate reputation-oriented analysis of the stream. It is possible for an
        authorized user to conspire for additional distribution of a message, leveraging the domain
        name reputation for promoting spam. This is called DKIM Replay. DKOR defines a means of
        limiting that ability, by associating original addressing information with the message's
        DKIM signature, to detect distribution beyond the intended recipient. DKOR uses existing
        DKIM services and only requires implementation of the additional DKOR features by the signer
        and any receiving site wishing to participate in DKOR services. Other DKIM receivers can
        successfully process the same DKIM signature without knowledge of DKOR.</t>
    </abstract>

  </front>

  <middle>

    <section>
      <name>Introduction</name>

      <t>DKIM <xref target="RFC6376"/> associates a domain name with a message stream, using
        cryptographic methods, to permit reliable and accurate reputation-oriented analysis of the
        stream. Each message in the stream has a DKIM digital signature attached to it, using the
        domain name. Receiving sites can then develop a reputation analysis for messages in that
        stream, without concern that a message was created by an unauthorized actor.</t>

      <t>However, it is possible for an authorized user of a platform, which is signing messages
        with a domain name, to conspire for additional distribution of a message, beyond the set of
        recipients that were included at the time of original posting. The message goes through an
        additional platform, which then redistributes the message, while preserving the original
        DKIM signature. Reception and delivery of the message to these additional recipients is
        aided by the reputation of the domain name used in the DKIM signature. This capability can,
        therefore, be used for spamming, and is called "DKIM Replay".</t>

      <t>Ideally, authorized users of a platform are subject to sufficient controls and
        accountability, so their likelihood -- or even ability -- to effect this abuse is severely
        limited. Unfortunately, operational realities on some platforms do not achieve such control.
        There is therefore a need for an additional mechanism, to aid detection of DKIM Replay and
        to facilitate differential handling of such messages, during email transit. </t>

      <t>Extensive community discussion converged on the view that a useful line of effort, for
        enabling this detection, is to include the email envelope address (e.g., SMTP RCPT-TO) <xref
          target="RFC5321"/> as part of the DKIM hash calculation. There is also interest in
        similarly encoding the email envelope notification return address (e.g., SMTP MAIL FROM),
        with the view that this might be helpful in efforts to limit use of the return 'channel' as
        a spamming path, called backscatter. </t>

      <aside>
        <dl newline="true">
          <dt>[ Comment: </dt>
          <dd>Including the return address (still) needs a more complete explanation. I gather it is
            for backscatter control, but am not at all clear on how it will get used to achieve
            that. So its inclusion here is as a placeholder, pending further discussion and
            clarifying text. /d ]</dd>
        </dl>
      </aside>

    </section>

    <section>
      <name>Framework and Terminology</name>
      <t>Internet Mail has an extensive architecture and rich associated vocabulary. Unless
        otherwise indicated, email terminology and reference to functional components are taken
        from: <xref target="RFC5598"/>
      </t>

      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT",
        RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
        interpreted as described in BCP 14 <xref target="RFC2119"/>
        <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here. </t>

      <t keepWithNext="true">Reference to SMTP in this document is strictly informative. Nothing in
        this specification is dependent upon the specific email transport service details, other
        than being able to obtain recipient and return address information.<xref target="RFC5598"
        /></t>
      <t indent="8">
        <strong>The means for obtaining recipient address and return address are outside the scope
          of this specification.</strong></t>

    </section>

    <section>
      <name>Requirements</name>

      <t>Assessing the nature and legitimacy of a received message entails a complex and imperfect
        process. It typically includes a variety of information, derived from a variety of sources,
        using a variety of methods. This specification seeks to satisfy a narrow and specific part
        of these broad requirements. Other methods will be separate and complementary to this.</t>

      <t>This specification assists a receiving system in detecting: </t>
      <ul>
        <li>Whether a message has been sent to an address that differs from one originally specified
          at the time of first posting</li>
        <li>What the original recipient and return addresses were</li>
        <li>What new recipient and return addresses are (or were, in the case of changes at multiple
          points along the transit path)</li>
        <li>What site(s) made the change(s)</li>

      </ul>

    </section>


    <section>
      <name>DKOR Overview</name>

      <t>Domain Keys Originator Recipient (DKOR) uses the existing DKIM mechanism, which develops a
        basic digital signature, over a specified set of message data. DKOR permits basic detection
        of message re-submission, upon implementation of DKOR by the signers and any receiving sites
        wishing to participate in DKOR services. DKOR's essential mechanism is inclusion of
        recipient and return addresses into the message object, by the originating site and by each
        re-submission point along the transit path. </t>

      <t>A given message might be subject to multiple, legitimate re-submissions, such as through
        alias and mail list sites. As each of these adopts DKOR, the message will be able to provide
        additional information about the addressing changes it has been subject to. This enables
        receivers to make more accurate and reliable assessments about message handling. However,
        use of DKOR needs to accomodate incremental, uncoordinated, and piecemeal adoption. So for
        example, a message that does go through multiple, legitimate resubmissions might produce
        DKOR-based information from only some of the sites in the sequence.</t>

      <t>Because DKOR relies on the existing DKIM mechanisms, other DKIM receivers that have not
        adopted DKOR can, nonetheless, process the same DKIM signature without knowledge of
        DKOR.</t>
      <t indent="8"><strong>Hence, DKOR is an incremental and compatible enhancement to the existing
          DKIM email infrastructure.</strong></t>



    </section>

    <section>
      <name>DKOR Design</name>
      <t indent="8">
        <strong>A message covered by DKOR is restricted to having a single recipient
          address.</strong>
      </t>

      <t>DKOR defines a use of DKIM, with the DKIM signature covering whatever other header fields
        it is normally used to cover. For DKOR, it also covers one header field that specifies the
        original recipient address and the envelope notifications return address. These addresses
        are redundant with the addresses in their corresponding envelope fields/commands. </t>

      <t>The presence of the DKOR header field self-declares the use of DKOR. Further there is no
        benefit in having the signer publish that it uses DKOR. Note that having a transit site
        simply remove a DKOR header field does not accomplish an effective downgrade attack, since
        it will cause the associated DKIM signature to fail.</t>

      <t indent="8">
        <strong>The method for obtaining envelope information, to be used by DKOR, is a matter of
          local implementation and is outside the scope of this specification.</strong>
      </t>

      <t>If the addresses in the DKOR field match those in their corresponding envelope
        fields/commands, and the DKIM signature validates, then DKOR passes. If either does not
        match, or the DKIM evaluation fails, then DKOR fails. </t>

      <t indent="8">
        <strong>Policies and actions that apply to the handling of messages that pass or fail DKOR
          are local matters for the evaluating service and are outside the scope of this
          specification. </strong></t>

      <t>An example of challenges in determining the handling of a DKOR failure is that the failure
        can be the result of entirely legitimate reasons, such as a legitimate redistribution
        service that does not make changes to message content and only uses a new recipient address.
        Failures can also occur due to the considerable vagaries of email handling
        idiosyncrasies.</t>

      <dl newline="true">
        <dt>Note: </dt>
        <dd>The header field used by this specification is independent of any other header fields
          that might contain the same addresses, in order to avoid any potential confusion about
          semantics or purpose.</dd>
      </dl>

    </section>


    <section>
      <name>DKOR Header Field</name>

      <aside>
        <dl newline="true">
          <dt>[ Comment: </dt>
          <dd>The design of the field is now derived from draft-gondwana-dkim2-header-00, merging
            the information into a single header field, and adding sequence numbering, to show the
            transit path.<br/> The exchange with Bron swayed me to have this support a sequence of
            DKOR header fields, and have them label their sequence. /d ]</dd>
        </dl>
      </aside>

      <t>The DKOR header field specifies a single recipient address and a single return address. It
        also indicates the order in which the field was created, in the DKOR handling sequence of
        the message. Since DKOR support cannot be assumed for every MTA and intermediary in the
        transit path, the DKOR order might not reflect all of the nodes the message transited.</t>

      <table>
        <thead>
          <tr>
            <th align="center">Field identifier</th>
            <th align="center">Explanation</th>
          </tr>
        </thead>

        <tbody>
          <tr>
            <th align="left">i=</th>
            <td>Sequence Number (from 1 to N), with 1 assigned by the originating site, and
              incremented for each additional DKOR header field that is added, after that
              (Required)</td>
          </tr>

          <tr>
            <th align="left">t=</th>
            <td>Timestamp, indicating when the DKOR field was added (Optional)</td>
          </tr>

          <!-- <c>m=</c>
        <c>Indicates if mail has been modified or exploded</c>-->

          <tr>
            <th align="left">mf=</th>
            <td>The envelope return address (typically RFC5321.mail-from) present when the header
              field was created (Required, see below)</td>
          </tr>

          <tr>
            <th align="left">rt=</th>
            <td>The envelope destination address (typically RFC5321.rcpt-to) present when the header
              field was created (Required, see below)</td>
          </tr>
        </tbody>
      </table>

      <t>At least one of mf or rt attributes MUST be specified.</t>

    </section>



    <section>
      <name>Signing Behavior</name>

      <ol>
        <li>If the recipient address (e.g., RFC5321.rcpt-to) is to be protected, obtain that
          envelope address and place a copy of it into the rt attribute of the DKOR header field.
            <xref target="RFC5322"/></li>
        <li>If the return address (e.g., RFC5321.mail-from) is to be protected, obtain that
          envelope) address and place a copy of it into the mf attribute of the DKOR header
          field.</li>
        <li>DKOR permits either or both attributes to be present, and requires at least one.</li>
        <li>Create a DKIM signature that includes the DKOR header field.</li>
      </ol>

    </section>

    <section>
      <name>Evaluating Behavior</name>

      <ol>
        <li>If a DKOR header field is present, then perform a DKOR evaluation.</li>
        <li>Obtain the envelope address values used by DKOR.</li>
        <li>Compare the values to the corresponding DKOR header field attribute values.</li>
        <li>If either value does not match, then DKOR fails.</li>
        <li>Perform a DKIM validation that includes the DKOR header field.</li>
        <li>If DKIM validation fails, then DKOR fails. </li>

      </ol>

    </section>


    <section anchor="IANA">
      <name>IANA Considerations</name>

      <t>IANA is requested to register the "DKOR" header field in the Permanent Message Header field
        Registry.</t>

      <table>
        <tbody>
          <tr>
            <th>Header field name</th>
            <td>DKOR</td>
          </tr>

          <tr>
            <th>Applicable protocol</th>
            <td>mail</td>
          </tr>

          <tr>
            <th>Status</th>
            <td>standard</td>
          </tr>

          <tr>
            <th>Author/Change controller</th>
            <td>IETF</td>
          </tr>

          <tr>
            <th>Specification document(s)</th>
            <td>This specification</td>
          </tr>

          <tr>
            <th>Related information</th>
            <td>none</td>
          </tr>
        </tbody>
      </table>



    </section>

    <section anchor="Security">

      <name>Security Considerations</name>

      <t>This specification defines a mechanism for detecting retransmission of a message, that
        sends it to additional addressees, while preserving a DKIM signature from its original
        posting. The incremental security considerations are accuracy of creating and evaluating the
        two address fields defined here.</t>

      <t>As with other email assessment mechanisms and the heuristics they use, DKOR creates
        opportunities for false positives, which can produce hostile treatment of legitimate
        email.</t>

      <t>There are no other security considerations that result from using DKOR.</t>
    </section>

  </middle>

  <back>

    <references>
      <name>References</name>

      <references>
        <name>Normative References</name>

        <!--        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6376.xml"/>
-->
        <reference anchor="RFC6376">
          <front>
            <title>DomainKeys Identified Mail (DKIM) Signatures</title>
            <author asciiFullname="D. Crocker" initials="D" surname="Crocker"> </author>
            <author asciiFullname="T. Hansen" initials="T" surname="Hansen"> </author>
            <author asciiFullname="M. Kucherawy" initials="M" surname="Kucherawy"> </author>
            <date month="September" year="2011"> </date>
          </front>
          <seriesInfo name="RFC" value="6376"/>
        </reference>

        <!--        <rfc-entry>
          <doc-id>RFC6376</doc-id>
          <title>DomainKeys Identified Mail (DKIM) Signatures</title>
          <author>
            <name>D. Crocker</name>
            <title>Editor</title>
          </author>
          <author>
            <name>T. Hansen</name>
            <title>Editor</title>
          </author>
          <author>
            <name>M. Kucherawy</name>
            <title>Editor</title>
          </author>
          <date>
            <month>September</month>
            <year>2011</year>
          </date>
          <format>
            <file-format>ASCII</file-format>
            <file-format>HTML</file-format>
          </format>
          <page-count>76</page-count>
          <keywords>
            <kw>email</kw>
            <kw>architecture</kw>
            <kw>abuse</kw>
            <kw>verification</kw>
            <kw>anti-abuse</kw>
            <kw>identity</kw>
            <kw>integrity</kw>
            <kw>responsible</kw>
            <kw>author</kw>
            <kw>sender</kw>
            <kw>originator</kw>
            <kw>email filtering</kw>
            <kw>anti-phishing</kw>
            <kw>mail signature</kw>
          </keywords>
          <abstract><p>DomainKeys Identified Mail (DKIM) permits a person, role, or organization that owns the signing domain to claim some responsibility for a message by associating the domain with the message. This can be an author's organization, an operational relay, or one of their agents. DKIM separates the question of the identity of the Signer of the message from the purported author of the message. Assertion of responsibility is validated through a cryptographic signature and by querying the Signer's domain directly to retrieve the appropriate public key. Message transit from author to recipient is through relays that typically make no substantive change to the message content and thus preserve the DKIM signature.</p><p> This memo obsoletes RFC 4871 and RFC 5672. [STANDARDS-TRACK]</p></abstract>
          <draft>draft-ietf-dkim-rfc4871bis-15</draft>
          <obsoletes>
            <doc-id>RFC4871</doc-id>
            <doc-id>RFC5672</doc-id>
          </obsoletes>
          <updated-by>
            <doc-id>RFC8301</doc-id>
            <doc-id>RFC8463</doc-id>
            <doc-id>RFC8553</doc-id>
            <doc-id>RFC8616</doc-id>
          </updated-by>
          <is-also>
            <doc-id>STD0076</doc-id>
          </is-also>
          <current-status>INTERNET STANDARD</current-status>
          <publication-status>DRAFT STANDARD</publication-status>
          <stream>IETF</stream>
          <area>sec</area>
          <wg_acronym>dkim</wg_acronym>
          <errata-url>https://www.rfc-editor.org/errata/rfc6376</errata-url>
          <doi>10.17487/RFC6376</doi>
        </rfc-entry>
-->


        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5322.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3864.xml"/>

      </references>

      <references>
        <name>Informative References</name>

        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5321.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5598.xml"/>

      </references>
    </references>


    <section anchor="Examples" numbered="true">
      <name>Examples</name>

      <t>Thes show assorted DKOR header field usage examples.</t>

      <section anchor="ExSimple" numbered="true">
        <name>Basic DKOR</name>
        <t>Simple path from originator to recipient.</t>
        <sourcecode>DKOR: i=1; mf=brong@fastmailteam.com; rt=dhc@dcrocker.net</sourcecode>
      </section>

      <section anchor="ExAlias" numbered="true">
        <name>Through an Alias</name>
        <t>Routed through an aliasing site.</t>
        <sourcecode>DKOR: i=1; mf=brong@fastmailteam.com; rt=dhc@dcrocker.net</sourcecode>
        <sourcecode>DKOR: i=2; mf=dhc@dcrocker.net; rt=dcrocker@gmail.com</sourcecode>
      </section>

      <section anchor="exList" numbered="true">
        <name>Through a Mailing List</name>
        <t>Routed through a mailing list.</t>
        <sourcecode>DKOR: i=1; mf=brong@fastmailteam.com; rt=ietf-dkim@ietf.org</sourcecode>
        <sourcecode>DKOR: i=2; mf=ietf-dkim@ietf.org.net; rt=dhc@dcrocker.net</sourcecode>
      </section>

      <section anchor="exMultiple" numbered="true">
        <name>Multiple Mailing Lists</name>
        <t>Routed through two mailing lists.</t>
        <sourcecode>DKOR: i=1; mf=brong@fastmailteam.com; rt=ietf-dkim@ietf.org</sourcecode>
        <sourcecode>DKOR: i=2; mf=ietf-dkim@ietf.org.net; rt=group@example.com</sourcecode>
        <sourcecode>DKOR: i=3; mf=mlm@example.com; rt=dhc@dcrocker.net</sourcecode>
      </section>

      <section anchor="exThird" numbered="true">
        <name>Third-Party Originator</name>
        <t>Sent from a third-party service that is originating the message on behalf of someone
          else. The header fields essentially emulate a kind of mailing list sequence.</t>
        <sourcecode>DKOR: i=1; mf=esp@example.com; rt=esp@example.com DKOR: i=2; mf=esp@example.com;
          rt=dhc@dcrocker.net</sourcecode>
      </section>



      <section anchor="Acknowledgements" numbered="false">
        <name>Acknowledgements</name>

        <t>Extended discussions about DKIM Replay converged on the unpleasant necessity to have
          messages contain only one recipient in the envelope. No alternative approach gained any
          traction. Further changes produced changes to the draft.</t>

      </section>


    </section>
  </back>
</rfc>
