<?xml version="1.0" encoding="US-ASCII" ?>
<!DOCTYPE rfc SYSTEM "http://xml.resource.org/authoring/rfc2629.dtd" [
    <!ENTITY rfc2119 PUBLIC ''
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.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 rfc4407 PUBLIC ''
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4407.xml'>
    <!ENTITY rfc4408 PUBLIC ''
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4408.xml'>
    <!ENTITY rfc4409 PUBLIC ''
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4409.xml'>
    <!ENTITY rfc4949 PUBLIC ''
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4949.xml'>
    <!ENTITY rfcABNF PUBLIC ''
    'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.crocker-rfc4234bis.xml'>
]>

<!-- no I-D - >
    <?rfc private="SPF draft" ?>
    <?rfc header="Sender Policy Framework" ?>
    <?rfc footer="draft-ellermann-spf-options-02" ?>
<! - no I-D -->

<?rfc toc="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<?rfc strict="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc rfcprocack="yes" ?>

<rfc ipr="full3978" docName="draft-ellermann-spf-options-02" category="exp">
<front>
    <title abbrev="SPF options">
    Sender Policy Framework: SPF Options
    </title>
    <author initials="F." surname="Ellermann" fullname="Frank Ellermann">
        <organization>xyzzy</organization>
        <address>
            <postal>
                <street></street>
                <city>Hamburg</city>
                <region>Germany</region>
            </postal>
            <email>hmdmhdfmhdjmzdtjmzdtzktdkztdjz@gmail.com</email>
            <uri>http://purl.net/xyzzy/</uri>
        </address>
    </author>
    <date />
    <!-- $Id$ -->
    <abstract><t>
        In discussions about the Sender Policy Framework (SPF) users often
        wanted to add optional properties to their sender policies. The
        modifier <spanx style="verb">match_subdomains=yes</spanx> made it
        into early SPF drafts.  This memo proposes a general syntax for a
        modifier <spanx style="verb">op=</spanx> for this purpose.
    </t></abstract>
</front>

<middle>
    <section title="Introduction">
        <t>
            The key words "MAY, "MUST", "MUST NOT", and "NOT RECOMMENDED"
            in this memo are to be interpreted as described in
            <xref target="RFC2119" />.
            One line of syntax uses the ABNF defined in
            <xref target="I-D.crocker-rfc4234bis" />.
        </t><t>
            Readers should be familiar with
            <xref target="RFC2821" />,
            <xref target="RFC4409" />, and the SPF terminology in
            <xref target="RFC4408" />. See
            <xref target="RFC4949" /> for an Internet Security Glossary.
        </t><t>
            Comments and questions should be sent to the
            SPF-Discuss mailing list
            <eref target="http://dir.gmane.org/gmane.mail.spam.spf.discuss" />.
        </t>
    </section>

    <section title="Motivation">
        <t>
            The SPF community often discussed optional
            <spanx style="verb">yes</spanx>,
            <spanx style="verb">no</spanx>, or
            similar modifiers.  SPF allows the introduction of new
            modifiers without a new SPF version under two conditions:
        <list style="numbers"><t>
            All SPF implementations can safely ignore the new modifier.
        </t><t>
            Implementations supporting the new modifier interpret all
            policies without this modifier like all other conforming
            implementations.
        </t></list>
            The <spanx style="verb">op</spanx> modifier is a shorthand
            for optional properties and "opt-in" procedures.  The length
            of SPF policies is limited. Instead of separate modifiers as
            in...
        </t><t>
            IN SPF <spanx style="verb">v=spf1 o1=yes p2=no q3=1</spanx>
        </t><t>
            ...the <spanx style="verb">op</spanx> modifier allows the
            shorter notation...
        </t><t>
            IN SPF <spanx style="verb">v=spf1 op=o1.nop2.q3</spanx>
        </t><t>
            ...for hypothetical properties <spanx style="verb">o1</spanx>,
            <spanx style="verb">nop2</spanx>, and
            <spanx style="verb">q3</spanx>.  Please note
            that a policy without one of these properties does not
            implicitly have any "opposite" property.  Existing sender
            policies and implementations may not know these properties.
            They are also free to ignore known properties intentionally.
        </t><t>
            It is possible to define a hypothetical property
            <spanx style="verb">p2</spanx> as the opposite of
            <spanx style="verb">nop2</spanx>, and to specify it explicitly
            in a sender policy.  The definitions could state that
            <spanx style="verb">p2</spanx> and
            <spanx style="verb">nop2</spanx> must not be used together.
        </t>
    </section>

    <section title="op: options">
        <t>
            The <spanx style="verb">op</spanx> modifier introduces a
            dot-separated list of optional properties.  New properties
            can be defined in additional documents in the same way as
            new SPF modifiers.
        </t><t>
            At most one
            <spanx style="verb">op</spanx> modifier is allowed
            in an SPF sender policy.  It is a good idea to specify an
            <spanx style="verb">op</spanx> modifier before the first
            directive.  An ABNF specification for options:
        </t><figure>
<artwork type="abnf">
    options = "op=" name *( "." name )
</artwork>
        </figure><t>
            Property names can be given in any order, it is no syntax error
            to specify the same property more than once.  The term
            &lt;name&gt;
            for the names of individual properties is defined in
            <xref target="RFC4408" />.
        </t><t>
            An initial set of properties is defined below:
            <spanx style="verb">pra</spanx>, and
            <spanx style="verb">auth</spanx>.
        </t><t>
            In theory a modifier could be defined to have an effect on the 
            evaluation of "included" policies.  This is not the case for
            the predefined (in <xref target="RFC4408" />) modifiers 
            <spanx style="verb">exp</spanx> and
            <spanx style="verb">redirect</spanx>, and
            <spanx style="verb">op</spanx> follows this role model.
        </t><t>   
            In theory a modifier could be defined to have an effect on the 
            evaluation of "continuation records" when following a
            <spanx style="verb">redirect</spanx> modifier.  This is not the
            case for the predefined <spanx style="verb">exp</spanx> modifier,
            and <spanx style="verb">op</spanx> follows this role model.
        </t>

        <section title="The optional &quot;pra&quot; property"><t>
            The <spanx style="verb">pra</spanx> property indicates that
            the sender policy MAY be also evaluated for the "PRA" identity
            also known as "Purported Responsible Address" and defined in
            <xref target="RFC4407" />.
        </t><t>
            Please note that many cases exist, where the "PRA" identity
            differs from the "MAIL FROM" identity, and that classic SPF
            sender policies are generally not designed to work with the
            "PRA" identity.
        </t><t>
            Enforced submission rights for Message Submission Agents
            (MSAs) in <xref target="RFC4409" /> do not guarantee
            a match of any address in the 2822-From header field with
            the "MAIL FROM" identity, and they also do not guarantee the
            presence of a matching 2822-Sender header field.  For more
            details about these problems see <xref target="RFC2822" />
            and compare sections 6.1 and 8.1 in
            <xref target="RFC4409" />.
        </t></section>

        <section title="The optional &quot;auth&quot; property"><t>
            The <spanx style="verb">auth</spanx> property indicates that
            the domain owner not only authorizes the hosts that "Pass" the
            sender policy to send mail using the domain in the "MAIL FROM"
            and "HELO" identities, but that the domain owner also asserts
            those uses of the domain to be authentic, i.e. not forged.
        </t><t>
            In particular, this means that any authorized hosts that are
            shared with other domains are guaranteed to prevent cross-user
            forgery (see <xref target="RFC4408" />, section 10.4).
            This is often the case for MSAs as defined in
            <xref target="RFC4409" />, but many MSAs and
            smart hosts still allow to use any "MAIL FROM" identity after
            a successful authentication.
        </t><t>
            For details about enforced submission rights see
            <xref target="RFC4409" />.  Example:
        </t><t>
            IN SPF <spanx style="verb">v=spf1 op=auth +a ?include:example.com -all</spanx>
        </t><t>
            Please note that the <spanx style="verb">auth</spanx>
            property has no technical effect.  It is arguably better
            to use a "Neutral" mechanism for any shared smart host, and
            to use "Pass" only if the MSA enforces submission rights.
        </t></section>
    </section>

    <section title="Acknowledgements">
        <t>
            Many persons on the SPF-Discuss mailing list
            contributed to the ideas published in this memo.
            Special thanks for this and completely different
            reasons to
            April Lorenzen,
            Bruce Lilly,
            Chris Hayes,
            Hector Santos,
            Julian Mehnle,
            Keith Moore,
            Meng Weng Wong,
            Scott Kitterman,
            Stuart D. Gathman,
            Wayne Schlitt, and William Leibzon.
        </t><t>
            Bill Fenner's <spanx>xml2rfc validator</spanx> and
            <spanx>ABNF checker</spanx> were a great help in the creation
            of (not only) this memo. The same goes for various great 
            <spanx>IETF&nbsp;tools</spanx> written by Henrik&nbsp;Levkowetz. 
        </t>
    </section>

    <section title="Security Considerations">
        <t>
            Please consult the security considerations in
            <xref target="RFC4409" /> and
            <xref target="RFC4408" />.
            A sender policy is only a claim by the domain owner, this
            can be a spammer or an attacker.
        </t><t>
            The SPF specification <xref target="RFC4408" />
            explains why checking other identities except from the "HELO"
            and "MAIL FROM" identities against SPF version 1 records is
            NOT RECOMMENDED without explicit approval of the domain owner.
        </t><t>
            While the <spanx style="verb">pra</spanx> property offers a
            way for this explicit approval in the case of a "PRA" identity,
            it does not solve any of the underlying technical problems
            with this approach.  Receivers should treat all PRA-results
            with utmost care.
        </t>
    </section>

    <section title="IANA Considerations">
        <t>
            The creation of a IANA registry for additional SPF modifiers
            not limited to <spanx style="verb">op=</spanx> and/or for
            additional properties might be desirable in the future, but
            at this time it's unnecessary.
        </t>
    </section>
</middle>

<back>
    <references title="Normative References">
        &rfc2119;
        &rfc4408;
        &rfc4409;
        &rfcABNF; 
    </references>
    <references title="Informative References">
        &rfc2821;
        &rfc2822;
        &rfc4407;
        &rfc4949;
    </references>

    <section title="Document History"><t>
        <spanx style="strong">This appendix should not be published in an RFC.</spanx>
        </t><t>
            For [draft-ellermann-spf-options-00] the last
            [draft-spf-6-3-options-10] was renamed and
            submitted as Internet draft (I-D). A note that it should be
            not implemented before that time was removed - apparently
            no additional SPF modifiers have been implemented so far.
        </t><t>
            The first revision of the I-D (version 01) got a reference
            to <xref target="RFC4949" /> for the improved
            <spanx style="verb">auth</spanx> section. More acronyms
            are expanded on first usage.
        </t><t>
            Version 02 is a maintenance update removing the 
            [draft-spf-6-3-options] (2004-2006) history.
            RFC 2828 was replaced by <xref target="RFC4949" />, and 
            RFC 4234 was replaced by <xref target="I-D.crocker-rfc4234bis" />.  
            The popular demand for <spanx style="verb">helo</spanx> and
            <spanx style="verb">nohelo</spanx> options over the years
            was near zero, they are now removed.
        </t>
     </section>
</back></rfc>