1TLSPROXY(8)                 System Manager's Manual                TLSPROXY(8)
2
3
4

NAME

6       tlsproxy - Postfix TLS proxy
7

SYNOPSIS

9       tlsproxy [generic Postfix daemon options]
10

DESCRIPTION

12       The  tlsproxy(8)  server  implements a two-way TLS proxy. It is used by
13       the postscreen(8) server to talk SMTP-over-TLS with remote SMTP clients
14       that  are not allowlisted (including clients whose allowlist status has
15       expired), and by the smtp(8) client to support  TLS  connection  reuse,
16       but it should also work for non-SMTP protocols.
17
18       Although  one  tlsproxy(8)  process  can serve multiple sessions at the
19       same time, it is a good idea to allow the number of  processes  to  in‐
20       crease with load, so that the service remains responsive.
21

PROTOCOL EXAMPLE

23       The  example  below  concerns  postscreen(8).  However, the tlsproxy(8)
24       server is agnostic of the application protocol, and the example is eas‐
25       ily adapted to other applications.
26
27       After  receiving  a  valid  remote  SMTP  client  STARTTLS command, the
28       postscreen(8) server sends the remote SMTP client endpoint string,  the
29       requested  role  (server),  and  the  requested timeout to tlsproxy(8).
30       postscreen(8) then receives  a  "TLS  available"  indication  from  tl‐
31       sproxy(8).   If  the  TLS service is available, postscreen(8) sends the
32       remote SMTP client file descriptor to tlsproxy(8), and sends the plain‐
33       text 220 greeting to the remote SMTP client.  This triggers TLS negoti‐
34       ations between the remote SMTP client and tlsproxy(8).  Upon completion
35       of  the  TLS-level  handshake, tlsproxy(8) translates between plaintext
36       from/to postscreen(8) and ciphertext to/from the remote SMTP client.
37

SECURITY

39       The tlsproxy(8) server is moderately security-sensitive.  It  talks  to
40       untrusted  clients  on  the network. The process can be run chrooted at
41       fixed low privilege.
42

DIAGNOSTICS

44       Problems and transactions are logged to syslogd(8) or postlogd(8).
45

CONFIGURATION PARAMETERS

47       Changes to main.cf are not picked up automatically, as tlsproxy(8) pro‐
48       cesses  may run for a long time depending on mail server load.  Use the
49       command "postfix reload" to speed up a change.
50
51       The text below provides only a parameter summary. See  postconf(5)  for
52       more details including examples.
53

STARTTLS GLOBAL CONTROLS

55       The  following settings are global and therefore cannot be overruled by
56       information specified in a tlsproxy(8) client request.
57
58       tls_append_default_CA (no)
59              Append the system-supplied default Certification Authority  cer‐
60              tificates   to   the   ones   specified   with  *_tls_CApath  or
61              *_tls_CAfile.
62
63       tls_daemon_random_bytes (32)
64              The number of pseudo-random bytes that an  smtp(8)  or  smtpd(8)
65              process  requests from the tlsmgr(8) server in order to seed its
66              internal pseudo random number generator (PRNG).
67
68       tls_high_cipherlist (see 'postconf -d' output)
69              The OpenSSL cipherlist for "high" grade ciphers.
70
71       tls_medium_cipherlist (see 'postconf -d' output)
72              The OpenSSL cipherlist for "medium" or higher grade ciphers.
73
74       tls_null_cipherlist (eNULL:!aNULL)
75              The OpenSSL cipherlist for "NULL" grade ciphers that provide au‐
76              thentication without encryption.
77
78       tls_eecdh_strong_curve (prime256v1)
79              The  elliptic curve used by the Postfix SMTP server for sensibly
80              strong ephemeral ECDH key exchange.
81
82       tls_eecdh_ultra_curve (secp384r1)
83              The elliptic curve used by the Postfix SMTP server for maximally
84              strong ephemeral ECDH key exchange.
85
86       tls_disable_workarounds (see 'postconf -d' output)
87              List or bit-mask of OpenSSL bug work-arounds to disable.
88
89       tls_preempt_cipherlist (no)
90              With SSLv3 and later, use the Postfix SMTP server's cipher pref‐
91              erence order instead of the remote  client's  cipher  preference
92              order.
93
94       Available in Postfix version 2.8..3.7:
95
96       tls_low_cipherlist (see 'postconf -d' output)
97              The OpenSSL cipherlist for "low" or higher grade ciphers.
98
99       tls_export_cipherlist (see 'postconf -d' output)
100              The OpenSSL cipherlist for "export" or higher grade ciphers.
101
102       Available in Postfix version 2.9 and later:
103
104       tls_legacy_public_key_fingerprints (no)
105              A  temporary  migration  aid for sites that use certificate pub‐
106              lic-key fingerprints with Postfix 2.9.0..2.9.5, which use an in‐
107              correct algorithm.
108
109       Available in Postfix version 2.11-3.1:
110
111       tls_dane_digest_agility (on)
112              Configure RFC7671 DANE TLSA digest algorithm agility.
113
114       tls_dane_trust_anchor_digest_enable (yes)
115              Enable support for RFC 6698 (DANE TLSA) DNS records that contain
116              digests of trust-anchors with certificate usage "2".
117
118       Available in Postfix version 2.11 and later:
119
120       tlsmgr_service_name (tlsmgr)
121              The name of the tlsmgr(8) service entry in master.cf.
122
123       Available in Postfix version 3.0 and later:
124
125       tls_session_ticket_cipher (Postfix >= 3.0: aes-256-cbc, Postfix <  3.0:
126       aes-128-cbc)
127              Algorithm used to encrypt RFC5077 TLS session tickets.
128
129       openssl_path (openssl)
130              The location of the OpenSSL command line program openssl(1).
131
132       Available in Postfix version 3.2 and later:
133
134       tls_eecdh_auto_curves (see 'postconf -d' output)
135              The prioritized list of elliptic curves supported by the Postfix
136              SMTP client and server.
137
138       Available in Postfix version 3.4 and later:
139
140       tls_server_sni_maps (empty)
141              Optional lookup tables that map names received from remote  SMTP
142              clients  via  the  TLS Server Name Indication (SNI) extension to
143              the appropriate keys and certificate chains.
144
145       Available in Postfix 3.5, 3.4.6, 3.3.5, 3.2.10, 3.1.13 and later:
146
147       tls_fast_shutdown_enable (yes)
148              A workaround for implementations that hang Postfix  while  shut‐
149              ting down a TLS session, until Postfix times out.
150
151       Available in Postfix version 3.8 and later:
152
153       tls_ffdhe_auto_groups (see 'postconf -d' output)
154              The  prioritized  list  of finite-field Diffie-Hellman ephemeral
155              (FFDHE) key exchange groups supported by the Postfix SMTP client
156              and server.
157
158       Available in Postfix 3.9, 3.8.1, 3.7.6, 3.6.10, 3.5.20 and later:
159
160       tls_config_file (default)
161              Optional configuration file with baseline OpenSSL settings.
162
163       tls_config_name (empty)
164              The  application  name passed by Postfix to OpenSSL library ini‐
165              tialization functions.
166

STARTTLS SERVER CONTROLS

168       These settings are clones of Postfix SMTP server settings.  They  allow
169       tlsproxy(8) to load the same certificate and private key information as
170       the Postfix SMTP server, before dropping privileges, so  that  the  key
171       files  can be kept read-only for root. These settings can currently not
172       be overruled by information in a tlsproxy(8) client request,  but  that
173       limitation may be removed in a future version.
174
175       tlsproxy_tls_CAfile ($smtpd_tls_CAfile)
176              A  file  containing  (PEM  format)  CA  certificates of root CAs
177              trusted to sign either remote SMTP client certificates or inter‐
178              mediate CA certificates.
179
180       tlsproxy_tls_CApath ($smtpd_tls_CApath)
181              A  directory containing (PEM format) CA certificates of root CAs
182              trusted to sign either remote SMTP client certificates or inter‐
183              mediate CA certificates.
184
185       tlsproxy_tls_always_issue_session_ids     ($smtpd_tls_always_issue_ses‐
186       sion_ids)
187              Force the Postfix tlsproxy(8) server to issue a TLS session  id,
188              even when TLS session caching is turned off.
189
190       tlsproxy_tls_ask_ccert ($smtpd_tls_ask_ccert)
191              Ask a remote SMTP client for a client certificate.
192
193       tlsproxy_tls_ccert_verifydepth ($smtpd_tls_ccert_verifydepth)
194              The verification depth for remote SMTP client certificates.
195
196       tlsproxy_tls_cert_file ($smtpd_tls_cert_file)
197              File  with the Postfix tlsproxy(8) server RSA certificate in PEM
198              format.
199
200       tlsproxy_tls_ciphers ($smtpd_tls_ciphers)
201              The minimum TLS cipher grade that the Postfix tlsproxy(8) server
202              will use with opportunistic TLS encryption.
203
204       tlsproxy_tls_dcert_file ($smtpd_tls_dcert_file)
205              File  with the Postfix tlsproxy(8) server DSA certificate in PEM
206              format.
207
208       tlsproxy_tls_dh1024_param_file ($smtpd_tls_dh1024_param_file)
209              File with DH parameters  that  the  Postfix  tlsproxy(8)  server
210              should use with non-export EDH ciphers.
211
212       tlsproxy_tls_dh512_param_file ($smtpd_tls_dh512_param_file)
213              File  with  DH  parameters  that  the Postfix tlsproxy(8) server
214              should use with export-grade EDH ciphers.
215
216       tlsproxy_tls_dkey_file ($smtpd_tls_dkey_file)
217              File with the Postfix tlsproxy(8) server DSA private key in  PEM
218              format.
219
220       tlsproxy_tls_eccert_file ($smtpd_tls_eccert_file)
221              File  with  the  Postfix tlsproxy(8) server ECDSA certificate in
222              PEM format.
223
224       tlsproxy_tls_eckey_file ($smtpd_tls_eckey_file)
225              File with the Postfix tlsproxy(8) server ECDSA  private  key  in
226              PEM format.
227
228       tlsproxy_tls_eecdh_grade ($smtpd_tls_eecdh_grade)
229              The  Postfix tlsproxy(8) server security grade for ephemeral el‐
230              liptic-curve Diffie-Hellman (EECDH) key exchange.
231
232       tlsproxy_tls_exclude_ciphers ($smtpd_tls_exclude_ciphers)
233              List of ciphers or cipher types to exclude from the  tlsproxy(8)
234              server cipher list at all TLS security levels.
235
236       tlsproxy_tls_fingerprint_digest ($smtpd_tls_fingerprint_digest)
237              The   message   digest   algorithm   to  construct  remote  SMTP
238              client-certificate fingerprints.
239
240       tlsproxy_tls_key_file ($smtpd_tls_key_file)
241              File with the Postfix tlsproxy(8) server RSA private key in  PEM
242              format.
243
244       tlsproxy_tls_loglevel ($smtpd_tls_loglevel)
245              Enable  additional Postfix tlsproxy(8) server logging of TLS ac‐
246              tivity.
247
248       tlsproxy_tls_mandatory_ciphers ($smtpd_tls_mandatory_ciphers)
249              The minimum TLS cipher grade that the Postfix tlsproxy(8) server
250              will use with mandatory TLS encryption.
251
252       tlsproxy_tls_mandatory_exclude_ciphers        ($smtpd_tls_mandatory_ex‐
253       clude_ciphers)
254              Additional list of ciphers or cipher types to exclude  from  the
255              tlsproxy(8) server cipher list at mandatory TLS security levels.
256
257       tlsproxy_tls_mandatory_protocols ($smtpd_tls_mandatory_protocols)
258              The SSL/TLS protocols accepted by the Postfix tlsproxy(8) server
259              with mandatory TLS encryption.
260
261       tlsproxy_tls_protocols ($smtpd_tls_protocols)
262              List of TLS protocols that the Postfix tlsproxy(8)  server  will
263              exclude or include with opportunistic TLS encryption.
264
265       tlsproxy_tls_req_ccert ($smtpd_tls_req_ccert)
266              With  mandatory  TLS  encryption,  require a trusted remote SMTP
267              client certificate in order to allow TLS connections to proceed.
268
269       tlsproxy_tls_security_level ($smtpd_tls_security_level)
270              The SMTP TLS security level for the Postfix tlsproxy(8)  server;
271              when a non-empty value is specified, this overrides the obsolete
272              parameters smtpd_use_tls and smtpd_enforce_tls.
273
274       tlsproxy_tls_chain_files ($smtpd_tls_chain_files)
275              Files with the Postfix tlsproxy(8) server keys  and  certificate
276              chains in PEM format.
277

STARTTLS CLIENT CONTROLS

279       These  settings are clones of Postfix SMTP client settings.  They allow
280       tlsproxy(8) to load the same certificate and private key information as
281       the  Postfix  SMTP  client, before dropping privileges, so that the key
282       files can be kept read-only for root. Some settings may be overruled by
283       information in a tlsproxy(8) client request.
284
285       Available in Postfix version 3.4 and later:
286
287       tlsproxy_client_CAfile ($smtp_tls_CAfile)
288              A  file  containing  CA certificates of root CAs trusted to sign
289              either remote TLS server certificates or  intermediate  CA  cer‐
290              tificates.
291
292       tlsproxy_client_CApath ($smtp_tls_CApath)
293              Directory  with  PEM format Certification Authority certificates
294              that the Postfix tlsproxy(8) client uses to verify a remote  TLS
295              server certificate.
296
297       tlsproxy_client_chain_files ($smtp_tls_chain_files)
298              Files  with  the Postfix tlsproxy(8) client keys and certificate
299              chains in PEM format.
300
301       tlsproxy_client_cert_file ($smtp_tls_cert_file)
302              File with the Postfix tlsproxy(8) client RSA certificate in  PEM
303              format.
304
305       tlsproxy_client_key_file ($smtp_tls_key_file)
306              File  with the Postfix tlsproxy(8) client RSA private key in PEM
307              format.
308
309       tlsproxy_client_dcert_file ($smtp_tls_dcert_file)
310              File with the Postfix tlsproxy(8) client DSA certificate in  PEM
311              format.
312
313       tlsproxy_client_dkey_file ($smtp_tls_dkey_file)
314              File  with the Postfix tlsproxy(8) client DSA private key in PEM
315              format.
316
317       tlsproxy_client_eccert_file ($smtp_tls_eccert_file)
318              File with the Postfix tlsproxy(8) client  ECDSA  certificate  in
319              PEM format.
320
321       tlsproxy_client_eckey_file ($smtp_tls_eckey_file)
322              File  with  the  Postfix tlsproxy(8) client ECDSA private key in
323              PEM format.
324
325       tlsproxy_client_fingerprint_digest ($smtp_tls_fingerprint_digest)
326              The message digest algorithm used to construct remote TLS server
327              certificate fingerprints.
328
329       tlsproxy_client_loglevel ($smtp_tls_loglevel)
330              Enable  additional Postfix tlsproxy(8) client logging of TLS ac‐
331              tivity.
332
333       tlsproxy_client_loglevel_parameter (smtp_tls_loglevel)
334              The   name   of   the   parameter   that   provides   the    tl‐
335              sproxy_client_loglevel value.
336
337       tlsproxy_client_scert_verifydepth ($smtp_tls_scert_verifydepth)
338              The verification depth for remote TLS server certificates.
339
340       tlsproxy_client_use_tls ($smtp_use_tls)
341              Opportunistic  mode:  use TLS when a remote server announces TLS
342              support.
343
344       tlsproxy_client_enforce_tls ($smtp_enforce_tls)
345              Enforcement mode: require that SMTP servers use TLS encryption.
346
347       tlsproxy_client_per_site ($smtp_tls_per_site)
348              Optional lookup tables with the Postfix tlsproxy(8)  client  TLS
349              usage  policy  by  next-hop destination and by remote TLS server
350              hostname.
351
352       Available in Postfix version 3.4-3.6:
353
354       tlsproxy_client_level ($smtp_tls_security_level)
355              The default TLS  security  level  for  the  Postfix  tlsproxy(8)
356              client.
357
358       tlsproxy_client_policy ($smtp_tls_policy_maps)
359              Optional  lookup  tables with the Postfix tlsproxy(8) client TLS
360              security policy by next-hop destination.
361
362       Available in Postfix version 3.7 and later:
363
364       tlsproxy_client_security_level ($smtp_tls_security_level)
365              The default TLS  security  level  for  the  Postfix  tlsproxy(8)
366              client.
367
368       tlsproxy_client_policy_maps ($smtp_tls_policy_maps)
369              Optional  lookup  tables with the Postfix tlsproxy(8) client TLS
370              security policy by next-hop destination.
371

OBSOLETE STARTTLS SUPPORT CONTROLS

373       These parameters are supported for compatibility with  smtpd(8)  legacy
374       parameters.
375
376       tlsproxy_use_tls ($smtpd_use_tls)
377              Opportunistic  TLS:  announce  STARTTLS  support  to remote SMTP
378              clients, but do not require that clients use TLS encryption.
379
380       tlsproxy_enforce_tls ($smtpd_enforce_tls)
381              Mandatory TLS: announce STARTTLS support to remote SMTP clients,
382              and require that clients use TLS encryption.
383
384       tlsproxy_client_use_tls ($smtp_use_tls)
385              Opportunistic  mode:  use TLS when a remote server announces TLS
386              support.
387
388       tlsproxy_client_enforce_tls ($smtp_enforce_tls)
389              Enforcement mode: require that SMTP servers use TLS encryption.
390

RESOURCE CONTROLS

392       tlsproxy_watchdog_timeout (10s)
393              How much time a tlsproxy(8) process may take to process local or
394              remote I/O before it is terminated by a built-in watchdog timer.
395

MISCELLANEOUS CONTROLS

397       config_directory (see 'postconf -d' output)
398              The  default  location of the Postfix main.cf and master.cf con‐
399              figuration files.
400
401       process_id (read-only)
402              The process ID of a Postfix command or daemon process.
403
404       process_name (read-only)
405              The process name of a Postfix command or daemon process.
406
407       syslog_facility (mail)
408              The syslog facility of Postfix logging.
409
410       syslog_name (see 'postconf -d' output)
411              A prefix that  is  prepended  to  the  process  name  in  syslog
412              records, so that, for example, "smtpd" becomes "prefix/smtpd".
413
414       Available in Postfix 3.3 and later:
415
416       service_name (read-only)
417              The master.cf service name of a Postfix daemon process.
418

SEE ALSO

420       postscreen(8), Postfix zombie blocker
421       smtpd(8), Postfix SMTP server
422       postconf(5), configuration parameters
423       postlogd(8), Postfix logging
424       syslogd(8), system logging
425

LICENSE

427       The Secure Mailer license must be distributed with this software.
428

HISTORY

430       This service was introduced with Postfix version 2.8.
431

AUTHOR(S)

433       Wietse Venema
434       IBM T.J. Watson Research
435       P.O. Box 704
436       Yorktown Heights, NY 10598, USA
437
438       Wietse Venema
439       Google, Inc.
440       111 8th Avenue
441       New York, NY 10011, USA
442
443
444
445                                                                   TLSPROXY(8)
Impressum