Name

FEATURE(domaintable)

Synopsis

Some sites need to use multiple domain names when transitioning from an old domain to a new one. The domaintable feature enables such transitions to operate smoothly by rewriting the old domain to the new. To begin, create a file of the form:

old.domain    new.domain

In it the left side of each line has one of possibly many fully qualified hostnames, and the right side has the new name. The makemap(1) program (Section 5.5) is then used to convert that file into a database.

The domaintable feature causes a rule such as this to be included in your configuration file:

R $* < @ $+ > $*                 $: $1 < @ $(domaintable $2 $) > $3

Here, each host part of an address in the canonify rule set 3 is looked up in the domaintable map. If it is found, the new name from that map replaces it.

The domaintable feature enables this lookup by including a K configuration command:

Kdomaintable hash /etc/mail/domaintable

The form of the domaintable feature is:

FEATURE(`domaintable')

The domaintable feature is one of those that can take an argument to specify a different form of, or different name for, the database:

FEATURE(`domaintable',`dbm /etc/mail/db/domaintable')

The extra argument causes the aforementioned K command to be replaced with the following one:

Kdomaintable dbm /etc/mail/db/domaintable

You can provide an extra argument that is a literal LDAP:

FEATURE(`domaintable', `LDAP')

The default in this instance becomes the following (we have wrapped the lines to fit the page):

Kdomaintable ...

Get Sendmail, 3rd 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.