HostStatusDirectory

HostStatusDirectory

Location of persistent host status V8.8 and later

The process of delivering network mail requires that sendmail fork (2) so that the child process can handle the queue. Then, if the ForkEachJob option (ForkEachJob) is true, each job in the queue has to fork (2) again so that each child of a child can perform each task. Internally, sendmail maintains tables of status information about network hosts (such as whether the host is up or down, or refusing connections). A problem can arise when multiple queue-processing children are running. Because they are separate processes, their separate children lack access to the common pool of host information that is stored internally by each parent. [34]

[34] Also, status information from previous queue runs is lost.

One solution is to store host status information externally so that all children can access it. Inspired by KJS sendmail , V8.8 has introduced the HostStatusDirectory option. This option both tells sendmail that it should save host status information externally, and defines where that information will be stored on disk.

The form for the HostStatusDirectory option looks like this:

 O HostStatusDirectory=  path    configuration file (V8.8 and later)  -OHostStatusDirectory=  path    command line (V8.8 and later)  define(`confHOST_STATUS_DIRECTORY', `  path')    mc configuration (V8.8 and later)  

Here, path is of type string and, if present, specifies the base directory under which host status will be stored. This can be a full or relative path specification. If it is a relative path, it is interpreted as relative to the queue directory. If path is omitted or if the entire option is omitted, the default is that no persistent host information will be saved. If path does not exist or if it exists and is not a directory, sendmail will then print the following error and will store no persistent host information:

 Cannot use HostStatusDirectory =  path  :  reason here  

Note that the status information in this directory can be printed with the hoststat (1) command (Section 15.1.1). Also note that the HostStatusDirectory option will not work if the ConnectionCacheSize option (ConnectionCacheSize) is set to zero:

 Warning: HostStatusDirectory disabled with ConnectionCacheSize = 0 

Note that on machines that send out a great deal of mail, you should probably compare performance with and without this option enabled and base your decision to use it on the result. Also note that this option is required if you wish to also use the SingleThreadDelivery option (SingleThreadDelivery).

Avoid using a directory that is on a tmpfs filesystem (prior to Sun Solaris 2.5) because file locking is not supported. Avoid using a directory that is on an NFS filesystem because record locking is unreliable, single-threaded, and can add extra RPC traffic.

The HostStatusDirectory option is not safe. If it is specified from the command line, it can cause sendmail to give up any special privileges.



Sendmail
sendmail, 4th Edition
ISBN: 0596510292
EAN: 2147483647
Year: 2002
Pages: 1174

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net