home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Previous Section Next Section

NIS

Support for nis database maps tune with confMAPDEF

NIS stands for Network Information Services. If you intend to have sendmail support nis (formerly Yellow Pages) maps, you need to define NIS with a line such as the following in your Build m4 file:

APPENDDEF(`confMAPDEF', `-DNIS')

If NIS is defined, the AliasFile option can be specified as:

OAnis:mail.aliases            V8.6
O AliasFile=nis:mail.aliases  V8.7 and above (if no service-switch file)

See AliasFile for more details about the AliasFile option. See ServiceSwitchFile for a description of the ServiceSwitchFile option and its effect on nis aliases. Be aware that the above AliasFile option declaration will override the lack of an nis entry in the service-switch file.

NDBM also needs to be defined to allow sendmail to rebuild its alias files for use by nis:

APPENDDEF(`confMAPDEF', `-DNIS -DNDBM')

For this to work, the path of the alias file needs to contain the substring:

/yp/

A typical /var/yp/Makefile will contain a line such as this:

/usr/lib/sendmail -bi -oA$(YPDBDIR)/$(DOM)/mail.aliases

Here, $(YPDBDIR)/ is usually /var/yp/, so the substring is found. When the substring /yp/ is found, sendmail augments the aliases database with two special entries that are needed by nis:

YP_LAST_MODIFIED
YP_MASTER_NAME

These allow the newly built aliases file to be successfully distributed for use by nis clients. Without these entries you will see an error such as the following when pushing your nis maps:

Status received from ypxfr on nisslave:
        Failed - no local order number in map - use -f flag to ypxfr.

The solution here is to rebuild sendmail with both NDBM and NIS defined.

Defining NIS also causes support to be included for declaring and using nis-type maps (Section 23.2.2) with the K configuration command.

Note that defining NIS without also defining NAMED_BIND will cause delivery to MX records to mysteriously fail.

If you are running a precompiled sendmail binary, you can use the -d0.1 debugging command-line switch (-d0.1) to determine if NIS support is included (if it appears in the list, support is included).

    Previous Section Next Section