<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
 <!ENTITY rfc2046 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2046.xml">
 <!ENTITY rfc2821 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2821.xml">
 <!ENTITY rfc2822 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2822.xml">
 <!ENTITY rfc3028 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3028.xml">
]>

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

<!-- autobreaks="yes" -->
<?rfc comments="yes" ?> <?rfc inline="yes" ?>
<?rfc compact="yes" ?> <?rfc subcompact="no" ?>
<!-- editing="no" -->
<?rfc iprnotified="yes" ?>
<!-- linkmailto="yes" -->
<?rfc private="Internet-Draft" ?> <?rfc header="Internet-Draft" ?> <!-- footer="" -->
<!-- slides="no" --> <!-- background="" -->
<!-- sortrefs="no" --> <?rfc symrefs="yes" ?>
<?rfc strict="yes" ?>
<?rfc toc="yes" ?> <!-- tocompact="yes" --> <?rfc tocdepth="2" ?> <?rfc tocindent="yes" ?>
<!-- topblock="no" -->

<!--

(defun fanf-xml-insert-xref ()
 (interactive)
 (insert "<xref target=\"\"/>"))

(local-set-key "\M-r" 'fanf-xml-insert-xref)

-->

<rfc ipr="full3667"
     docName="draft-fanf-spf-howto">

<!-- === -->
 <front>

  <title abbrev="Sender-ID and SPF HOWTO">
   Deployment considerations for designated sender protocols:
   a&nbsp;Sender-ID and SPF HOWTO
  </title>

  <author initials="T." surname="Finch" fullname="Tony Finch">
   <organization abbrev="University of Cambridge">
    University of Cambridge Computing Service
   </organization>
   <address>
    <postal>
     <street>New Museums Site</street>
     <street>Pembroke Street</street>
     <city>Cambridge</city>
     <code>CB2 3QH</code>
     <country>ENGLAND</country>
    </postal>
    <phone>+44 797 040 1426</phone>
    <email>dot@dotat.at</email>
    <uri>http://dotat.at/</uri>
   </address>
  </author>

  <date month="October" year="2004"/>

  <area>Applications</area>
  <workgroup>MARID</workgroup>

  <abstract>

   <t>Designated sender protocols protect against email forgery using
    a mechanism by which the recipient of a message can determine if a
    host is authorized to send it. The two most prominent designated
    sender protocols are SPF (the Sender Policy Framework) and
    Sender-ID. This document examines a number of issues that should
    be considered before deploying designated sender protocols, with
    particular attention to their security and their compatibility
    with existing email usage.</t>

  </abstract>

  <note title="Document revision">
   <t>$Cambridge: hermes/doc/antiforgery/draft-fanf-spf-howto.xml,v 1.1 2004/10/28 15:09:07 fanf2 Exp $</t>
  </note>

 </front>

 <middle>

<!-- === -->
  <section title="Introduction">

   <t>Designated sender protocols protect against email forgery using
    a mechanism by which the recipient of a message can determine if a
    host is authorized to send it. An email domain advertises in the
    DNS the hosts that it uses to send email; these are that domain's
    designated sending hosts. When a recipient gets a message, it
    extracts from it the domain of the message's sender and uses that
    to determine if the sending host is one of the domain's designated
    senders. If not, the host is unauthorized to send the message and
    the recipient may reject it.</t>

   <t>The motivation for designated sender protocols is by analogy to
    incoming email: an email domain advertises the hosts it uses to
    receive email using MX records in the DNS; designated sender
    protocols allow domains to do the reverse. In fact one of the
    early designated sender proposals was called "Reverse MX"
    <xref target="RMX"/>.</t>

   <t>There are a number of ways of advertising designated senders in
    the DNS, and there are a number of email addresses in a message
    which might be used to identify its sender. The IETF MARID working
    group (MTA Authorization Records In the DNS) was chartered to
    produce a standard designated sender protocol. It failed to reach
    consesus and was terminated; however work continues outside the
    working group on two designated sender protocols: SPF (the Sender
    Policy Framework) <xref target="SPF"/> and Sender-ID
    <xref target="Sender-ID"/>.</t>

   <t><list style="hanging"><t hangText="Note:">
    The MARID working group also considered some protocols which are
    not designated sender protocols according to the definition used
    in this document. These include CSA (Client SMTP Authorization)
    <xref target="CSA"/> and MTA Mark <xref target="MTAmark"/>.
    Designated sender protocols determine whether a host is authorized
    to emit messages with a sender address in a particular email
    domain, whereas CSA and MTA mark determine whether a host is
    authorized to send email without reference to the details of the
    individual messages.
   </t></list></t>

   <t>The rest of this document examines SPF and Sender-ID in detail.
    Although the details may differ, the principles will apply to
    other designated sender protocols.</t>

  </section>

  <section title="SPF and Sender-ID compared">

   <t>When MARID was chartered SPF had the most momentum, though this
    changed when Microsoft entered the fray with their "Caller-ID for
    email" protocol <xref target="Caller-ID"/>. Both these protocols
    use a textual DNS record to describe the designated sending hosts:
    SPF uses a concise purpose-designed language, whereas Caller-ID
    uses XML. The MARID group decided to merge the two protocols,
    using the DNS record format from SPF and the sender address
    selection algorithm from Caller-ID. The result was called
    Sender-ID.</t>

   <t>The details of the DNS record format are not relevant to this
    document (see <xref target="SPF"/> for the current specification).
    What is important is that an email domain is able to specify which
    hosts may and which may not emit email that claims to be from
    someone at that domain. In addition to that basic distinction
    domains can also specify a grey area: hosts whose authorization
    status is indeterminate. This is discussed more in
    <xref target="Senders"/>.</t>

   <t>Where SPF and Sender-ID differ is the email address which is
    used to identify the sender of the message.</t>

   <t>SPF uses the bounce address specified in the SMTP MAIL FROM
    command <xref target="RFC2821"/>. The advantage of this is that it
    allows the accept/reject decision for a message to be made as
    early as possible, thus minimising the resources consumed by junk
    email.</t>

   <t><list style="hanging"><t hangText="Note:">
    Bounce messages have a null MAIL FROM address, so when deciding the
    authorization for bounce messages SPF uses the host name from the
    HELO command to look up the designated sending hosts. In this mode
    it is using similar semantics to CSA and is not really a
    designated sender protocol.
   </t></list></t>

   <t>Sender-ID uses an algorithm to extract the "purported
    responsible address" from the message header <xref target="PRA"/>,
    using (in decreasing order of priority) the Resent-Sender:,
    Resent-From:, Sender:, and From: fields. This algorithm is a
    natural result of the message header semantics described in
    <xref target="RFC2822"/>. The aim is to base the authorization
    desision on an email address that the user is likely to see, to
    directly counteract "phishing" (email-based confidence tricks).</t>

   <t>The main effect of this difference is to change the kinds of
    approaches that can be used to mitigate the compatibility problems
    that are described in the next section.</t>

  </section>

  <section title="Designated sender protocols and email forwarding">

   <t>A basic assumption underlying designated sender protocols is
    that a message travels across the public Internet directly from
    the sender's organization to the recipient's in a single hop.
    Although email messages usually travel more than one hop, most of
    the hops are within an organization (e.g. from a user's PC to a
    message submission server, or from a border MX to a message store
    system) and therefore use private routing arrangements. When a
    message travels between organizations across the public Internet,
    it is routed using public information, i.e. MX records in the DNS.
    It is this hop that designated sender protocols are aimed at.</t>

   <t>However this basic assumption is not true for a significant
    percentage of email.</t>

   <t>It is fairly common for users to arrange for their email to be
    automatically forwarded to an address at another site, using the
    Sieve redirect command <xref target="RFC3028"/> or a Unix .forward
    file or some equivalent facility. This kind of forwarding is
    almost identical to normal message relaying - the message header
    remains the same (apart from the addition of Received: trace
    fields), the MAIL FROM address remains the same - except that a
    recipient address in the message envelope is changed to the
    forwarding destination address.</t>

   <t><list style="hanging"><t hangText="Note:">
    This kind of forwarding is different from the "forward" command
    offered by most MUA software, which encapsulates the original
    message in a new message, e.g. using the MIME type message/rfc822
    <xref target="RFC2046"/>. The new message has a header and bounce
    address similar to normal messages sent by the forwarding user.
   </t></list></t>

   <t>Forwarding is frequently used by people with more than one email
    address to consolidate their email in one place. These include
    contributors to Internet-based projects, such as open source
    software projects and collaborative web sites. Academics who move
    around between Universities and research institutes on short
    contracts often keep in touch with past colleagues by forwarding
    email from their old accounts. It's typical for 5%-10% of users at
    a University to forward their email off-site (though the
    proportion may be as low as 0% or as high as 20% at certain
    institutions) and the proportion of the actual volume of email is
    similar to the proportion of users. Universities often provide
    email forwarding services to alumni, often with tens of thousands
    of registered users (though the number of active users is somewhat
    less).</t>

   <t>When a forwarded message is making its second hop across the
    public Internet it still claims to come from the original sender,
    but it will not be coming from a designated sending host of the
    original sender's domain: it will come from an outgoing email
    system of the forwarding site, the original recipient's domain.
    From the point of view of the final recipient the message is
    unauthorized and so it may be rejected.</t>

   <t>Note that there are three (or even more) organizations involved
    in delivering a forwarded message: the sender, the forwarder(s),
    and the final recipient. Forwarding is usually set up by end
    users, so the administrators of the email infrastructre at the
    three sites will typically not have an overview of the situation,
    and will usually not be aware that it is happening at all.</t>

   <t>The next three sections of this document examine ways that the
    basic designated sender protocols can be adapted to ameliorate
    this problem. Forwarding is a valuable and widely used feature of
    Internet email so it cannot just be left as a casualty beside the
    road to a brave new world of secure email.</t>

  </section>

  <section anchor="Senders" title="Considerations for email senders">
  </section>

  <section anchor="Recipients" title="Considerations for email recipients">
  </section>

  <section anchor="Forwarders" title="Considerations for email forwarders">
  </section>

  <section anchor="Security" title="Security Considerations">
  </section>

 </middle>

<!-- === -->
 <back>

  <references>

   &rfc2046;
   &rfc2821;
   &rfc2822;
   &rfc3028;

   <reference anchor="BATV">
    <front>
     <title>Bounce Address Tag Validation (BATV)</title>
     <author fullname="John Levine" initials="J." surname="Levine">
      <organization>Taughannock Networks</organization>
     </author>
     <author fullname="Dave Crocker" initials="D." surname="Crocker">
      <organization>Brandenburg InternetWorking</organization>
     </author>
     <author fullname="Sam Silberman" initials="S." surname="Silberman">
      <organization>Openwave</organization>
     </author>
     <author fullname="Tony Finch" initials="T." surname="Finch">
      <organization>University of Cambridge</organization>
     </author>
     <date day="7" month="September" year="2004"/>
    </front>
    <seriesInfo name="Internet-Draft" value="draft-levine-mass-batv-00"/>
   </reference>

   <reference anchor="Caller-ID">
    <front>
     <title>Caller ID for E-mail</title>
     <author fullname="Robert Atkinson" initials="R." surname="Atkinson">
      <organization>Microsoft Corporation</organization>
     </author>
     <date month="May" year="2004"/>
    </front>
    <seriesInfo name="Internet-Draft" value="draft-atkinson-callerid-00"/>
   </reference>

   <reference anchor="CSA">
    <front>
     <title>Client SMTP Authorization (CSA)</title>
     <author fullname="Douglas Otis" initials="D." surname="Otis">
      <organization>Mail Abuse Prevention System</organization>
     </author>
     <author fullname="Dave Crocker" initials="D." surname="Crocker">
      <organization>Brandenburg InternetWorking</organization>
     </author>
     <author fullname="John Leslie" initials="J." surname="Leslie">
      <organization>JLC.net</organization>
     </author>
     <date day="18" month="July" year="2004"/>
    </front>
    <seriesInfo name="Internet-Draft" value="draft-ietf-marid-csv-csa-01"/>
   </reference>

   <reference anchor="MTAmark">
    <front>
     <title>Marking Mail Transfer Agents in Reverse DNS with TXT RRs</title>
     <author fullname="Markus Stumpf" initials="M." surname="Stumpf">
      <organization>SpaceNet AG</organization>
     </author>
     <author fullname="Steff Hoehne" initials="S." surname="Hoehne">
      <organization>SpaceNet AG</organization>
     </author>
     <date day="20" month="October" year="2004"/>
    </front>
    <seriesInfo name="Internet-Draft" value="draft-stumpf-dns-mtamark-03"/>
   </reference>

   <reference anchor="PRA">
    <front>
     <title>Purported Responsible Address in E-Mail Messages</title>
     <author fullname="Jim Lyon" initials="J." surname="Lyon">
      <organization>Microsoft Corporation</organization>
     </author>
     <date month="August" year="2004"/>
    </front>
    <seriesInfo name="Internet-Draft" value="draft-ietf-marid-pra-00"/>
   </reference>

   <reference anchor="RMX">
    <front>
     <title>The RMX DNS RR and method for lightweight SMTP sender authorization</title>
     <author fullname="Hadmut Danisch" initials="H." surname="Danisch">
      <organization>danisch.de</organization>
     </author>
     <date month="May" year="2004"/>
    </front>
    <seriesInfo name="Internet-Draft" value="draft-danisch-dns-rr-smtp-04"/>
   </reference>

   <reference anchor="Sender-ID">
    <front>
     <title>Sender ID: Authenticating E-Mail</title>
     <author fullname="Jim Lyon" initials="J." surname="Lyon">
      <organization>Microsoft Corporation</organization>
     </author>
     <author fullname="Meng Weng Wong" initials="M." surname="Wong">
      <organization>pobox.com</organization>
     </author>
     <date month="August" year="2004"/>
    </front>
    <seriesInfo name="Internet-Draft" value="draft-ietf-marid-core-03"/>
   </reference>

   <reference anchor="SPF">
    <front>
     <title>Sender Policy Framework: Authorizing Use of Domains in MAIL FROM</title>
     <author fullname="Mark Lentczner" initials="M." surname="Lentczner">
      <organization/>
     </author>
     <author fullname="Meng Weng Wong" initials="M." surname="Wong">
      <organization>pobox.com</organization>
     </author>
     <date day="12" month="October" year="2004"/>
    </front>
    <seriesInfo name="Internet-Draft" value="draft-lentczner-spf-00"/>
   </reference>

  </references>

 </back>

</rfc>
