Re: Quoted pairs in the test suite

Julian Mehnle <[email protected]> Mon, 14 Apr 2008 18:42:02 +0000
Newsgroups gmane.mail.spam.spf.devel
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Frank Ellermann wrote:
> Hi, does the SPF test suite cover oddities like
> MAIL FROM:<"\b\a\c\k\s\l\a\s\h"@test.example"> ?
>
> In the SPF I18N entry of the FAQ I claim that implementations will
> evaluate a %{l} local part macro as "backslash" (without the quotes),
> but actually I'm far from sure that implementations get <quoted-pair>
> within <quoted-string> right.

There's a difference between the _value_ of the localpart in a RFC 2821 
e-mail address and its _representation_ in the e-mail address.  RFC 2821, 
section 4.1.2, "Command Argument Syntax", in combination with RFC 2822, 
sections 3.2.2, "Quoted characters", and 3.2.5, "Quoted strings", define 
how to derive the _value_ of a localpart from its representation (and 
vice versa).

According to this definition, the localpart value of the representation in 
the above MAIL FROM command is "backslash" without the quotes.  And this 
is exactly what MTAs should pass to SPF implementations.

The test suite does not (and cannot, and should not) cover parsing of SMTP 
command arguments in RFC 2821/2822 _representation_.  This is the MTA's 
duty.  The test suite in YAML format encodes localpart _values_ in YAML 
_representation_, but again, parsing those representations isn't up to 
the SPF implementation.  It's the YAML parsing library's duty.  To sum it 
up, this isn't something that the test suite can or should or does do.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIA6V7wL7PKlBZWjsRAlWCAKD6iesYOGkoqKkTIMdGCmOXm/kd4ACg0OW/
ouUebgIIujx7VXwkPVtSU5Y=
=A2pi
-----END PGP SIGNATURE-----