home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Previous Section Next Section

PidFile

Location of the sendmail pid file V8.10 and later

Prior to V8.10 sendmail, the location and name of the sendmail.pid file (Section 1.7.1.2) was hardcoded. But having only one file could lead to problems at sites that ran multiple daemons (possibly bound to different interfaces) because that file could contain the information about only one daemon.

Beginning with V8.10, sendmail allows you to set both the location and name of the sendmail.pid file with an option. This allows each daemon to have its own private file, thus eliminating the former contention for a single file.

The location and name of the sendmail.pid file is set with the PidFile option:

O PidFile=path               configuration file (V8.10 and later) 
-OPidFile=path               command line (V8.10 and later) 
define(`confPID_FILE',`path')    mc configuration (V8.10 and later) 

The path is the full pathname of the file. If path is missing, the pathname becomes that of an empty string. If the entire option is missing, the default varies depending on the operating system (see conf.h). The default with the mc configuration technique is to not define this option.

If the file specified cannot be written—because it is not safe, it is in a directory that does not exist, or it is an empty string—sendmail will log the following error and skip writing to the file:

unable to write path

Note that the path can contain macros as part of its declaration. The values in the macros will become part of the path just before the file is created and written.[46] One convenient declaration, for example, might look like this:

[46] Note that the pid file is written after the -d0.10 output, so, prior to V8.12.7, the macro will not be displayed as expanded in that output.

define(`confPID_FILE',`/etc/mail/sendmail.pid.${daemon_name}')

Here, the path will have a suffix that is the name you give to the daemon with the ${daemon_name} macro (${daemon_name}).

The PidFile option is not safe. If specified from the command line, it can cause sendmail to relinquish its special privileges.

    Previous Section Next Section