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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access