SCACHE(8postfix)
π SCACHE π (that's scache(8postfix) bestie, the Postfix shared connection cache server)
β¨ NAME β¨
okay so. scache β it's the Postfix shared connection cache server. that's the whole vibe. π
πΈ SYNOPSIS πΈ
scache [generic Postfix daemon options]
π¦ DESCRIPTION π¦
The scache(8) server keeps a shared multi-connection cache alive for you. who's using it? literally the Postfix SMTP clients, other Postfix delivery agents, whoever needs it. it's giving shared economy but for sockets. π
so the connection cache is organized into three lil tiers:
- logical destination names
- physical endpoint names
- connections
like a specific example, because examples slay: logical SMTP destinations specify (transport, domain, port), and physical SMTP endpoints specify (transport, IP address, port). and an SMTP connection can be saved after a successful mail transaction. yes queen, save it for later. π
in the general case (the messy real world, no cap):
- one logical destination may refer to zero or more physical endpoints
- one physical endpoint may be referenced by zero or more logical destinations
- one endpoint may refer to zero or more connections
it's giving many-to-many and honestly? iconic. π
the exact syntax of a logical destination or endpoint name is application dependent β the scache(8) server does not care. not one bit. it's unbothered. π
a connection is stored as a file descriptor together with application-dependent information that is needed to re-activate a connection object. and again β the scache(8) server is completely unaware of the details of that information. it just holds it. bestie is a vault, not a gossip. π
all information is stored with a finite time to live (ttl). the connection cache daemon terminates when no client is connected for max_idle time units. so if nobody's talking to it, it simply leaves. main character exit. πβ¨
π the requests it implements (the whole menu, fr fr)
save_endp ttl endpoint endpoint_properties file_descriptorβ Save the specified file descriptor and connection property data under the specified endpoint name. The endpoint properties are used by the client to re-activate a passivated connection object.find_endp endpointβ Look up cached properties and a cached file descriptor for the specified endpoint.save_dest ttl destination destination_properties endpointβ Save the binding between a logical destination and an endpoint under the destination name, together with destination specific connection properties. The destination properties are used by the client to re-activate a passivated connection object.find_dest destinationβ Look up cached destination properties, cached endpoint properties, and a cached file descriptor for the specified logical destination.
π SECURITY π
The scache(8) server is not security-sensitive. it does not talk to the network, and it does not talk to local users. it's an introvert, respectfully. π
it can run chrooted at fixed low privilege. slay.
but listen β the scache(8) server is not a trusted process. It must not be used to store information that is security sensitive. do not put your secrets in here. this is not the diary. π«
π©Ί DIAGNOSTICS π©Ί
Problems and transactions are logged to syslogd(8) or postlogd(8). so if something's weird, that's where the receipts live. π§Ύ
π BUGS π
- The session cache cannot be shared among multiple machines. it's a one-machine situation. monogamous cache.
- When a connection expires from the cache, it is closed without the appropriate protocol specific handshake. yeah. it just... leaves. no goodbye text, no nothing. π
βοΈ CONFIGURATION PARAMETERS βοΈ
Changes to main.cf are picked up automatically as scache(8) processes run for only a limited amount of time. (they're short-lived girlies, they come and go. π¦)
want the change to hit faster? use the command:
postfix reload
The text below provides only a parameter summary. See postconf(5) for more details including examples.
π RESOURCE CONTROLS π
connection_cache_ttl_limit(2s) β The maximal time-to-live value that thescache(8)connection cache server allows.connection_cache_status_update_time(600s) β How frequently thescache(8)server logs usage statistics with connection cache hit and miss rates for logical destinations and for physical endpoints.
π MISCELLANEOUS CONTROLS π
config_directory(seepostconf -doutput) β The default location of the Postfixmain.cfandmaster.cfconfiguration files.daemon_timeout(18000s) β How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer.ipc_timeout(3600s) β The time limit for sending or receiving information over an internal communication channel.max_idle(100s) β The maximum amount of time that an idle Postfix daemon process waits for an incoming connection before terminating voluntarily.process_id(read-only) β The process ID of a Postfix command or daemon process.process_name(read-only) β The process name of a Postfix command or daemon process.syslog_facility(mail) β The syslog facility of Postfix logging.syslog_name(seepostconf -doutput) β A prefix that is prepended to the process name in syslog records, so that, for example,"smtpd"becomes"prefix/smtpd".
π«Ά Available in Postfix 3.3 and later:
service_name(read-only) β Themaster.cfservice name of a Postfix daemon process.
π SEE ALSO π
smtp(8), SMTP clientpostconf(5), configuration parametersmaster(8), process managerpostlogd(8), Postfix loggingsyslogd(8), system logging
π README FILES π
Use "postconf readme_directory" or "postconf html_directory" to locate this information.
CONNECTION_CACHE_README, Postfix connection cache
π LICENSE π
The Secure Mailer license must be distributed with this software. periodt.
π°οΈ HISTORY π°οΈ
This service was introduced with Postfix version 2.2. a true veteran. an elder. we respect her. π
π AUTHOR(S) π
Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown Heights, NY 10598, USA
Wietse Venema Google, Inc. 111 8th Avenue New York, NY 10011, USA
okay that's the whole page bestie, and if you ever need to cite it in the group chat it's filed under SCACHE(8postfix) β go off, you're now fluent in connection caching πβ¨ππ¦π
π¦ where this page comes from
- debian bookworm: postfix 3.7.11-0+deb12u1
- ubuntu jammy: postfix 3.6.4-1ubuntu1
- ubuntu jammy: postfix 3.6.4-1ubuntu1.4
- ubuntu noble: postfix 3.8.6-1build2
- ubuntu noble: postfix 3.8.6-1ubuntu0.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms