spf-discuss
[Top] [All Lists]

Re: Another macro letter required besides 'i'

2004-03-22 14:23:08
In <7976310(_at_)pamho(_dot_)net> "Roger Moser" 
<Roger(_dot_)Moser(_at_)pamho(_dot_)net> writes:

According to the latest SPF specifications, for an IPv6 address the macro
"%{i}" produces a string in following format:

0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.F.F.F.F.1.2.3.4.5.6.7.8

Actually, the current SPF spec is pretty vague about what exactly the
%{i} macro-variable produces.

While adding IPv6 support for libspf-alt v0.3, I noticed this very
same thing.  I talked with Meng about this a bit, and what I ended up
doing is using the dotted-nibble format if and only if the ip-address
has the 'reverse' flag.  (e.g. %{ir}).  Otherwise, it uses the C
library routine inet_ntop() function.

But for the explanation string we need a macro "%{c}" that produces a string
in following format:

I thought about a new variable, but what would be the semantics for
IPv4?  How do you write an SPF record that works for both IPv4 and IPv6?

::FFFF:18.52.86.120

pardon my ignorance, but is this a valid IPv6 address?  (Yes, I know
that there is an IPv4<->IPv6 mapping, but I thought all IPv6 addresses
required colons instead of dots.)



-wayne