[afnog] Query SPF record in DNS

Robert Baskerville robert.baskerville at nortel.com
Thu Jan 8 12:23:46 UTC 2009


> I want to know how to query SPF record in DNS.

Literally, you just look them up. They live in the TXT record in the
domain you wish to query:

robert at trantor:~$ dig txt robert.net

; <<>> DiG 9.4.2-P2 <<>> txt robert.net
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4594
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;robert.net.                    IN      TXT

;; ANSWER SECTION:
robert.net.             86400   IN      TXT     "v=spf1 mx
a:moo.baskerville.net a:smtp.nildram.co.uk a:arkady.baskerville.net
-all"
[...]

You have not specified what you wish to do with them after looking them
up; for example, you might want to have Exim (or some other MTA) look
them up and act upon them, which is a different question entirely.


Robert Baskerville
Robert at Baskerville.Net



More information about the afnog mailing list