The sendmail command implements a general purpose internetwork mail routing facility under the UNICOS/mp operating system. It is not tied to any one transport protocol -- its function may be likened to a crossbar switch, relaying messages from one domain into another. In the process, it can do a limited amount of message header editing to put the message into a format that is appropriate for the receiving domain. All of this is done under the control of a configuration file. Due to the requirements of flexibility for sendmail, the configuration file can seem somewhat unapproachable. However, there are only a few basic configurations for most sites, for which standard configuration files have been supplied. Most other configurations can be built by adjusting an existing configuration file incrementally.
The main daemon, /usr/libexec/sendmail, performs two functions: it listens on the SMTP socket for connections (to receive mail from a remote system), and it processes the queue periodically to insure that mail gets delivered when hosts come up. sendmail is normally started at system boot time from the /etc/init.d/mail script. For a complete list of options, see the sendmail(1) man page.
The default command in the startup script is:
sendmail -bd -q15m
The -bd flag causes sendmail to run as a daemon and the -q flag specifies the mail queue processing interval, in this example every 15 minutes. See the sendmail(8) man page.
The /etc/init.d/mail script can be used to start or stop the sendmail daemon. For example, to implement changes to the configuration file, you must stop all running sendmail processes, refreeze the configuration file, and restart the sendmail daemon before the new configuration file will take effect. This script takes a single argument, either start or stop, which starts or stops the sendmail daemon respectively. You must be superuser (root) to use this script.
This is the main configuration file for sendmail. The /etc/mail/sendmail.cf file is an ASCII file that contains most of the configuration information and is read at run time. This file is designed to be generated from the m4 processor and should NOT be edited directly.
The preinstalled sendmail.cf file is configured for a generic system and may suit your needs. You may want to personalize this file, for instance, if you want to configure the sendmail daemon to relay all messages to a central mail server on your network. You should not edit sendmail.cf directly. See Section 7.4 for information regarding using the m4 macro processor to create a new sendmail.cf file.
The unicosmp.m4 file contains definitions for the sendmail environment under the UNICOS/mp operating system. It should not be modified. The .mv file used to generate sendmail.cf under UNICOS/mp includes these definitions with the line: OSTYPE(unicosmp)
The aliases file contains the text form of the alias database used by the sendmail program. The alias database contains aliases for local mail recipients. For example, the following alias delivers mail addressed to jd on the local system to firstname.lastname@example.org: jd:email@example.com
When sendmail starts up, it automatically processes the aliases file into the file /etc/mail/aliases.dir and /etc/mail/aliases.pag. The aliases.dir and aliases.pag are NDBM versions of the aliases database. The NDBM format improves sendmail performance.
Note: The newaliases program must be run after modifying the alias database file.
The newaliases program is used to rebuild the NDBM version of the aliases database. This program must be run any time the text version of the aliases file is modified. If not, the changes are not incorporated into the NDBM alias database and are not seen by the sendmail program. To rebuild the NDBM version of the database without restarting sendmail, enter the newaliases command. Executing this command is equivalent to executing sendmail with the -bi flag:
% /usr/lib/sendmail -bi
The mail queue, /var/spool/mqueue, is the directory where the mail queue and temporary files reside. The messages are stored in various queue files that exist under the /var/spool/mqueue directory. Queue files take these forms:
Control (queue) files for messages
A file used when a unique ID is created
Transcript file of the current session
Normally, a sendmail subdaemon processes the messages in this queue periodically, attempting to deliver each message. (The /etc/init.d/mail script starts the sendmail daemon so that it forks a subdaemon every 15 minutes to process the mail queue.) Each time sendmail processes the queue, it reads and sorts the queue, then attempts to run all jobs in order.