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).

The sendmail.cf file leads to everything else

Figure 1-3. The sendmail.cf file leads to everything else

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:[9]

% grep =/ /etc/mail/sendmail.cf

The output produced by the grep(1) command might appear something like the following:[10]

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 #O ServiceSwitchFile=/etc/mail/service.switch #O HostsFile=/etc/hosts #O SafeFileEnvironment=/arch #O DeadLetterDrop=/var/tmp/dead.letter O ControlSocketName=/var/spool/mqueues/.control #O PidFile=/var/run/sendmail.pid #O DefaultAuthInfo=/etc/mail/default-auth-info Mlocal, P=/usr/lib/mail.local, F=lsDFMAw5:/|@qPSXfmnz9, S=EnvFromSMTP/HdrFromL, Mprog, P=/bin/sh, F=lsDFMoqeu9, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, D=$z:/, ...

Get sendmail, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.