dns

Look up addresses using DNS V8.12 and later

The dns type is an internal database map available to perform DNS lookups. It is declared like this:

Kdnslookup dns -Rlookup-type

The -R switch—which specifies the DNS query to perform—must always be included. Table 23-11 shows the DNS queries that are supported.

Table 23-11. The dns database-map type -R switch query values

-R Value

Means

A

Return IPv4 address records for the host (RFC1035).

AAAA

Return IPv6 address records for the host (RFC1886).

AFSDB

Return an AFS server resource record (RFC1183).

CNAME

Return the canonical name for the host (RFC1035).

MX

Return a best MX record for the host (RFC1035).

NS

Return a name server record (RFC1035).

PTR

Return the hostname that corresponds to an IP record (RFC1035).

SRV

Return the port to use for a service (RFC2782).

TXT

Return general (human-readable) information (RFC1035).

If an -R value other than those in Table 23-11 is specified, the following two errors are printed and logged. If the -R switch is omitted, only the second error is printed and logged:

configfile: line num: dns map lookup: wrong type bad -R value
configfile: line num: dns map lookup: missing -R type

To make this dns database-map type more useful, the switches shown in Table 23-12 are also available for your use.

Table 23-12. The dns database-map type K command switches

Switch

§

Description

-A

-A on page 886

Append values for duplicate keys.

-a

-a on page 887

Append tag on successful match.

-B

Get sendmail, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.