<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
  <!ENTITY RFC2119 PUBLIC "" "http://rfc-editor.org/refs/bibxml/reference.RFC.2119.xml">
  <!ENTITY RFC5890 PUBLIC "" "http://rfc-editor.org/refs/bibxml/reference.RFC.5890.xml">
  <!ENTITY RFC6376 PUBLIC "" "http://rfc-editor.org/refs/bibxml/reference.RFC.6376.xml">
  <!ENTITY RFC6530 PUBLIC "" "http://rfc-editor.org/refs/bibxml/reference.RFC.6530.xml">
  <!ENTITY RFC6531 PUBLIC "" "http://rfc-editor.org/refs/bibxml/reference.RFC.6531.xml">
  <!ENTITY RFC6532 PUBLIC "" "http://rfc-editor.org/refs/bibxml/reference.RFC.6532.xml">
  <!ENTITY RFC7208 PUBLIC "" "http://rfc-editor.org/refs/bibxml/reference.RFC.7208.xml">
  <!ENTITY RFC7489 PUBLIC "" "http://rfc-editor.org/refs/bibxml/reference.RFC.7489.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<?rfc toc="yes" ?>
<?rfc tocindent="yes" ?>
<?rfc tocdepth="2" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="yes" ?>

<rfc category="std" docName="draft-levine-appsarea-eaiauth-01" ipr="trust200902">
  <front>
    <title abbrev="EAI Authentication">E-mail Authentication for Internationalized Mail</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>

    <date month="July" year="2016" />

    <area>Applications</area>

    <keyword>e-mail</keyword>
    <keyword>internationalization</keyword>

    <abstract>
       <t>
	  SPF, DKIM, and DMARC enable a domain owner to publish e-mail authentication
	  and policy information in the DNS.  In internationalized e-mail, domain
	  names can occur both as U-labels and A-labels.
	  This specification clarifies when to use which form of domain names
	  when using SPF, DKIM, and DMARC.
       </t>
    </abstract>
  </front>
  <middle>
     <section title="Introduction">
	<t>
	  SPF, DKIM, and DMARC enable a domain owner to publish e-mail authentication
	  and policy information in the DNS. SPF primarily publishes information
	  about what host addresses are authorized to send mail for a domain.  DKIM
	  places cryptographic signatures on e-mail messages, with the validation
	  keys published in the DNS.  DMARC publishes policy information related
	  to the domain in the From: header of e-mail messages.
	</t>
	<t>
	   In conventional e-mail, all domain names are ASCII in all contexts so
	   there is no question about the representation of the domain names.
	   All internationalized domain names are represented as
	   <xref target="RFC5890">A-labels</xref> in unencoded message bodies, in SMTP
	   sessions, and in the DNS.
	   <xref target="RFC6530">Internationalized mail</xref> allows U-labels in
	   <xref target="RFC6531">SMTP sessions</xref>
	   and in <xref target="RFC6532">message headers</xref>.
	</t>
	<t>
	   Every U-label is equivalent to an A-label, so in principle the
	   choice of label format should not cause any ambiguities.  But in
	   practice, consistent use of label formats will make it more likely
	   that mail senders' and receivers' code interoperates.
	</t>

     </section>
     <section anchor="definitions" title="Definitions">
	<t> 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
	      <xref target="RFC2119"/>.
	   </t>
	   <t>
	      The term IDN, for Internationalized Domain Name, refers
	      to either a U-label or an A-label.
	   </t>
	   <t>
	      Since DMARC is not currently a standards track protocol,
	      this specification offers advice rather than requirements
	      for DMARC.
	   </t>

     </section>

     <section title="SPF and internationalized mail">
	<t>
	   <xref target="RFC7208">SPF</xref> uses two identities from the
	   SMTP session, the host name in the EHLO command, and the domain
	   in the address in the MAIL FROM command.
	   Since the EHLO command precedes the server response that tells whether the server supports
	   the SMTPUTF8 extension, an IDN domain name argument
	   MUST be represented as an A-label.
	   An IDN domain name in MAIL FROM can be either a U-label or an A-label.
	</t>
	<t>
	   All U-labels MUST be converted to A-labels before being used for
	   an SPF validation.  This includes both the original DNS lookup,
	   described in Section 3 of <xref target="RFC7208"/> and the macro
	   expansion of domain-spec described in section 7.  Section 4.3
	   of <xref target="RFC7208"/> states that all IDNs in an SPF
	   DNS record MUST be A-labels; this rule is unchanged since any SPF
	   record can be used to authorize either internationalized or
	   conventional mail.
	</t>
     </section>

     <section title="DKIM and internationalized mail">
	<t>
	   <xref target="RFC6376">DKIM</xref> specifies a message header that
	   contains a cryptographic message signature and a DNS record that
	   contains the validation key.
	</t>
	<t>Section 3.5 of <xref target="RFC6376"/> states that IDNs in the d=,
	   i=, and s= tags of a DKIM-Signature header MUST be encoded as
	   A-labels.
	   This rule is relaxed only for headers in
	   <xref target="RFC6532">internationalized messages</xref> so IDNs MAY
	   be represented either as A-labels or U-labels.
	   This provides improved consistency with other headers, particularly
	   since the local-part of the i= tag is likely to be UTF-8 rather than
	   ASCII.
	   When computing or verifying the hash in a DKIM signature as described
	   in section 3.7, the hash MUST
	   use the domain name in the format it occurs in the header.
	   When retrieving or processing a DKIM key record from the DNS, all
	   U-labels must first be converted into A-labels before creating the
	   domain name to be looked up.
	</t>
	<t>
	   DKIM key records, described in section 3.6.1, do not contain domain
	   names, so there is no change to their specification.
	</t>
     </section>
     
     <section title="DMARC and internationalized mail">
	<t>
	  <xref target="RFC7489">DMARC</xref> defines a policy language that
	  domain owners can specify for the domain of the address in a
	  RFC5322.From header.
	</t>
	<t>
	   Section 6.6.1 specifies, somewhat imprecisely, how IDNs in the
	   RFC5322.From address domain are to
	   be handled. That section is updated to say that all U-labels in
	   the domain are converted to A-labels before further processing.
	   Sections 6.7 and 7.1 are similarly updated to say that all U-labels
	   in domains being handled are converted to A-labels before further processing.
	</t>
	<t>
	   DMARC policy records, described in section 6.3, can contain e-mail
	   addresses in the rua and ruf tags.
	   Since a policy record can be used for both internationalized and
	   conventional mail, those addresses have to be conventional addresses,
	   not internationalized addresses.	   
	</t>
     </section>

     <section title="IANA Considerations">
	<t>
	   This document makes no request of IANA.
	</t>
     </section>
     <section title="Security Considerations">
	<t>
	   E-mail is subject to a vast range of threats and abuses.
	   This document attempts to slightly mitigate some of them but does
	   not, as far as the author knows, add any new ones.
	</t>
     </section>
  </middle>

  <back>
    <references title="Normative References">
       &RFC2119;
       &RFC5890;
       &RFC6376;
       &RFC6530;
       &RFC6531;
       &RFC6532;
       &RFC7208;
       &RFC7489;
    </references>

  </back>
</rfc>
