<?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.ietf-appsawg-rfc5451bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-appsawg-rfc5451bis.xml">
<!ENTITY RFC6982 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6982.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-01" 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="DNSxL email-auth-method extension">DNSxL 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="August" 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>DNSBL</keyword>
    <keyword>DNSxL</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 white or black list, and
        interpreting any returned data.
       </t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>
         One of the many checks that mail servers carry out is to query DNS
         white and black lists (DNSxL, <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>
      <t>
         The semantics of DNSBL often implies blocking any attempt to send
         mail, or even outright blocking any routing or peering from listed
         addresses.  However, in some cases mail is accepted despite a
         positive blacklist lookup.  In such cases, it is useful to record
         the result of the lookup, which can be done symmetrically, using the
         method described in this document.         
      </t>
    </section>

    <section title="Method Results" anchor="mresults">
       <t>
          In this document, the acronyms DNSWL and DNSBL are used both to
          refer to a generic organization that publishes a DNS list, and to
          indicate the list itself.  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.  DNSxL is used
          to indicate either or both those two, while dnsxl (lowercase) is
          the name of the method being defined here.
       </t>

       <t>
          As explained in "Combined IP Address DNSxL" (Section 2.3 of
          <xref target="RFC5782"/>), DNSxLs
          encode taxonomical details about the mail sender as bit masks of
          type A records.
          The receiving MTA needs to determine whether the data returned
          is applicable.
          In that case, it uses a uniformized rendering of that data as an
          outsourced extension of its local policy.
          The properties, uniform across DNSxLs, that this document provides
          for are listed below:

           <?rfc needLines="10"?>
           <list style="hanging" hangIndent="7">
              <t hangText="policy.dnszone:">
                 The name of the DNSxL, where the result is obtained from.
              </t>

              <t hangText="policy.score:">
                 This is a number in the range [-100, 100].
                 Zero (0.0) is for neutral, non-listed senders.
                 Positive values are for black lists.
                 Negative values are for white lists, with meaning roughly
                 defined as:
                 <list style="hanging" hangIndent="5">
                    <t hangText="-0.1">
                       only avoid outright blocking (e.g. free mail providers),
                    </t>
                    <t hangText="  -1">
                       reduce chance of false positives,
                    </t>
                    <t hangText=" -10">
                       make sure to avoid false positives but allow override
                       for clear cases,
                    </t>
                    <t hangText="-100">
                       highly trusted sender, avoid override.
                    </t>
                 </list>
              </t>

              <t hangText="policy.contact:">
                 This is either a domain name or an abuse reporting address,
                 which can be used as described in "Where to Send Reports"
                 (Section 5.3 of <xref target="RFC6650"/>).
              </t>
           </list>
       </t>

	<t>
	   The result proper of the dnsxl method is defined as follows:

           <list style="hanging" hangIndent="12">
              <t hangText="pass:">
                 A query to a DNSWL completed, and a reply was returned,
                 meaning the IP address is whitelisted.
              </t>

              <t hangText="fail:">
                 A query to a DNSBL completed, and a reply was returned,
                 meaning the IP is blacklisted.
              </t>

              <t hangText="neutral:">
                 A query to a DNSBL completed, and a reply containing no
                 answers was returned, meaning the IP is not listed.
              </t>

              <t hangText="temperror:">
                 The DNS evaluation could not be completed due to some error
                 that is likely transient in nature, such as a temporary DNS
                 error, e.g., a DNS RCODE of 2, commonly known as SERVFAIL,
                 or other error condition resulted.
                 A later attempt might produce a final result.
              </t>

              <t hangText="permerror:">
                 The DNS evaluation could not be completed because of some
                 kind of misconfiguration, e.g., a DNS RCODE of 3, commonly
                 known as NXDOMAIN.  A later attempt is unlikely to produce a
                 final result.
              </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>dnsxl</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>policy</c>
      <c>dnszone</c>
      <c>The origin of the results</c>
      <c>active</c>

      <c>policy</c>
      <c>score</c>
      <c>sender trustworthiness</c>
      <c>active</c>

      <c>policy</c>
      <c>contact</c>
      <c>abuse reporting</c>
      <c>active</c>
      </texttable>

      <t>
         In addition, this method reuses five 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="11"?>
      <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>neutral</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>

      <t>
         Finally, if at all possible, this document reserves the name dnswl,
         as detailed in <xref target="res_data"/>.
      </t>

      <?rfc needLines="7"?>
      <texttable anchor="res_data" title="Reserved method name">
      <ttcol align='left'>Method</ttcol>
      <ttcol align='left'>Defined</ttcol>
      <ttcol align='right'>version</ttcol>
      <ttcol align='left'>Status</ttcol>
      <c>dnswl</c>
      <c>[this rfc]</c>
      <c>1</c>
      <c>reserved</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 "Improving Awareness of Running Code:
   	 The Implementation Status Section" (<xref target="RFC6982"/>).
   	 See that document for further boilerplate that should have been
   	 copied here.
      </t>

      <t>
         OpenDKIM has optional DNSxL query support, and plans to implement
         this.
      </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.
         It made it to production in release 0.71, after one month testing,
         using the reserved method name.
         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.
      </t>
    </section>
  </middle>

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

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

    <references title="Informative References">
      &RFC6982;
      &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>
