Class via Database-Map Lookups
Beginning with V8.12, you can declare class values by specifying and using database maps. Database maps are described in Chapter 23 on page 878. In its simplest form, such a declaration looks like this:
FXkey@ type:detail F{Name}key@ type:detail
Each such declaration begins with the F
configuration command,
which is immediately followed (with no intervening
space) by the name of the class that will be filled
with values. The first line shows the
single-character name form (the X
) and the second line
shows the multicharacter name form (the {Name}
).
The name of the class is immediately followed by the key to look up in the database map. Note that you must be very careful to specify a key that actually exists. If the key is not found in the database map, sendmail silently ignores the error.
The key
is immediately
followed by a literal @
character, which in turn is
immediately followed by the
type
of the database
map. A db-type database map,
for example, could have a
type
of either hash
or btree
. An
ldap-type database map, for
example, would have a
type
of ldap
. (We discuss
ldap in detail in the next
section.) A complete list of
type
s can be found in
the leftmost column of Table 23-2 on page
883.
The type
is immediately
followed by a colon and then by the
detail
. The nature of
the detail
varies
depending on what you want this command to do. To
illustrate, consider the following addition to an
mc configuration file:
LOCAL_CONFIG FwCWhosts@hash:/etc/mail/access ...
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.