spf-discuss
[Top] [All Lists]

Re: Re: "/" inside an exists: domain-spec?

2005-07-15 08:07:00
...... Original Message .......
On Fri, 15 Jul 2005 14:20:48 +0200 Frank Ellermann 
<nobody(_at_)xyzzy(_dot_)claranet(_dot_)de> wrote:
Scott Kitterman wrote:

delimiter        = "." / "-" / "+" / "," / "/" / "_" / "="

Does that mean that if a "/" appears inside an exists:
domain-spec it's an error?

A <delimiter> is only relevant within <macro-expand>, and that
is in curly braces.

Can it be escaped somehow to be legal or is it just
forbidden?

IIRC it's just legal, some weird RfC about zone-cuts below /24
or a similar headache, I forgot the number.  It caused a major
revision of Mark's last MARID syntax in Wayne's first classic
spec., that's why we have the <toplabel> today.

 -exists:%{i}(_dot_)%{s1(_at_)}(_dot_)100/86400.rate.%{d}

A "/" should be okay, with %{d} instead of <toplabel>.  It's
only tricky if you have e.g. /25 at the end.  But an exists:
has no CIDR, the trick affects only a: or mx: mechanisms.

The complexity here in pySPF is that it looks for a CIDR range before it 
knows which mechanism is in play.

I did a change last night to switch from assuming anything after a / is a 
CIDR to finding the last / and then seeing if what's after the / is a valid 
CIDR.

Your point about CIDR only applying to certain mechanisms is a good one.  I 
think I'll take a look at finding the mechanism type first....  This should 
make it easier to deal with IPv6 and dual CIDR (this if Stuart doesn't fire 
me after last night for ugly code).

Scott K