Re: Quoted pairs in the test suite
Julian Mehnle <[email protected]> Mon, 14 Apr 2008 18:48:32 +0000
| Newsgroups | gmane.mail.spam.spf.devel |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Stuart D. Gathman wrote:
> On Mon, 14 Apr 2008, 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.
>
> Good question. So what is the right expansion for %{l}:
>
> 1) backslash
> 2) \b\a\c\k\s\l\a\s\h
> 3) "\b\a\c\k\s\l\a\s\h"
> 4) any of the above
>
> You could argue that %{l}@%{d} (in an exp, for example) should be a
> syntactically valid email. And leaving the quotes intact would be the
> easiest way to ensure that.
You cannot expect SPF implementations to safely generate valid RFC 2821/
2822 local-parts. You could say "%{l}"@%{d} (with the quotes) in an
explanation string, but if the local-part's _value_ was "foo (with the
quote), the SPF implementation would generate ""foo"@<domain>, whereas
the proper RFC 2821/2822 representation would be "\"foo"@<domain>.
It cannot be done reliably. SPF wasn't designed to do it.
(Also note that RFC 2821, section 4.1.2, sort of states quoted-string
local-parts as being bad practice.)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFIA6cAwL7PKlBZWjsRAjj4AJ9HRPumciuKHM7GCGQg3Pzyi1SLIgCgxbZR
ekGarPoEDdwvph7uDRdxkEY=
=76HJ
-----END PGP SIGNATURE-----