Next | Prev | Up | Top | Contents | Index
sendmail Related Files and Directories
The sendmail configuration files and directories are
- /etc/sendmail.cf
- /etc/sendmail.fc
- /etc/sendmail.hf
- /etc/sendmail.st
- /etc/aliases
- /var/spool/mqueue
- /var/mail
/etc/sendmail.cf
At the heart of the sendmail program is the sendmail configuration file /etc/sendmail.cf. The sendmail.cf file is an ASCII file that contains most of the configuration information and is read at run time. This file encodes options, header declarations, mailer declarations, trusted user declarations, message precedences, address-rewriting rules, macro definitions, and class definitions.
As the mail administrator and in order for you to successfully set up sendmail, you must know which sendmail.cf macros and variables to change. The sendmail.cf file takes advantage of sendmail's ability to read macro and class definitions from pipes, thereby simplifying and automating the sendmail configuration process. This file takes command line input from the sendmail.params file and /usr/etc/configmail script and incorporates the input into the appropriate macros and classes.
/etc/sendmail.fc
The sendmail.fc file is a frozen configuration file. A frozen configuration file is an image of the data space that belongs to sendmail when the configuration file is read. The sendmail.fc file is not present by default. You can create the sendmail.fc file using the touch command. After the sendmail.fc file is created, it is used in place of /etc/sendmail.cf. This process improves start-up speed.
Note: All modifications to sendmail macros and classes should be made to sendmail.cf.
However, if the /etc/sendmail.fc file exists, changes to it are not honored until you rebuild /etc/sendmail.fc. The mail script /etc/init.d/mail automatically rebuilds the frozen configuration file if the sendmail.cf file exists. Always use the mail script because it automatically rebuilds the sendmail.fc file. If you need to rebuild the frozen configuration file manually, the command is
/usr/lib/sendmail -bz
/etc/sendmail.hf
The sendmail.hf file is the Simple Mail Transfer Protocol (SMTP) help file. It contains some brief information about the various SMTP commands.
/etc/sendmail.st
The sendmail.st file is used to collect statistics related to sendmail. By default, the file is not present. You can create the file using the touch command. If the file is present, sendmail automatically updates the file with relevant sendmail statistics.
/etc/aliases
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 station to johndoe@company.com:
jd:johndoe@company.com
When sendmail starts up, it automatically processes the aliases file into the files /etc/aliases.dir and /etc/aliases.pag. The aliases.dir and aliases.pag are DBM versions of the aliases database. The DBM format improves sendmail performance.
Note: The newaliases program must be run after modifying the alias database file. See "Building the Aliases Database" for more information about building the alias database.
/var/spool/mqueue
The mail queue, /var/spool/mqueue, is the directory in which 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:
- qf*--control (queue) files for messages
- df*--data files
- tf*--temporary files
- nf*--a file used when a unique ID is created
- xf*--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.
/var/mail
/var/mail is the directory that houses all incoming mail. Each user on a local station receives his or her mail in a file in the directory /var/mail. For example, the user guest receives mail in the file /var/mail/guest.
Next | Prev | Up | Top | Contents | Index