The makemap Program
The makemap program is supplied in source form with V8 sendmail. It can also be supplied in precompiled form by your vendor.[169] It is used to create database files and is run from the command line like this:
%makemap
switches dbtype outfile < infile
We’ll discuss the switches
in the
next section. The dbtype
can be
dbm (which uses the
ndbm(3) library routines),
hash, or
btree (both of which use the
db(3) library routines). The
outfile
is the location
and name (full path or relative name) for the database file
that will be created. For dbm files,
the .pag and .dir
suffixes are added automatically. For the
db files, the
.db suffix will be added
automatically if it is not already included in the
name.
The infile
is the name of the input
text file from which the database will be created. The
makemap program reads from its
standard input, hence the < character. That input is
line-oriented, with one database entry per line. Lines that
begin with a #
are
interpreted as comments and ignored. Lines that contain no
characters (empty lines) are also ignored. Whitespace
(spaces or tabs) separates the key on
the left from the data on the
right.
The following is an example of such an input file:
key data
↓ ↓
lady relaysite!lady
my.host relaysite!lady
bug bug localuucp
The second line shows that keys can be
multitokened (my.host
is
three tokens), but cannot contain space or tab characters.
The data is separated from the
keys by one or more space or tab characters. The last line ...
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.