---
name: "tlsmgr"
section: "8postfix"
platform: "linux"
package: "postfix"
version: "3.7.11-0+deb12u1"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/tlsmgr/8postfix"
---

# tlsmgr(8postfix)

Postfix TLS session cache and PRNG manager

## NAME

tlsmgr - Postfix TLS session cache and PRNG manager

## SYNOPSIS

```
tlsmgr [generic Postfix daemon options]
```

## DESCRIPTION

The [**tlsmgr**(8)](/tlsmgr/8.md) manages the Postfix TLS session caches. It stores and retrieves cache entries on request by [**smtpd**(8)](/smtpd/8.md) and [**smtp**(8)](/smtp/8.md) processes, and periodically removes entries that have expired.

The [**tlsmgr**(8)](/tlsmgr/8.md) also manages the PRNG (pseudo random number generator) pool. It answers queries by the [**smtpd**(8)](/smtpd/8.md) and [**smtp**(8)](/smtp/8.md) processes to seed their internal PRNG pools.

The [**tlsmgr**(8)](/tlsmgr/8.md)'s PRNG pool is initially seeded from an external source (EGD, /dev/urandom, or regular file). It is updated at configurable pseudo-random intervals with data from the external source. It is updated periodically with data from TLS session cache entries and with the time of day, and is updated with the time of day whenever a process requests [**tlsmgr**(8)](/tlsmgr/8.md) service.

The [**tlsmgr**(8)](/tlsmgr/8.md) saves the PRNG state to an exchange file periodically and when the process terminates, and reads the exchange file when initializing its PRNG.

## SECURITY

```

```

The [**tlsmgr**(8)](/tlsmgr/8.md) is not security-sensitive. The code that maintains the external and internal PRNG pools does not "trust" the data that it manipulates, and the code that maintains the TLS session cache does not touch the contents of the cached entries, except for seeding its internal PRNG pool.

The [**tlsmgr**(8)](/tlsmgr/8.md) can be run chrooted and with reduced privileges. At process startup it connects to the entropy source and exchange file, and creates or truncates the optional TLS session cache files.

With Postfix version 2.5 and later, the [**tlsmgr**(8)](/tlsmgr/8.md) no longer uses root privileges when opening cache files. These files should now be stored under the Postfix-owned **data\_directory**.  As a migration aid, an attempt to open a cache file under a non-Postfix directory is redirected to the Postfix-owned **data\_directory**, and a warning is logged.

## DIAGNOSTICS

Problems and transactions are logged to [**syslogd**(8)](/syslogd/8.md) or [**postlogd**(8)](/postlogd/8.md).

## BUGS

There is no automatic means to limit the number of entries in the TLS session caches and/or the size of the TLS cache files.

## CONFIGURATION PARAMETERS

```

```

Changes to **main.cf** are not picked up automatically, because [**tlsmgr**(8)](/tlsmgr/8.md) is a persistent processes.  Use the command "**postfix reload**" after a configuration change.

The text below provides only a parameter summary. See [**postconf**(5)](/postconf/5.md) for more details including examples.

## TLS SESSION CACHE

```

```

- **lmtp\_tls\_loglevel (0)**

  The LMTP-specific version of the smtp\_tls\_loglevel configuration parameter.

- **lmtp\_tls\_session\_cache\_database (empty)**

  The LMTP-specific version of the smtp\_tls\_session\_cache\_database configuration parameter.

- **lmtp\_tls\_session\_cache\_timeout (3600s)**

  The LMTP-specific version of the smtp\_tls\_session\_cache\_timeout configuration parameter.

- **smtp\_tls\_loglevel (0)**

  Enable additional Postfix SMTP client logging of TLS activity.

- **smtp\_tls\_session\_cache\_database (empty)**

  Name of the file containing the optional Postfix SMTP client TLS session cache.

- **smtp\_tls\_session\_cache\_timeout (3600s)**

  The expiration time of Postfix SMTP client TLS session cache information.

- **smtpd\_tls\_loglevel (0)**

  Enable additional Postfix SMTP server logging of TLS activity.

- **smtpd\_tls\_session\_cache\_database (empty)**

  Name of the file containing the optional Postfix SMTP server TLS session cache.

- **smtpd\_tls\_session\_cache\_timeout (3600s)**

  The expiration time of Postfix SMTP server TLS session cache information.

## PSEUDO RANDOM NUMBER GENERATOR

```

```

- **tls\_random\_source (see 'postconf -d' output)**

  The external entropy source for the in-memory [**tlsmgr**(8)](/tlsmgr/8.md) pseudo random number generator (PRNG) pool.

- **tls\_random\_bytes (32)**

  The number of bytes that [**tlsmgr**(8)](/tlsmgr/8.md) reads from $tls\_random\_source when (re)seeding the in-memory pseudo random number generator (PRNG) pool.

- **tls\_random\_exchange\_name (see 'postconf -d' output)**

  Name of the pseudo random number generator (PRNG) state file that is maintained by [**tlsmgr**(8)](/tlsmgr/8.md).

- **tls\_random\_prng\_update\_period (3600s)**

  The time between attempts by [**tlsmgr**(8)](/tlsmgr/8.md) to save the state of the pseudo random number generator (PRNG) to the file specified with $tls\_random\_exchange\_name.

- **tls\_random\_reseed\_period (3600s)**

  The maximal time between attempts by [**tlsmgr**(8)](/tlsmgr/8.md) to re-seed the in-memory pseudo random number generator (PRNG) pool from external sources.

## MISCELLANEOUS CONTROLS

```

```

- **config\_directory (see 'postconf -d' output)**

  The default location of the Postfix main.cf and master.cf configuration files.

- **data\_directory (see 'postconf -d' output)**

  The directory with Postfix-writable data files (for example: caches, pseudo-random numbers).

- **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.

- **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

```
smtp(8), Postfix SMTP client
smtpd(8), Postfix SMTP server
postconf(5), configuration parameters
master(5), generic daemon options
master(8), process manager
postlogd(8), Postfix logging
syslogd(8), system logging
```

## README FILES

```

```

Use "**postconf readme\_directory**" or "**postconf html\_directory**" to locate this information.

```
TLS_README, Postfix TLS configuration and operation
```

## LICENSE

```

```

The Secure Mailer license must be distributed with this software.

## HISTORY

This service was introduced with Postfix version 2.2.

## AUTHOR(S)

```
Lutz Jaenicke
BTU Cottbus
Allgemeine Elektrotechnik
Universitaetsplatz 3-4
D-03044 Cottbus, Germany
Adapted by:
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
```
