SMM:08-80
Sendmail Installation and Operation Guide
dns
This map requires the option -R to specify the DNS resource record type to
lookup. The following types are supported: A, AAAA, AFSDB, CNAME, MX,
NS, PTR, SRV, and TXT. A map lookup will return only one record. Hence for
some types, e.g., MX records, the return value might be a random element of the
list due to randomizing in the DNS resolver.
sequence
The arguments on the `K' line are a list of maps; the resulting map searches the
argument maps in order until it finds a match for the indicated key. For example,
if the key definition is:
Kmap1 ...
Kmap2 ...
Kseqmap sequence map1 map2
then a lookup against "seqmap" first does a lookup in map1. If that is found, it
returns immediately. Otherwise, the same key is used for map2.
syslog the key is logged
via syslogd (8). The lookup returns the empty string.
switch
Much like the "sequence" map except that the order of maps is determined by the
service switch. The argument is the name of the service to be looked up; the val-
ues from the service switch are appended to the map name to create new map
names. For example, consider the key definition:
Kali switch aliases
together with the service switch entry:
aliases nis files
This causes a query against the map "ali" to search maps named "ali.nis" and
"ali.files" in that order.
dequote
Strip double quotes (") from a name. It does not strip backslashes, and will not
strip quotes if the resulting string would contain unscannable syntax (that is, basic
errors like unbalanced angle brackets; more sophisticated errors such as unknown
hosts are not checked). The intent is for use when trying to accept mail from sys-
tems such as DECnet that routinely quote odd syntax such as
"49ers::ubell"
A typical usage is probably something like:
Kdequote dequote
...
R$-
$: $(dequote $1 $)
R$- $+
$: $>3 $1 $2
Care must be taken to prevent unexpected results; for example,
"|someprogram < input > output"
will have quotes stripped, but the result is probably not what you had in mind.
Fortunately these cases are rare.
regex
The map definition on the K line contains a regular expression. Any key input is
compared to that expression using the POSIX regular expressions routines reg-
comp(), regerr(), and regexec(). Refer to the documentation for those routines for
more information about the regular expression matching. No rewriting of the key
is done if the -m flag is used. Without it, the key is discarded or if -s if used, it is
substituted by the substring matches, delimited by $| or the string specified with
the the -d flag. The flags available for the map are