Subject: Re: [spfbis] Possible ABNF nit with Received-SPF

From: Arthur Thisell <[email-masked]>
Date: Wed, 5 Sep 2012 12:00:02 -0700 (PDT)

two things...

First, we could probably just get rid of the mechanism keyword on the Received-SPF ABNF.   I doubt it is used, and even if it is, things would still be valid since the ABNF allows arbitrary keyword-value pairs.  This was only really important when Meng Weng Wong was trying to turn Sender Protect From into a Sender Policy Framework.

Second, I thought that maybe we could reduce confusion by instead of listing all the possible keywords, and then matching those keywords up with valid values, we could match up the keywords and values in the ABNF.  I'm not sure if the result is a success though, there is some duplicate ABNF and it still seems confusing, but maybe it's a start.

From:
   key-value-pair   = key [CFWS] "=" ( dot-atom / quoted-string )

   key              = "client-ip" / "envelope-from" / "helo" /
                      "problem" / "receiver" / "identity" /
                       mechanism / name

   identity         = "mailfrom"   ; for the "MAIL FROM" identity
                      / "helo"     ; for the "HELO" identity
                      / name       ; other identities

   client-ip      the IP address of the SMTP client

   envelope-from  the envelope sender mailbox

   helo           the host name given in the HELO or EHLO command

   mechanism      the mechanism that matched (if no mechanisms matched,
                  substitute the word "default")

   problem        if an error was returned, details about the error

   receiver       the host name of the SPF verifier

   identity       the identity that was checked; see the <identity> ABNF
                  rule

To:

   key-value-pair   =  "client-ip" [CFWS] "=" <expansion of the %{c} macro> 
   key-value-pair   =/ "envelope-from" [CFWS] "=" <sender>
   key-value-pair   =/ "helo" [CFWS] "=" <HELO identity>
   key-value-pair   =/ "identity" [CFWS] "=" ("mailfrom" / "helo" / name)
   key-value-pair   =/ "problem" [CFWS] "=" 
                       <if an error was returned, details about the error>
   key-value-pair   =/ "receiver" [CFWS] "=" 
                       <the host name of the SPF client>
   key-value-pair   =/ name [CFWS] "="  ( dot-atom / quoted-string )

---

From: Scott Kitterman <[email-masked]>
Date: Wed, 05 Sep 2012 15:04:03 -0400

On Wednesday, September 05, 2012 12:00:02 PM Arthur Thisell wrote:
...
> First, we could probably just get rid of the mechanism keyword on the
> Received-SPF ABNF.   I doubt it is used, and even if it is, things would
> still be valid since the ABNF allows arbitrary keyword-value pairs.  This
> was only really important when Meng Weng Wong was trying to turn Sender
> Protect From into a Sender Policy Framework.
...

It is used.  It's useful for forensics, which is one of the main purposed of 
Received-SPF.

Scott K