<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
     
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY I-D.sheffer-running-code SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.sheffer-running-code.xml">
<!ENTITY I-D.ietf-appsawg-rfc5451bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-appsawg-rfc5451bis.xml">
<!ENTITY RFC4408 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4408.xml">
<!ENTITY RFC5782 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5782.xml">
<!ENTITY RFC5518 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5518.xml">
<!ENTITY RFC5226 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5226.xml">
<!ENTITY RFC6650 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6650.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs),
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->

<rfc category="info" docName="draft-vesely-authmethod-dnswl-00" ipr="trust200902">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: trust200902, full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN"
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the
         full title is longer than 39 characters -->

    <title abbrev="DNSWL email-auth-method extension">DNSWL Email Authentication Method Extension</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Alessandro Vesely" initials="A." surname="Vesely">
      <organization/>

      <address>
        <postal>
          <street>v. L. Anelli 13</street>

          <!-- Reorder these if your country does things differently -->

          <code>20122</code>
          <city>Milano</city>
          <region>MI</region>
          <country>IT</country>
        </postal>

        <email>vesely@tana.it</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

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

    <!-- If the month and year are both specified and are the current ones, xml2rfc will fill
         in the current day for you. If only the current year is specified, xml2rfc will fill
         in the current day and month for you. If the year is not the current one, it is
         necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the
         purpose of calculating the expiry date).  With drafts it is normally sufficient to
         specify just the year. -->

    <!-- Meta-data Declarations -->

    <area>General</area>

    <workgroup>IETF</workgroup>

    <!-- WG name at the upperleft corner of the doc,
         IETF 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 IETF. -->

    <keyword>DNSWL</keyword>
    <keyword>EMAIL</keyword>

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
      <t>
        This document describes a method that can be registered within the
        Email Authentication Methods IANA registry created by RFC 5451.
        The method consists in looking up a DNS whitelist.
       </t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>
         One of the many checks that mail servers carry out is to query DNS
         whitelists (DNSWL, <xref target="RFC5782"/>).
         The semantics of DNSWL is similar to that of Vouch By Reference (VBR,
         <xref target="RFC5518"/>); that is, an external organization, trusted
         by the receiving mail transfer agent (MTA), vouches for the sender.
      </t>
      <t>
         Differently from VBR, the lookup is based on the IP address.  That
         allows it to occur very early in an SMTP transaction, and thus it
         can be used to counterweight policies that typically occur at those
         early stages too, such as the Sender Policy Framework (SPF,
         <xref target="RFC4408"/>).  Nevertheless, the result of a DNSWL
         lookup is likely used at later stages as well;  for example, a
         delivery agent can use it to estimate the spamminess of an email
         message.  Reusing the previously obtained result is more consistent
         than issuing multiple queries, and saves resources.
      </t>
    </section>

    <section title="Method Results" anchor="mresults">
       <t>
          In this document, the acronym DNSWL is used both to refer to a generic
          organization that publishes a whitelist, and to indicate the use of
          such service, that is the method.  The organization defines the DNS
          zone and the record type(s) to be queried, as well as the meaning
          of the listings and the procedures to maintain them.
       </t>

       <t>
          Unlike other methods, such as dkim or spf, there is little or no work
          to be carried out by the receiving MTA on the values retrieved from
          the DNS query.
          As explained in Section 2.3 of <xref target="RFC5782"/>, DNSWLs
          encode taxonomical details about the mail sender as bit masks of
          type A records.
          The receiving MTA just needs to work out whether the data returned
          is at all applicable.
          In that case, it uses that data as an outsourced extension of its
          local policy.
          Thus, in a broad sense, the result of the method is the content
          returned by the query:

           <list style="hanging" hangIndent="12">
              <t hangText="dns.zone:">
                 The name of the DNSWL, which defines the meaning of the result.
                 If the MTA uses a private mirror, this can be different from
                 the zone actually queried.
              </t>

              <t hangText="policy.ip:">
                 The bit mask value.  This entry ("propspec" in the grammar of
                 <xref target="I-D.ietf-appsawg-rfc5451bis"/>) can be repeated
                 if the DNSWL returns multiple A records.
              </t>

              <t hangText="policy.txt:">
                 The TXT record, or the relevant part of it, if any.  This can
                 contain a domain name or an abuse reporting address, which can
                 be used as described in Section 5.3 of <xref target="RFC6650"/>.
              </t>
           </list>
       </t>

	<t>
	   In a strict sense, the result of the method states how the query did:

           <list style="hanging" hangIndent="12">
              <t hangText="pass:">
                 The query successfully returned applicable records.
              </t>

              <t hangText="fail:">
                 The query worked, but no applicable record was found.
              </t>

              <t hangText="temperror:">
                 There was a transient problem with the query.
              </t>

              <t hangText="permerror:">
                 There is a setup problem, the query cannot work.
              </t>
           </list>
	</t>
    </section>



    <section title="IANA Considerations">
      <t>
         There is a registry of Email Authentication Methods created by
         RFC5451.  The method described in this document is referred by
         <xref target="reg_method"/>, it has three ptype.Property values
         detailed in <xref target="reg_data"/>.
      </t>
      <figure><artwork><![CDATA[
[TO BE REMOVED: The registry is currently accessible here:
http://www.iana.org/assignments/email-auth/email-auth.xhtml \
                                                #email-auth-methods ]
      ]]></artwork></figure>

      <?rfc needLines="7"?>
      <texttable anchor="reg_method" title="Method name, definition, and version">
      <ttcol align='left'>Method</ttcol>
      <ttcol align='left'>Defined</ttcol>
      <ttcol align='right'>version</ttcol>
      <c>dnswl</c>
      <c>[this rfc??]</c>
      <c>1</c>
      </texttable>

      <?rfc needLines="9" ?>
      <texttable anchor="reg_data" title="Method values">
      <ttcol align='left'>ptype</ttcol>
      <ttcol align='left'>Property</ttcol>
      <ttcol align='left'>Value</ttcol>
      <ttcol align='left'>Status</ttcol>
      <c>dns</c>
      <c>zone</c>
      <c>The origin of the results</c>
      <c>active</c>

      <c>policy</c>
      <c>ip</c>
      <c>type A result</c>
      <c>active</c>

      <c>policy</c>
      <c>txt</c>
      <c>type TXT result</c>
      <c>active</c>
      </texttable>

      <t>
         In addition, this method reuses four of the values already defined
         in the Email Authentication Result Names associated registry.
         They are listed in <xref target="reg_result"/>.
      </t>
      <figure><artwork><![CDATA[
[TO BE REMOVED: The registry is currently accessible here:
http://www.iana.org/assignments/email-auth/email-auth.xhtml \
                                           #email-auth-result-names ]
      ]]></artwork></figure>

      <?rfc needLines="9"?>
      <texttable anchor="reg_result" title="Method results">
      <ttcol align='left'>Code</ttcol>
      <ttcol align='left'>Meaning</ttcol>
      <ttcol align='left'>Status</ttcol>
      <c>pass</c>
      <c><xref target="mresults"/></c>
      <c>active</c>

      <c>fail</c>
      <c><xref target="mresults"/></c>
      <c>active</c>

      <c>temperror</c>
      <c><xref target="mresults"/></c>
      <c>active</c>

      <c>permerror</c>
      <c><xref target="mresults"/></c>
      <c>active</c>
      </texttable>
    </section>

    <section title="Implementation Status">
      <t>
         [Note to RFC Editor: please remove this entire section before
          publication.]
      </t>

      <t>
         This section records the status of a known implementation of the
         method described in this document at the time of writing, based
   	 on a proposal described in <xref target="I-D.sheffer-running-code"/>.
   	 See that document for further boilerplate.
      </t>

      <t>
         Courier-MTA is a full-featured, mature mail server, first publicly
         released in May 2000.  A beta release in February 2013
         introduced Authentication-Results in combination with DNS-based
         whitelists.
         This document is based on that implementation, which made it to
         production release 0.71, after one month testing.
         End-user documentation of that feature is available online at
         http://www.courier-mta.org/couriertcpd.html#idp5867072
      </t>

      <t>
         In prior releases, only the -block option was present, and the
         Authentication-Results header field was handled by add-ons, not by the
         core implementation.  The -allow option was added so that
         black and white lists can be configured using mostly symmetrical
         syntax.  Finally, an option was added to inhibit SPF reject-on-fail
         for whitelisted senders.
      </t>

      <t>
         It is not possible to know how many installations of Courier-MTA
         have enabled these new features.  However, no questions have
         been asked about them on the mailing list, yet.  Despite the amount
         of spam, there seems to be little traction for this kind of development.
      </t>

      <t>
         The only DNSWL known to have been used for this purpose is
         dnswl.org.  See http://www.dnswl.org/.  With nearly 150K entries,
         it can make the email messages that get at least one authentication
         "pass" overreach a critical mass:  It seems that subscribing to that
         list is easier, for some mail admins, than implementing other
         authentication methods.
      </t>         
    </section>
    <section title="Security Considerations">
      <t>
         All of the considerations described in Section 8 of
         <xref target="I-D.ietf-appsawg-rfc5451bis"/> apply.
      </t>

      <t>
         In addition, the usual caveats apply about importing text from
         external online sources.  Although queried DNSWLs are well known,
         trusted entities, it is suggested that TXT records be reported
         only if, upon inspection, their content is deemed actually actionable.
         If they contain non-ASCII characters, they need to be encoded as
         appropriate.
      </t>
    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <references title="Normative References">
      &I-D.ietf-appsawg-rfc5451bis;
      &RFC5226;
    </references>

    <references title="Informative References">
      &I-D.sheffer-running-code;
      &RFC6650;
      &RFC5782;
      &RFC5518;
      &RFC4408;
    </references>
    <section title="Example">
    <figure><artwork><![CDATA[
   Authentication-Results: mta.example.com;
       dnswl=pass dns.zone=list.dnswl.example
       policy.ip=127.0.10.1
       policy.txt="example.org http://dnswl.example/s?s=100"
    ]]></artwork></figure>

    </section>

  </back>
</rfc>
