spf-discuss
[Top] [All Lists]

Re: What is the QUERY_TYPE code for an SPF DNS lookup?

2004-01-13 12:42:21
On Wed, Jan 14, 2004 at 01:21:26AM +1100, Chris Drake wrote:

| Hi,
| 
| I happen to have written my own DNS, but I can't find mention of what
| the new SPF query's Q_TYPE code is supposed to be - can anyone let me
| know?

I read this in the RFC draft document.  Initially the TXT RR is being
used.  It is expected that a new RR type will be proposed, but it will
likely have identical string contents (though plausible it could have
a binary version number instead).

No changes are needed in DNS servers to do basic SPF publishing.  But
I do happen to be working on making a DNS server that can accept a
special DNS query using the SPF "exists" mechanism, and determine if
a specific user(_at_)domain tupled with a specific sending client is a valid
way to send.  My plan is to eventually use the SPF "exists" mechanism
this way, and to also track and log attempts by spammers to forge any
of my, or my customers', domain names.


| Needless to say - my version of "dig" doesn't know about SPF (yet?)
| 
| works:-
| dig aol.com mx
| 
| fails:-
| dig aol.com spf

=============================================================================
phil(_at_)vega:/home/phil 138> dig +norec @dns-01.ns.aol.com. aol.com. txt

; <<>> DiG 9.2.3 <<>> +norec @dns-01.ns.aol.com. aol.com. txt
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14988
;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 4

;; QUESTION SECTION:
;aol.com.                       IN      TXT

;; ANSWER SECTION:
aol.com.                300     IN      TXT     "v=spf1 ip4:152.163.225.0/24 
ip4:205.188.139.0/24 ip4:205.188.144.0/24 ip4:205.188.156.0/24 
ip4:205.188.157.0/24 ip4:205.188.159.0/24 ip4:64.12.136.0/24 ip4:64.12.137.0/24 
ip4:64.12.138.0/24 ptr:mx.aol.com ?all"

;; AUTHORITY SECTION:
aol.com.                3600    IN      NS      dns-06.ns.aol.com.
aol.com.                3600    IN      NS      dns-07.ns.aol.com.
aol.com.                3600    IN      NS      dns-01.ns.aol.com.
aol.com.                3600    IN      NS      dns-02.ns.aol.com.

;; ADDITIONAL SECTION:
dns-01.ns.aol.com.      3600    IN      A       152.163.159.232
dns-02.ns.aol.com.      3600    IN      A       205.188.157.232
dns-06.ns.aol.com.      3600    IN      A       149.174.211.8
dns-07.ns.aol.com.      3600    IN      A       64.12.51.132

;; Query time: 52 msec
;; SERVER: 152.163.159.232#53(dns-01.ns.aol.com.)
;; WHEN: Tue Jan 13 13:38:21 2004
;; MSG SIZE  rcvd: 398

phil(_at_)vega:/home/phil 139>
=============================================================================


| Example - the existing query T_AAAA has the decimal code: 28
| 
| Lemme know if I totally don't understand. Here's the section of the
| draft I got this idea from:-
| 
|    SPF makes use of the "SPF" DNS record type where it is available.
|    Where it is not available, SPF falls back to the TXT record type.
|    Throughout the remainder of this document, "SPF record" means the
|    record found at either an SPF or TXT.

Use TXT because the SPF RR has not been finalized, yet.

SPF code for MTAs will begin by using TXT in phase 1.  Once an SPF RR
is assigned, that code will be upgraded to start using it, while still
falling back to checking the TXT record in phase 2 of the transision.
Eventually when everyone has deployed DNS servers with SPF capability
and switched their data over to that, which could take a few years,
then phase 3 will depricate the use of the TXT record.  In the mean
time, think of SPF as riding on TXT.


| except the draft doesn't number the SPF record type anywhere that I
| can see.

It's not a final RFC, and the SPF RR may not even be in that RFC.  It
may need a 2nd RFC just to add the new RR to DNS.

-- 
-----------------------------------------------------------------------------
| Phil Howard KA9WGN       | http://linuxhomepage.com/      http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/   http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------

-------
Sender Permitted From: http://spf.pobox.com/
Archives at http://archives.listbox.com/spf-discuss/current/
Latest draft at http://spf.pobox.com/draft-mengwong-spf-02.9.4.txt
To unsubscribe, change your address, or temporarily deactivate your 
subscription, 
please go to 
http://v2.listbox.com/member/?listname(_at_)©#«Mo\¯HÝÜîU;±¤Ö¤Íµø?¡