SCACHE(8)
π SCACHE(8) β the shared connection cache server, bestie edition π
okay so real talk: this is a page from the System Manager's Manual, and it's all about scache β the Postfix shared connection cache server. She's lowkey the backstage queen of Postfix, holding onto connections so nobody has to build them from scratch every single time. iconic behavior honestly β¨
π¦ NAME π¦
scache β the Postfix shared connection cache server. that's her. that's the whole vibe. π
πΈ SYNOPSIS πΈ
scache [generic Postfix daemon options]
yes bestie, just the generic Postfix daemon options. she keeps it simple. π
β¨ DESCRIPTION β¨
So the scache(8) server maintains a shared multi-connection cache. Who uses it? literally anyone who wants it β for example, Postfix SMTP clients, or other Postfix delivery agents. it's giving community resource, and we love that for us. π«Ά
The connection cache is organized into three (3) layers, and the way that it works is:
- logical destination names
- physical endpoint names
- connections
Concrete example time, because abstract is not the move:
- logical SMTP destinations specify
(transport, domain, port) - physical SMTP endpoints specify
(transport, IP address, port) - and an SMTP connection may be saved after a successful mail transaction. slay. π
In the general case (aka not just SMTP, we're talking general general):
- 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 a whole many-to-many situation and honestly? she handles it.
The exact syntax of a logical destination or endpoint name is application dependent β the scache(8) server does not care. not even a little. π A connection is stored as a file descriptor together with application-dependent information that's needed to re-activate a connection object. And again: the scache(8) server is completely unaware of the details of that information. she's the vault, not the analyst. π
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. she leaves the party when everyone else does. main character exit. πͺβ¨
π the requests she implements
This server implements the following requests:
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.
save it, find it, save it, find it. the cycle continues. π
π SECURITY π
The scache(8) server is not security-sensitive. she does not talk to the network, and she does not talk to local users. she's literally just vibing in her own lane. The scache(8) server can run chrooted at fixed low privilege. π§
BUT. 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 her. she is not that girl for secrets. no cap. π«π
π©Ί DIAGNOSTICS π©Ί
Problems and transactions are logged to syslogd(8) or postlogd(8). so if something's up, that's where the receipts live. π
π BUGS π
Two things, and we're keeping it real:
- The session cache cannot be shared among multiple machines. one machine only, bestie. she's monogamous. π
- When a connection expires from the cache, it is closed without the appropriate protocol specific handshake. it's giving abrupt. that's just how it is. π
βοΈ CONFIGURATION PARAMETERS βοΈ
Changes to main.cf are picked up automatically as scache(8) processes run for only a limited amount of time. Use the command postfix reload to speed up a change. (impatient? valid. run the command.) β‘
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 legend since 2.2, fr fr. π
π 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
and that's the whole page bestie!! π this was pulled straight from the System Manager's Manual, and yeah β she signs off the exact same way she came in, all caps and unbothered: SCACHE(8). go save some connections. ily. π«Άπβ¨
π¦ where this page comes from
- alpine 3.22: postfix-doc 3.10.13-r0 Β· IPL-1.0 EPL-2.0
- alpine 3.23: postfix-doc 3.10.13-r0 Β· IPL-1.0 EPL-2.0
- alpine 3.24: postfix-doc 3.11.7-r0 Β· IPL-1.0 EPL-2.0
- arch rolling: postfix 3.11.7-1 Β· EPL-2.0 OR IPL-1.0 AND BSD-4-Clause-UC
- centos-stream 10: postfix 2:3.8.5-11.el10 Β· (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC
- centos-stream 9: postfix 2:3.5.25-3.el9 Β· (IBM and GPLv2+) or (EPL-2.0 and GPLv2+)
- debian trixie: postfix 3.10.13-0+deb13u1
- fedora 43: postfix 2:3.10.14-1.fc43 Β· (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC
- fedora 43: postfix 2:3.10.3-3.fc43 Β· (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC
- fedora 44: postfix 2:3.10.14-1.fc44 Β· (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC
- fedora 44: postfix 2:3.10.7-2.fc44 Β· (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC
- nixos 26.05: postfix 3.11.7
- nixpkgs unstable: postfix 3.11.7
- opensuse-leap 16.0: postfix 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix-bdb 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix-bdb 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix-bdb 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix-bdb 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- ubuntu questing: postfix 3.10.2-1ubuntu2
- ubuntu questing: postfix 3.10.2-1ubuntu2.1
- ubuntu resolute: postfix 3.10.6-4ubuntu2
- ubuntu resolute: postfix 3.10.6-4ubuntu2.1
- ubuntu resolute: postfix 3.10.6-4ubuntu2.2
- ubuntu stonking: postfix 3.11.7-1ubuntu2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms