Sun
Microsystems offers a network information service called NIS. It
provides the ability to look up various kinds of information in
network databases. The nis type allows you to
access that network information by way of rules in rule sets. You
declare an nis database-map type like this:
Kname nis nismap
Here, name is the identifier that you will
later use in rule sets. The nismap is any
NIS database map that defaults to mail.aliases.
Lookups will occur in the default NIS domain. If you wish to specify
some other domain, you can append an @ character
and the domain name to the nismap:
Kname nis nismap @ domain
To illustrate, consider the need to look up the name of the central
mail server for your department. If such a database map were called
mailservers, you could use the following
configuration file line to look up your domain in that database map:
Kmailservers nis -o mailservers
...
R $* <@ $+ > $* $: $1<@$2>$3 <$(mailservers $2 $)>
R $* <@ $+ > $* <$+> $#smtp $@ $4 $: $1 < @ $2 > $3
...
Here, we look up the host part of an address ($2)
in the mailservers NIS database map. The
-o makes the existence of the database map
optional. If the host part is found, it is rewritten to be the name
of the mail server for that host. In the last rule we forward the
original address to that server.
Without the -o, the nonexistence of a database map
will cause this error to be logged:
Cannot bind to map name in domain domain: reason here
If NIS is not running or if sendmail cannot bind
to the domain specified for the default domain,
the following error is logged:
421 4.3.5 NIS map name specified, but NIS not running
Only a few database switches are available with this
nis database-map type. They can be found in Table 23-19.
Table 23-19. The nis database-map type K command switches
-a
|
-a
|
Append tag on successful match
|
-D
|
-D
|
Don't use this database map if DeliveryMode=defer
|
-f
|
-f
|
Don't fold keys to lowercase
|
-m
|
-m
|
Suppress replacement on match
|
-N
|
-N
|
Append a null byte to all keys
|
-O
|
-O
|
Never add a null byte
|
-o
|
-o
|
This database map is optional
|
-q
|
-q
|
Don't strip quotes from key
|
-S
|
-S
|
Space replacement character
|
-T
|
-T
|
Suffix to return on temporary failure
|
-t
|
-t
|
Ignore temporary errors
|
The nis database-map type is available only if
sendmail is compiled with NIS defined (NIS).