SCACHE(8)

πŸ“¦
version 3.11.7 Β· 2 versions
  • 3.11.7 Β· alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 11.0 Β· nixpkgs unstable
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 the scache(8) connection cache server allows.
  • connection_cache_status_update_time (600s) β€” How frequently the scache(8) server logs usage statistics with connection cache hit and miss rates for logical destinations and for physical endpoints.

🧁 MISCELLANEOUS CONTROLS 🧁

  • config_directory (see postconf -d output) β€” The default location of the Postfix main.cf and master.cf configuration 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 (see postconf -d output) β€” 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) β€” The master.cf service name of a Postfix daemon process.

πŸ‘€ SEE ALSO πŸ‘€


πŸ“š 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