Basic Roles of sendmail
The sendmail program plays a variety of roles, all critical to the proper flow of electronic mail. It listens to the network for incoming mail, transports mail messages to other machines, and hands local mail to a local program for local delivery. It can append mail to files and pipe mail through other programs. It can queue mail for later delivery and understand the aliasing of one recipient name to another.
Role in the Filesystem
The sendmail program’s role (position) in the local filesystem hierarchy can be viewed as an inverted tree (see Figure 1-3).
![]() |
When sendmail is run, it first reads the /etc/mail/sendmail.cf configuration file. Among the many items contained in that file are the locations of all the other files and directories that sendmail needs.
Files and directories listed in sendmail.cf are usually specified as full pathnames for security (such as /var/spool/mqueue rather than mqueue). As the first step in our tour of those files, run the following command to gather a list of them:[6]
% grep =/ /etc/mail/sendmail.cfThe output produced by the grep(1) command might look something like the following:[7]
O AliasFile=/etc/mail/aliases #O ErrorHeader=/etc/mail/error-header O HelpFile=/etc/mail/helpfile O QueueDirectory=/var/spool/mqueues/q.* O StatusFile=/etc/mail/statistics #O UserDatabaseSpec=/etc/mail/userdb ...
