SCO recommends the use of the Mail Manager to manage the domain table, and to configure the mail system in general. See ``Managing the domain table''. However, some administrators may wish to hand-edit the sendmail configuration file, sendmail.cf. This topic discusses the sendmail.cf constructs which implement the domain table. Refer to ``Sendmail Operation Guide'' for definitions of sendmail.cf commands. The O'Reilly & Associates book detailed in ``The message transport agent'' is a good reference for sendmail rulesets.
The domain table lookup is done as the first task in ruleset 96, a subset of ruleset 3. Every sendmail.cf file contains ruleset 3, and every address is first processed by ruleset 3 in order to put it in a form that simplifies the task of other rulesets. Part of this pre-processing includes a name service lookup which is done on the hostname part of the address, in an attempt to obtain a fully qualified, or ``canonical'' name. The domain table lookup is done prior to this hostname canonicalization. Thus the domain table may map an unqualified (short) host name.
The code which parses addresses and performs the table lookup exists in a separate ruleset, whose symbolic name is ``domains''. Ruleset ``domains'' is therefore a subroutine of ruleset 96, which is in turn a subroutine of ruleset 3. Another ruleset, named ``domains_helper'' has also been created, as a subroutine of ``domains''.
The domain table itself is both a sendmail map file
(editable either with the Mail Manager
or by hand), and a database, compiled using the
makemap(1M)
tool. For more information, see
``K: key file declaration''.
The map is defined in sendmail.cf by the following
K (``key file declaration'') configuration command:
Kdomain hash -o -a.DMNTAB /etc/mail/table/domain
For details of the sendmail configuration commands, refer to ``Sendmail Operation Guide''.
Note that the database is of class type ``hash'', and that the location of the text file is /etc/mail/table/domain. This definition cannot be modified by the Mail Manager.
The domain table is enabled and disabled in sendmail.cf using the D macro. If ``$D'' has a null value, then the domain table is disabled. Otherwise it is enabled. After a fresh installation, the domain table is not enabled. SCO recommends that you configure this via the Mail Manager, which will edit the sendmail.cf file appropriately. See ``The Mail Manager'' for more details.