Cacheeverything, cachesuccesses, cachefailures, nocache Channel Options

Channel connection information caching
Channels using the SMTP and LMTP protocols maintain a per-process cache containing a history of prior connection attempts. This cache is used to avoid reconnecting multiple times to inaccessible hosts, which can waste lots of time and delay other messages. The cache only lasts for the duration of the delivery process; subsequent processes start with an empty cache.

(In this context, "connection failure" includes both connection transaction log file  "Y" entries -- where the MTA&#x27;s client couldn&#x27;t even make a connection -- and at least some "X" entries, such as connecting but immediately seeing a 5xx or 4xx error instead of an SMTP banner.)

Such a process cache normally records both connection successes and failures. (Successful connection attempts are recorded in order to offset subsequent failures --- a host that succeeded before but fails now doesn&#x27;t warrant as long of a delay before making another connection attempt as does one that has never been tried or one that has failed previously.)

However, the caching strategy used by the MTA is not necessarily appropriate for all situations. For example, a channel that is used to connect to a single flakey host does not benefit from caching. Or in the case of connection attempts to an internal LMTP "back end", it may be desirable to continue to try to connect regardless of previous connection failures. Therefore channel options are provided to adjust the MTA&#x27;s SMTP and LMTP client process caches.

The  channel option enables all forms of caching and is the default. disables all caching. enables caching of connection failures but not successes --- this forces a somewhat more draconian retry than  does. Finally,  caches only successes. This last option is effectively equivalent to  for SMTP and LMTP channels.

In the MTA message transaction log file, "Q" entries with the notation: Too many failures to this host during this run; skipping this host: error-text are cases where a process cache had come into play.

See also:
 * TCPIP channels
 * TCPIP connections and DNS lookups channel options
 * Channel options
 * MTA transaction logging