FEATURE(lookupdotdomain)

Enable .domain secondary access.db lookups V8.12 and later

Normally, lookups of hosts in the access database (The access Database on page 277) are literal. That is, host.domain is looked up first as host.domain and then as domain. For example, the host hostA.CS.Berkeley.edu would first be looked up as hostA.CS.Berkeley.edu, then as CS.Berkeley.edu, then as Berkeley.edu, and lastly as edu. None of the components is looked up with a leading dot. That is, host.domain’s second lookup is domain, not .domain.

If you wish each lookup to also include a lookup of the domain part with a dot prefix, you can declare this FEATURE(lookupdotdomain):

FEATURE(`lookupdotdomain')

Once declared, all lookups of hosts in the access database will include another lookup with the domain part prefixed with a dot. That is, for example, without lookupdotdomain declared, the lookups of hostA.CS.Berkeley.edu will look like this:

hostA.CS.Berkeley.edu
CS.Berkeley.edu
Berkeley.edu
edu

But with lookupdotdomain declared, the lookups of hostA.CS.Berkeley.edu will look like this:

hostA.CS.Berkeley.edu
.CS.Berkeley.edu
CS.Berkeley.edu
.Berkeley.edu
Berkeley.edu
.edu
edu

This allows anything.cs.berkeley.edu to be treated differently from cs.berkeley.edu. For example:

.cs.berkeley.edu      REJECT
cs.berkeley.edu       OK

Here, anything that ends in .cs.berkeley.edu will be rejected, whereas anything ending in cs.berkeley.edu will be accepted.

Note that this FEATURE(lookupdotdomain) requires that the access.db be declared ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.