Mailing List Archive

Macro expansion
Testing my SPF implementation against Wayne's test suite from
http://www.midwestcs.com/spf/tests/tests_v2.1/test.txt, I came across the SPF policy record in

99.spf1-test.mailzone.com

which is

v=spf1 -all exp=99txt.spf1-test.mailzone.com moo

The explanation TXT expands to

"u=%{u} s=%{s} d=%{d} t=%{t} h=%{h} i=%{i} %% U=%{U} S=%{S} D=%{D} T=%{T} H=%{H} I=%{I} %% moo"

The latest draft specification doesn't document the "u" macro, nor does it indicate what to do when
faced with a macro that is not documented - do you report (unknown) error for the policy (seems a little
harsh), do you ignore the macro completely, or should it be replaced with some simple string, e.g.
"(unknown)"?

Any help appreciated,
Thanks,
Gary Levell

www.exclaimer.net

This message (and any associated files) is intended only for the use of spf-devel@v2.listbox.com and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not spf-devel@v2.listbox.com you are hereby notified that any dissemination, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer. Messages sent to and from us may be monitored. Any views or opinions presented are solely those of the author gary@exclaimer.net and do not necessarily represent those of the company.

This disclaimer was added by eXclaimer for Microsoft Exchange 2000, a DCSL product. Please visit our web site at www.exclaimer.co.uk for more information.

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com
Re: Macro expansion [ In reply to ]
On Tue, Jun 08, 2004 at 10:10:45AM +0100, Gary Levell wrote:
| Testing my SPF implementation against Wayne's test suite from
| http://www.midwestcs.com/spf/tests/tests_v2.1/test.txt, I came across the SPF policy record in
|
| 99.spf1-test.mailzone.com
|
| which is
|
| v=spf1 -all exp=99txt.spf1-test.mailzone.com moo
|
| The explanation TXT expands to
|
| "u=%{u} s=%{s} d=%{d} t=%{t} h=%{h} i=%{i} %% U=%{U} S=%{S} D=%{D} T=%{T} H=%{H} I=%{I} %% moo"
|
| The latest draft specification doesn't document the "u" macro, nor does it indicate what to do when
| faced with a macro that is not documented - do you report (unknown) error for the policy (seems a little
| harsh), do you ignore the macro completely, or should it be replaced with some simple string, e.g.
| "(unknown)"?
|

hm. u and l were supposed to be synonymous --- just as some
people think of "username" and "localpart" as synonymous.

when faced with an undocumented macro, you, uh, replace it
with a zero-length string.

so "%{?}" becomes ""

when undocumented macros are used to construct a
domain-spec, consecutive dots are compressed.

so "foo.%{?}.bar" becomes "foo.bar" because the ".."
collapses to ".".

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com
Re: Macro expansion [ In reply to ]
In <20040608183153.GK2112@dumbo.pobox.com> Meng Weng Wong <mengwong@dumbo.pobox.com> writes:

> | The explanation TXT expands to
> |
> | "u=%{u} s=%{s} d=%{d} t=%{t} h=%{h} i=%{i} %% U=%{U} S=%{S} D=%{D} T=%{T} H=%{H} I=%{I} %% moo"
> |
> | The latest draft specification doesn't document the "u" macro, nor does it indicate what to do when
> | faced with a macro that is not documented - do you report (unknown) error for the policy (seems a little
> | harsh), do you ignore the macro completely, or should it be replaced with some simple string, e.g.
>
> hm. u and l were supposed to be synonymous --- just as some
> people think of "username" and "localpart" as synonymous.

The only place that I have ever seen the 'u' macro used is in this
test case. I believe it was documented in an earlier draft.

> when faced with an undocumented macro, you, uh, replace it
> with a zero-length string.

to the best of my knowledge, this is not in the spec. libspf-alt
considers it a syntax error and response accordingly. The same goes
for things like unterminated macro variables (e.g. "%{l.foo.bar"),
invalid separater characters (e.g. "%{l{}.foo.bar"), etc.


> when undocumented macros are used to construct a
> domain-spec, consecutive dots are compressed.

compressing consecutive dots is not documented in the SPF spec. If
someone creates an invalid domain name for some reason, it is a bad
idea to try and guess what the "correct" name should be.

All of the quirks in the the perl implementation should *not* be the
final word on what SPF is.


-wayne

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com