'ConnectionCacheSize'' ''''


SMTP connection cache size V8.1 and later

Without a connection cache, sendmail uses a single autonomous SMTP session to transmit one email message to another host. It connects to the other host, transmits the message, and closes the connection. Although this approach is sufficient for most mail, there are times when sending multiple messages during a single connection is preferable. This is called caching connections.

When sendmail caches a connection, it connects to the host and transmits the mail message as usual. But instead of closing the connection, it keeps the connection open so that it can transmit additional mail messages without the additional overhead of opening and closing the connection each time. The ConnectionCacheSize option of V8 sendmail specifies that open connections to other hosts should be maintained, and it specifies the maximum number of those connections. The forms of the ConnectionCacheSize option are as follows:

O ConnectionCacheSize=num        configuration file (V8.7 and later) 
-OConnectionCacheSize=num        command line (V8.7 and later) 
define(`confMCI_CACHE_SIZE',num) mc configuration (V8.7 and later) 
Oknum                            configuration file (V8.6 and later) 
-oknum                           command line (V8.6 and later) 

Optional whitespace can precede the num. The num is an integer that specifies the maximum number of simultaneous connections to keep open. If num is zero, this caching feature is turned off. A value of 1 is good for workstations that forward all mail to a central mail server and is the default that is used if this option is entirely missing. When configuring with the mc technique, the default is 2. A value of 4 is the maximum for most machines that forward mail directly over the Internet. Higher values might require that you increase the number of open files allowed per process at the system level.

Caching is of greatest benefit in processing the queue. V8 sendmail automatically adapts to conditions to avoid caching connections for each invocation of sendmail. Maintenance of an open connection can delay return to the user's program, for example, and too many open connections to a common target host can create a high load on that host.

When caching is enabled with this ConnectionCacheSize option, the ConnectionCacheTimeout option should also be declared to set the connection timeout. The ConnectionCacheSize option is not safe. If specified from the command line, it can cause sendmail to relinquish its special privileges.

    Part I: Build and Install
    Part II: Administration
    Part III: The Configuration File
    Chapter 21. The D (Define a Macro) Configuration Command
    Chapter 24. The O (Options) Configuration Command