Name

PidFile

Synopsis

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.[47] One convenient declaration, for ...

Get Sendmail, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.