Sendmail Operation Guide

The service switch

The implementation of certain system services such as host and user name lookup is controlled by the service switch. If the host operating system supports such a switch, sendmail(1M) will use the native version.

If the underlying operating system does not support a service switch (for example, SunOS 4.X, HP-UX, BSD) then sendmail will provide a stub implementation. The ServiceSwitchFile option points to the name of a file that has the service definitions. Each line has the name of a service and the possible implementations of that service. For example, the file:

   hosts    dns files nis
   aliases  files nis
will ask sendmail to look for hosts in the Domain Name System first. If the requested host name is not found, it tries local files, and if that fails it tries NIS. Similarly, when looking for aliases it will try the local files first followed by NIS.

Service switches are not completely integrated. For example, despite the fact that the host entry listed in the above example specifies to look in NIS, on SunOS this won't happen because the system implementation of gethostbyname(3N) does not understand this. If there is enough demand, sendmail may reimplement gethostbyname(3N), gethostbyaddr(3N), getpwent(3C), and the other system routines that would be necessary to make this work seamlessly.


© 2000 The Santa Cruz Operation, Inc. All rights reserved.