makemap Command

Purpose

Creates database maps for sendmail.

Syntax

makemap [ -C -N -c CacheSize -d -D-e -f -l -o -r -s -t-u -v] Maptype Mapname

Description

The makemap command creates the database maps used by the keyed map lookups in the sendmail command. It reads input from the standard input and outputs them to the indicated Mapname.

Parameters

Item Description
Maptype Depending upon how it is compiled, this command handles up to three different database formats:
dbm
DBM format maps. This requires the ndbm library.
btree
B-tree format maps. This requires the new Berkeley DB library.
hash
Hash format maps. This requires the new Berkeley DB library.

Note: In all cases, this command reads lines from the standard input, consisting of two words separated by white space. The first is the database key, the second is the value. The value may contain ''%n'' strings to indicate parameter substitution. Literal percents should be doubled ("%%"). Blank lines and lines beginning with a "#" are ignored.

Mapname Name of the map.
Note: Do not use makemap command to create the aliases data base, but newaliases which puts a special token into the data base that is required by sendmail command.

If the TrustedUser option is set in the sendmail configuration file and makemap is invoked as the root user, the generated files are owned by the specified trusted user.

Flags

Item Description
-c CacheSize Specifies to use the hash and B-tree cache size.
-C Indicates to use the specified sendmail configuration file for looking up the TrustedUser option.
-d Allows duplicate keys in the map. This is only allowed on B-tree format maps. If two identical keys are read, they are both inserted into the map.
-D Specifies the character to use to indicate a comment (which is ignored) instead of the default of #.
-e Allows empty values on the right side.
-f Disables the function of folding all uppercase letters in the key to lowercase. This flag is intended to mesh with the -f flag in the K line in the sendmail.cf file. The value is never case folded.
-l Lists supported map types.
-N Includes the null byte that ends strings in the map. This flag must match the -N flag in the sendmail.cf K line.
-o Specifies to append to an existing file. This flag allows you to augment an existing file.
-r Allows replacement of existing keys. Normally, the makemap command complains if you repeat a key and does not perform the insert operation.
-s Ignores safety checks on maps being created. This includes checking for hard or symbolic links in world writeable directories.
-t Specifies the delimiter to use instead of white space. This flag is also used for dumping files.
-u Dumps or unmaps the contents of the database to standard output.
-v Specifies that the command verbosely print its status.