# phpman > man > tlsproxy(8)

[TLSPROXY(8postfix)](https://www.chedong.com/phpMan.php/man/TLSPROXY/8postfix/markdown)                                                                [TLSPROXY(8postfix)](https://www.chedong.com/phpMan.php/man/TLSPROXY/8postfix/markdown)



## NAME
       tlsproxy - Postfix TLS proxy

## SYNOPSIS
       **tlsproxy** [generic Postfix daemon options]

## DESCRIPTION
       The [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) server implements a two-way TLS proxy. It is used by the [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) server
       to talk SMTP-over-TLS with remote SMTP clients that are not  allowlisted  (including  clients
       whose  allowlist status has expired), and by the [**smtp**(8)](https://www.chedong.com/phpMan.php/man/smtp/8/markdown) client to support TLS connection re‐
       use, but it should also work for non-SMTP protocols.

       Although one [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) process can serve multiple sessions at the same time, it is  a  good
       idea  to allow the number of processes to increase with load, so that the service remains re‐
       sponsive.

## PROTOCOL EXAMPLE
       The example below concerns [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown). However, the [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) server is agnostic of  the
       application protocol, and the example is easily adapted to other applications.

       After  receiving  a valid remote SMTP client STARTTLS command, the [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) server sends
       the remote SMTP client endpoint string, the requested role (server), and the requested  time‐
       out  to  [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown).   [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown)  then  receives  a  "TLS available" indication from **tl**‐‐
       [**sproxy**(8)](https://www.chedong.com/phpMan.php/man/sproxy/8/markdown).  If the TLS service is available, [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) sends the remote SMTP client  file
       descriptor  to  [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown),  and sends the plaintext 220 greeting to the remote SMTP client.
       This triggers TLS negotiations between the remote SMTP client and [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown).  Upon  comple‐
       tion   of   the   TLS-level  handshake,  [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown)  translates  between  plaintext  from/to
       [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) and ciphertext to/from the remote SMTP client.

## SECURITY
       The [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) server is moderately security-sensitive.  It talks to  untrusted  clients  on
       the network. The process can be run chrooted at fixed low privilege.

## DIAGNOSTICS
       Problems and transactions are logged to [**syslogd**(8)](https://www.chedong.com/phpMan.php/man/syslogd/8/markdown) or [**postlogd**(8)](https://www.chedong.com/phpMan.php/man/postlogd/8/markdown).

## CONFIGURATION PARAMETERS
       Changes  to  **main.cf**  are not picked up automatically, as [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) processes may run for a
       long time depending on mail server load.  Use the command "**postfix**  **reload**"  to  speed  up  a
       change.

       The  text below provides only a parameter summary. See [**postconf**(5)](https://www.chedong.com/phpMan.php/man/postconf/5/markdown) for more details including
       examples.

## STARTTLS GLOBAL CONTROLS
       The following settings are global and therefore cannot be overruled by information  specified
       in a [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) client request.

       **tls**___**append**___**default**___**CA** **(no)**
              Append  the  system-supplied  default Certification Authority certificates to the ones
              specified with *_tls_CApath or *_tls_CAfile.

       **tls**___**daemon**___**random**___**bytes** **(32)**
              The number of pseudo-random bytes that an [**smtp**(8)](https://www.chedong.com/phpMan.php/man/smtp/8/markdown) or [**smtpd**(8)](https://www.chedong.com/phpMan.php/man/smtpd/8/markdown)  process  requests  from
              the  [**tlsmgr**(8)](https://www.chedong.com/phpMan.php/man/tlsmgr/8/markdown)  server  in  order  to seed its internal pseudo random number generator
              (PRNG).

       **tls**___**high**___**cipherlist** **(see** **'postconf** **-d'** **output)**
              The OpenSSL cipherlist for "high" grade ciphers.

       **tls**___**medium**___**cipherlist** **(see** **'postconf** **-d'** **output)**
              The OpenSSL cipherlist for "medium" or higher grade ciphers.

       **tls**___**low**___**cipherlist** **(see** **'postconf** **-d'** **output)**
              The OpenSSL cipherlist for "low" or higher grade ciphers.

       **tls**___**export**___**cipherlist** **(see** **'postconf** **-d'** **output)**
              The OpenSSL cipherlist for "export" or higher grade ciphers.

       **tls**___**null**___**cipherlist** **(eNULL:!aNULL)**
              The OpenSSL cipherlist for "NULL" grade ciphers that  provide  authentication  without
              encryption.

       **tls**___**eecdh**___**strong**___**curve** **(prime256v1)**
              The  elliptic curve used by the Postfix SMTP server for sensibly strong ephemeral ECDH
              key exchange.

       **tls**___**eecdh**___**ultra**___**curve** **(secp384r1)**
              The elliptic curve used by the Postfix SMTP server for maximally strong ephemeral ECDH
              key exchange.

       **tls**___**disable**___**workarounds** **(see** **'postconf** **-d'** **output)**
              List or bit-mask of OpenSSL bug work-arounds to disable.

       **tls**___**preempt**___**cipherlist** **(no)**
              With SSLv3 and later, use the Postfix SMTP server's cipher preference order instead of
              the remote client's cipher preference order.

       Available in Postfix version 2.9 and later:

       **tls**___**legacy**___**public**___**key**___**fingerprints** **(no)**
              A temporary migration aid for sites that use certificate _public-key_ fingerprints  with
              Postfix 2.9.0..2.9.5, which use an incorrect algorithm.

       Available in Postfix version 2.11-3.1:

       **tls**___**dane**___**digest**___**agility** **(on)**
              Configure RFC7671 DANE TLSA digest algorithm agility.

       **tls**___**dane**___**trust**___**anchor**___**digest**___**enable** **(yes)**
              Enable  support for RFC 6698 (DANE TLSA) DNS records that contain digests of trust-an‐
              chors with certificate usage "2".

       Available in Postfix version 2.11 and later:

       **tlsmgr**___**service**___**name** **(tlsmgr)**
              The name of the [**tlsmgr**(8)](https://www.chedong.com/phpMan.php/man/tlsmgr/8/markdown) service entry in master.cf.

       Available in Postfix version 3.0 and later:

       **tls**___**session**___**ticket**___**cipher** **(Postfix** **>=** **3.0:** **aes-256-cbc,** **Postfix** **<** **3.0:** **aes-128-cbc)**
              Algorithm used to encrypt RFC5077 TLS session tickets.

       **openssl**___**path** **(openssl)**
              The location of the OpenSSL command line program [**openssl**(1)](https://www.chedong.com/phpMan.php/man/openssl/1/markdown).

       Available in Postfix version 3.2 and later:

       **tls**___**eecdh**___**auto**___**curves** **(see** **'postconf** **-d'** **output)**
              The prioritized list of elliptic curves supported  by  the  Postfix  SMTP  client  and
              server.

       Available in Postfix version 3.4 and later:

       **tls**___**server**___**sni**___**maps** **(empty)**
              Optional  lookup  tables  that map names received from remote SMTP clients via the TLS
              Server Name Indication (SNI) extension to the appropriate keys and certificate chains.

       Available in Postfix 3.5, 3.4.6, 3.3.5, 3.2.10, 3.1.13 and later:

       **tls**___**fast**___**shutdown**___**enable** **(yes)**
              A workaround for implementations that hang Postfix while shutting down a TLS  session,
              until Postfix times out.

## STARTTLS SERVER CONTROLS
       These  settings  are  clones of Postfix SMTP server settings.  They allow [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) to load
       the same certificate and private key information as the Postfix SMTP server, before  dropping
       privileges,  so  that  the  key files can be kept read-only for root. These settings can cur‐
       rently not be overruled by information in a [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) client request, but  that  limitation
       may be removed in a future version.

       **tlsproxy**___**tls**___**CAfile** **($smtpd**___**tls**___**CAfile)**
              A  file containing (PEM format) CA certificates of root CAs trusted to sign either re‐
              mote SMTP client certificates or intermediate CA certificates.

       **tlsproxy**___**tls**___**CApath** **($smtpd**___**tls**___**CApath)**
              A directory containing (PEM format) CA certificates of root CAs trusted to sign either
              remote SMTP client certificates or intermediate CA certificates.

       **tlsproxy**___**tls**___**always**___**issue**___**session**___**ids** **($smtpd**___**tls**___**always**___**issue**___**session**___**ids)**
              Force  the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) server to issue a TLS session id, even when TLS session
              caching is turned off.

       **tlsproxy**___**tls**___**ask**___**ccert** **($smtpd**___**tls**___**ask**___**ccert)**
              Ask a remote SMTP client for a client certificate.

       **tlsproxy**___**tls**___**ccert**___**verifydepth** **($smtpd**___**tls**___**ccert**___**verifydepth)**
              The verification depth for remote SMTP client certificates.

       **tlsproxy**___**tls**___**cert**___**file** **($smtpd**___**tls**___**cert**___**file)**
              File with the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) server RSA certificate in PEM format.

       **tlsproxy**___**tls**___**ciphers** **($smtpd**___**tls**___**ciphers)**
              The minimum TLS cipher grade that the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) server will use with  oppor‐
              tunistic TLS encryption.

       **tlsproxy**___**tls**___**dcert**___**file** **($smtpd**___**tls**___**dcert**___**file)**
              File with the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) server DSA certificate in PEM format.

       **tlsproxy**___**tls**___**dh1024**___**param**___**file** **($smtpd**___**tls**___**dh1024**___**param**___**file)**
              File with DH parameters that the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) server should use with non-export
              EDH ciphers.

       **tlsproxy**___**tls**___**dh512**___**param**___**file** **($smtpd**___**tls**___**dh512**___**param**___**file)**
              File with DH parameters that the  Postfix  [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown)  server  should  use  with  ex‐
              port-grade EDH ciphers.

       **tlsproxy**___**tls**___**dkey**___**file** **($smtpd**___**tls**___**dkey**___**file)**
              File with the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) server DSA private key in PEM format.

       **tlsproxy**___**tls**___**eccert**___**file** **($smtpd**___**tls**___**eccert**___**file)**
              File with the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) server ECDSA certificate in PEM format.

       **tlsproxy**___**tls**___**eckey**___**file** **($smtpd**___**tls**___**eckey**___**file)**
              File with the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) server ECDSA private key in PEM format.

       **tlsproxy**___**tls**___**eecdh**___**grade** **($smtpd**___**tls**___**eecdh**___**grade)**
              The   Postfix   [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown)   server   security  grade  for  ephemeral  elliptic-curve
              Diffie-Hellman (EECDH) key exchange.

       **tlsproxy**___**tls**___**exclude**___**ciphers** **($smtpd**___**tls**___**exclude**___**ciphers)**
              List of ciphers or cipher types to exclude from the [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) server cipher list  at
              all TLS security levels.

       **tlsproxy**___**tls**___**fingerprint**___**digest** **($smtpd**___**tls**___**fingerprint**___**digest)**
              The message digest algorithm to construct remote SMTP client-certificate fingerprints.

       **tlsproxy**___**tls**___**key**___**file** **($smtpd**___**tls**___**key**___**file)**
              File with the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) server RSA private key in PEM format.

       **tlsproxy**___**tls**___**loglevel** **($smtpd**___**tls**___**loglevel)**
              Enable additional Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) server logging of TLS activity.

       **tlsproxy**___**tls**___**mandatory**___**ciphers** **($smtpd**___**tls**___**mandatory**___**ciphers)**
              The  minimum TLS cipher grade that the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) server will use with manda‐
              tory TLS encryption.

       **tlsproxy**___**tls**___**mandatory**___**exclude**___**ciphers** **($smtpd**___**tls**___**mandatory**___**exclude**___**ciphers)**
              Additional list of ciphers or cipher types to exclude from the [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) server  ci‐
              pher list at mandatory TLS security levels.

       **tlsproxy**___**tls**___**mandatory**___**protocols** **($smtpd**___**tls**___**mandatory**___**protocols)**
              The  SSL/TLS  protocols  accepted by the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) server with mandatory TLS
              encryption.

       **tlsproxy**___**tls**___**protocols** **($smtpd**___**tls**___**protocols)**
              List of TLS protocols that the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) server will exclude or include with
              opportunistic TLS encryption.

       **tlsproxy**___**tls**___**req**___**ccert** **($smtpd**___**tls**___**req**___**ccert)**
              With mandatory TLS encryption, require a trusted remote SMTP client certificate in or‐
              der to allow TLS connections to proceed.

       **tlsproxy**___**tls**___**security**___**level** **($smtpd**___**tls**___**security**___**level)**
              The SMTP TLS security level for the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) server; when a non-empty value
              is  specified,  this  overrides  the  obsolete  parameters smtpd_use_tls and smtpd_en‐
              force_tls.

       **tlsproxy**___**tls**___**chain**___**files** **($smtpd**___**tls**___**chain**___**files)**
              Files with the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) server keys and certificate chains in PEM format.

## STARTTLS CLIENT CONTROLS
       These settings are clones of Postfix SMTP client settings.  They allow  [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown)  to  load
       the  same certificate and private key information as the Postfix SMTP client, before dropping
       privileges, so that the key files can be kept read-only for root. Some settings may be  over‐
       ruled by information in a [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) client request.

       Available in Postfix version 3.4 and later:

       **tlsproxy**___**client**___**CAfile** **($smtp**___**tls**___**CAfile)**
              A file containing CA certificates of root CAs trusted to sign either remote TLS server
              certificates or intermediate CA certificates.

       **tlsproxy**___**client**___**CApath** **($smtp**___**tls**___**CApath)**
              Directory with PEM format Certification Authority certificates that  the  Postfix  **tl**‐‐
              [**sproxy**(8)](https://www.chedong.com/phpMan.php/man/sproxy/8/markdown) client uses to verify a remote TLS server certificate.

       **tlsproxy**___**client**___**chain**___**files** **($smtp**___**tls**___**chain**___**files)**
              Files with the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) client keys and certificate chains in PEM format.

       **tlsproxy**___**client**___**cert**___**file** **($smtp**___**tls**___**cert**___**file)**
              File with the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) client RSA certificate in PEM format.

       **tlsproxy**___**client**___**key**___**file** **($smtp**___**tls**___**key**___**file)**
              File with the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) client RSA private key in PEM format.

       **tlsproxy**___**client**___**dcert**___**file** **($smtp**___**tls**___**dcert**___**file)**
              File with the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) client DSA certificate in PEM format.

       **tlsproxy**___**client**___**dkey**___**file** **($smtp**___**tls**___**dkey**___**file)**
              File with the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) client DSA private key in PEM format.

       **tlsproxy**___**client**___**eccert**___**file** **($smtp**___**tls**___**eccert**___**file)**
              File with the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) client ECDSA certificate in PEM format.

       **tlsproxy**___**client**___**eckey**___**file** **($smtp**___**tls**___**eckey**___**file)**
              File with the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) client ECDSA private key in PEM format.

       **tlsproxy**___**client**___**fingerprint**___**digest** **($smtp**___**tls**___**fingerprint**___**digest)**
              The  message  digest algorithm used to construct remote TLS server certificate finger‐
              prints.

       **tlsproxy**___**client**___**loglevel** **($smtp**___**tls**___**loglevel)**
              Enable additional Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) client logging of TLS activity.

       **tlsproxy**___**client**___**loglevel**___**parameter** **(smtp**___**tls**___**loglevel)**
              The name of the parameter that provides the tlsproxy_client_loglevel value.

       **tlsproxy**___**client**___**scert**___**verifydepth** **($smtp**___**tls**___**scert**___**verifydepth)**
              The verification depth for remote TLS server certificates.

       **tlsproxy**___**client**___**security**___**level** **($smtp**___**tls**___**security**___**level)**
              The default TLS security level for the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) client.

       **tlsproxy**___**client**___**policy**___**maps** **($smtp**___**tls**___**policy**___**maps)**
              Optional lookup tables with the Postfix [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown)  client  TLS  security  policy  by
              next-hop destination.

       **tlsproxy**___**client**___**use**___**tls** **($smtp**___**use**___**tls)**
              Opportunistic mode: use TLS when a remote server announces TLS support.

       **tlsproxy**___**client**___**enforce**___**tls** **($smtp**___**enforce**___**tls)**
              Enforcement mode: require that SMTP servers use TLS encryption.

       **tlsproxy**___**client**___**per**___**site** **($smtp**___**tls**___**per**___**site)**
              Optional  lookup  tables  with  the  Postfix  [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown)  client  TLS usage policy by
              next-hop destination and by remote TLS server hostname.

## OBSOLETE STARTTLS SUPPORT CONTROLS
       These parameters are supported for compatibility with [**smtpd**(8)](https://www.chedong.com/phpMan.php/man/smtpd/8/markdown) legacy parameters.

       **tlsproxy**___**use**___**tls** **($smtpd**___**use**___**tls)**
              Opportunistic TLS: announce STARTTLS support to remote SMTP clients, but  do  not  re‐
              quire that clients use TLS encryption.

       **tlsproxy**___**enforce**___**tls** **($smtpd**___**enforce**___**tls)**
              Mandatory  TLS:  announce  STARTTLS  support  to remote SMTP clients, and require that
              clients use TLS encryption.

## RESOURCE CONTROLS
       **tlsproxy**___**watchdog**___**timeout** **(10s)**
              How much time a [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) process may take to process local or remote I/O before  it
              is terminated by a built-in watchdog timer.

## MISCELLANEOUS CONTROLS
       **config**___**directory** **(see** **'postconf** **-d'** **output)**
              The default location of the Postfix main.cf and master.cf configuration files.

       **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 exam‐
              ple, "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
       [postscreen(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown), Postfix zombie blocker
       [smtpd(8)](https://www.chedong.com/phpMan.php/man/smtpd/8/markdown), Postfix SMTP server
       [postconf(5)](https://www.chedong.com/phpMan.php/man/postconf/5/markdown), configuration parameters
       [postlogd(8)](https://www.chedong.com/phpMan.php/man/postlogd/8/markdown), Postfix logging
       [syslogd(8)](https://www.chedong.com/phpMan.php/man/syslogd/8/markdown), system logging

## LICENSE
       The Secure Mailer license must be distributed with this software.

## HISTORY
       This service was introduced with Postfix version 2.8.

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



                                                                                  [TLSPROXY(8postfix)](https://www.chedong.com/phpMan.php/man/TLSPROXY/8postfix/markdown)
