<?xml version="1.0" encoding="US-ASCII"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
  <!ENTITY RFC2119 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
  <!ENTITY RFC3463 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3463.xml">
  <!ENTITY RFC5248 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5248.xml">
  <!ENTITY RFC6376 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6376.xml">
  <!ENTITY RFC7001 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7001.xml">
  <!ENTITY RFC7208 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7208.xml">
]>

<rfc number='7372'
     category='std'
     submissionType='IETF'
     consensus='yes'
     updates='7208'
     ipr="trust200902">
       

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc rfcedstyle="yes"?>
<?rfc subcompact="no"?>
<?rfc compact='yes'?>
<front>
	<title abbrev="Email Auth Status Codes">
		Email Authentication Status Codes
	</title>

	<author initials="M. S." surname="Kucherawy"
	        fullname="Murray S. Kucherawy">

		<organization/> 

		<address>
			<postal>
				<street>270 Upland Drive</street>
				<city>San Francisco</city>
				<region>CA</region>
				<code>94127</code>
				<country>USA</country>
			</postal>

			<email>superuser@gmail.com</email>
		</address>
	</author>

	<date month='September' year="2014"/>

	<area>Applications</area>


	<abstract>
		<t> This document registers code points to allow status codes
		    to be returned to an email client to indicate that a
		    message is being rejected or deferred specifically because
		    of email authentication failures. </t>

		<t> This document updates RFC 7208, since
		    some of the code points registered replace the ones
		    recommended for use in that document. </t>
	</abstract>
</front>

<middle>
	<section anchor="intro" title="Introduction">
		<t> <xref target="RFC3463"/> introduced Enhanced Mail System
		    Status Codes, and <xref target="RFC5248"/> created an IANA
		    registry for these. </t>


<!-- [rfced] Should these sentences both refer to the same section of
RFC 7001?

   Another common
   email acceptance test is the reverse Domain Name System (DNS) check
   on an email client's IP address, as described in Section 3 of
   [RFC7001].
...
   The reverse IP DNS check is defined in Section 2.6.3 of [RFC7001].
-->

		<t> <xref target="RFC6376"/> and <xref target="RFC7208"/>
		    introduced, respectively, DomainKeys Identified Mail (DKIM)
		    and Sender Policy Framework (SPF), two protocols for
		    conducting message authentication.  Another common email
		    acceptance test is the reverse Domain Name System (DNS)
		    check on an email client's IP address, as described in
		    Section 3 of <xref target="RFC7001"/>. </t>

		<t> The current set of enhanced status codes does not include
		    any code for indicating that a message is being rejected
		    or deferred due to local policy reasons related to any
		    of these mechanisms.  This is potentially useful
		    information to agents that need more than rudimentary
		    handling information about the reason a message was
		    rejected on receipt.  This document introduces enhanced
		    status codes for reporting those cases to clients. </t>

		<t> <xref target="spf-code"/> updates <xref target="RFC7208"/>,
		    as new enhanced status codes relevant to that
		    specification are being registered and recommended for
		    use. </t>
	</section>

	<section anchor="keywords" title="Key Words">
		<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
		    <xref target="RFC2119"/>. </t>
	</section>



	<section anchor="codes" title="New Enhanced Status Codes">
		<t> The new enhanced status codes are defined in the following
		subsections.</t>

		<section anchor="dkim-code" title="DKIM Failure Codes">
			<t> In the code point definitions below, the following
			    definitions are used:

			    <list style="hanging">
				<t hangText="passing:"> A signature is
					"passing" if the basic DKIM
					verification algorithm, as defined in
					<xref target="RFC6376"/>, succeeds. </t>

				<t hangText="acceptable:"> A signature is
					"acceptable" if it satisfies all
					locally defined requirements (if any)
					in addition to passing the basic DKIM
					verification algorithm (e.g., certain
					header fields are included in the
					signed content, no partial signatures,
					etc.). </t>
			    </list> </t>

			<t><figure><artwork>
   Code:               X.7.20
   Sample Text:        No passing DKIM signature found
   Associated basic status code:  550
   Description:        This status code is returned when a message
                       did not contain any passing DKIM
                       signatures.  (This violates the
                       advice of Section 6.1 of RFC 6376.) 
   Reference:          [RFC7372]; [RFC6376]
   Submitter:          M. Kucherawy
   Change controller:  IESG
			</artwork></figure> </t>

			<t><figure><artwork>
   Code:               X.7.21
   Sample Text:        No acceptable DKIM signature found
   Associated basic status code:  550
   Description:        This status code is returned when a message
                       contains one or more passing DKIM signatures,
                       but none are acceptable.  (This violates the
                       advice of Section 6.1 of RFC 6376.) 
   Reference:          [RFC7372]; [RFC6376]
   Submitter:          M. Kucherawy
   Change controller:  IESG
			</artwork></figure> </t>

			<t><figure><artwork>
   Code:               X.7.22
   Sample Text:        No valid author-matched DKIM signature found
   Associated basic status code:  550
   Description:        This status code is returned when a message
                       contains one or more passing DKIM
                       signatures, but none are acceptable because
                       none have an identifier(s)
                       that matches the author address(es) found in
                       the From header field.  This is a special
                       case of X.7.21. (This violates the advice
                       of Section 6.1 of RFC 6376.)
   Reference:          [RFC7372]; [RFC6376]
   Submitter:          M. Kucherawy
   Change controller:  IESG
			</artwork></figure> </t>
		</section>

		<section anchor="spf-code" title="SPF Failure Codes">
			<t><figure><artwork>
   Code:               X.7.23
   Sample Text:        SPF validation failed
   Associated basic status code:  550
   Description:        This status code is returned when a message
                       completed an SPF check that produced a
                       "fail" result, contrary to local policy
                       requirements.  Used in place of 5.7.1, as
                       described in Section 8.4 of RFC 7208.
   Reference:          [RFC7372]; [RFC7208]
   Submitter:          M. Kucherawy
   Change controller:  IESG
			</artwork></figure> </t>

			<t><figure><artwork>
   Code:               X.7.24
   Sample Text:        SPF validation error
   Associated basic status code:  451/550
   Description:        This status code is returned when evaluation
                       of SPF relative to an arriving message
                       resulted in an error.  Used in place of
                       4.4.3 or 5.5.2, as described in Sections
                       8.6 and 8.7 of RFC 7208.
   Reference:          [RFC7372]; [RFC7208]
   Submitter:          M. Kucherawy
   Change controller:  IESG
			</artwork></figure> </t>
		</section>

		<section anchor="iprev-code" title="Reverse DNS Failure Code">
			<t><figure><artwork>
   Code:               X.7.25
   Sample Text:        Reverse DNS validation failed
   Associated basic status code:  550
   Description:        This status code is returned when an SMTP
                       client's IP address failed a reverse DNS
                       validation check, contrary to local policy
                       requirements.
   Reference:          [RFC7372]; Section 3 of [RFC7001]
   Submitter:          M. Kucherawy
   Change controller:  IESG
			</artwork></figure> </t>
		</section>

		<section anchor="multi-code"
		         title="Multiple Authentication Failures Code">
			<t><figure><artwork>
   Code:               X.7.26
   Sample Text:        Multiple authentication checks failed
   Associated basic status code:  550
   Description:        This status code is returned when a message
                       failed more than one message authentication
                       check, contrary to local policy requirements.
                       The particular mechanisms that failed are not
                       specified.
   Reference:          [RFC7372]
   Submitter:          M. Kucherawy
   Change controller:  IESG
			</artwork></figure> </t>
		</section>
	</section>

	<section anchor="discuss" title="General Considerations">
		<t> By the nature of the Simple Mail Transfer Protocol (SMTP),
		    only one enhanced status code can be returned for a given
		    exchange between client and server.  However, an
		    operator might decide to defer or reject a message for a
		    plurality of reasons.  Clients receiving these codes
		    need to consider that the failure reflected by one of these
		    status codes might not reflect the only reason, or
		    the most important reason, for non-acceptance of the
		    message or command. </t>

		<t> It is important to note that Section 6.1 of
		    <xref target="RFC6376"/> discourages special treatment of
		    messages bearing no valid DKIM signature.  There are some
		    operators that disregard this advice, a few of which go
		    so far as to require a valid Author Domain Signature (that
		    is, one matching the domain(s) in the From header field) in
		    order to accept the message.  Moreover, some nascent
		    technologies built atop SPF and DKIM depend on such
		    authentications.  This work does not endorse
		    configurations that violate DKIM's recommendations but
		    rather acknowledges that they do exist and merely seeks to
		    provide for improved interoperability with such
		    operators. </t>

		<t> A specific use case for these codes is mailing list
		    software, which processes rejections in order to remove
		    from the subscriber set those addresses that are no
		    longer valid.  There is a need in that case to distinguish
		    authentication failures from indications that the
		    recipient address is no longer valid. </t>

		<t> If a receiving server performs multiple authentication
		    checks and more than one of them fails, thus warranting
		    rejection of the message, the SMTP server SHOULD use the
		    code that indicates multiple methods failed rather than
		    only reporting the first one that failed.  It may be the
		    case that one method is always expected to fail; thus,
		    returning that method's specific code is not information
		    useful to the sending agent. </t>

		<t> The reverse IP DNS check is defined in Section 3 of
		    <xref target="RFC7001"/>. </t>

		<t> Any message authentication or policy enforcement
		    technologies developed in the future should also include
		    registration of their own enhanced status codes so that
		    this kind of specific reporting is available to
		    operators that wish to use them. </t>
	</section>

	<section anchor="security" title="Security Considerations">
		<t> Use of these codes reveals local policy with respect to
		    email authentication, which can be useful information to
		    actors attempting to deliver undesired mail.  It should
		    be noted that there is no specific obligation to use these
		    codes; if an operator wishes not to reveal this aspect
		    of local policy, it can continue using a generic result
		    code such as 5.7.7, 5.7.1, or even 5.7.0. </t>
	</section>

	<section anchor="iana" title="IANA Considerations">
		<t> Registration of new enhanced status codes, for addition
		    to the Enumerated Status Codes sub-registry of the
		    SMTP Enhanced Status Codes Registry, can be found
		    in <xref target="codes"/>. </t>
	</section>


</middle>

<back>
	<references title="Normative References">
		&RFC2119;
		&RFC3463;
		&RFC5248;
		&RFC6376;
		&RFC7001;
		&RFC7208;
	</references>

	<section anchor='acknowledgments' title='Acknowledgments'>
	  <t> Claudio Allocchio, Dave Crocker, Ned Freed, Arnt Gulbrandsen,
	  Scott Kitterman, Barry Leiba, Alexey Melnikov, S.&nbsp;Moonesamy, Hector
	  Santos, and Stephen Turnbull contributed to this work. </t>
	</section>


</back>

</rfc>
