From: Wietse Venema
Using backwards-compatible default setting smtputf8_enable=no
+Using backwards-compatible +default setting smtpd_tls_fingerprint_digest=md5
+ +Using backwards-compatible +default setting smtp_tls_fingerprint_digest=md5
+ +Using backwards-compatible +default setting lmtp_tls_fingerprint_digest=md5
+If such a message is logged in the context of a legitimate @@ -327,7 +336,7 @@ explicit list of domain names.
The smtputf8_enable default value has changed from "no" to "yes. +
The smtputf8_enable default value has changed from "no" to "yes". With the new "yes" setting, the Postfix SMTP server rejects non-ASCII addresses from clients that don't request SMTPUTF8 support, after Postfix is updated from an older version. The backwards-compatibility @@ -366,6 +375,92 @@ in main.cf: +
The smtpd_tls_fingerprint_digest default value has changed from +"md5" to "sha256". With the new "sha256" setting, the Postfix SMTP +server avoids using the deprecated "md5" algorithm and computes a more +secure digest of the client certificate.
+ +If you're using the default "md5" setting, or even an explicit +"sha1" (also deprecated) setting, you should consider switching to +"sha256". This will require updating any associated lookup table keys +with the "sha256" digests of the expected client certificate or public +key.
+ +As long as the smtpd_tls_fingerprint_digest parameter is left at its +implicit default value, and the compatibility_level setting is less than +3, Postfix logs a warning each time a client certificate or public key +fingerprint is (potentially) used for access control:
+ +++ ++postfix/smtpd[27560]: using backwards-compatible default setting + smtpd_tls_fingerprint_digest=md5 to compute certificate fingerprints ++
Since any client certificate fingerprints are passed in policy service +lookups, and Postfix doesn't know whether the fingerprint will be used, the +warning may also be logged when policy lookups are performed for connections +that used a client certificate, even if the policy service does not in fact +examine the client certificate. To reduce the noise somewhat, such warnings +are issued at most once per smtpd(8) process instance.
+ +If you prefer to stick with "md5", you can suppress the warnings by +making that setting explicit. After addressing any other compatibility +warnings, you can update your compatibility level. +
+ +++ ++# postconf smtpd_tls_fingerprint_digest=md5 +# postfix reload ++
The smtp_tls_fingerprint_digest and lmtp_tls_fingerprint_digest +default values have changed from "md5" to "sha256". With the new +"sha256" setting, the Postfix SMTP and LMTP client avoids using the +deprecated "md5" algorithm and computes a more secure digest of the +server certificate.
+ +If you're using the default "md5" setting, or even an explicit +"sha1" (also deprecated) setting, you should consider switching to +"sha256". This will require updating any "fingerprint" security level +policies in the TLS policy table to specify matching "sha256" digests of +the expected server certificates or public keys.
+ +As long as the smtp_tls_fingerprint_digest (or LMTP equivalent) +parameter is left at its implicit default value, and the +compatibility_level setting is less than 3, Postfix logs a warning each +time the "fingerprint" security level is used to specify matching "md5" +digests of trusted server certificates or public keys:
+ +++ ++postfix/smtp[27560]: using backwards-compatible default setting + smtp_tls_fingerprint_digest=md5 to compute certificate fingerprints ++
If you prefer to stick with "md5", you can suppress the warnings by +making that setting explicit. After addressing any other compatibility +warnings, you can update your compatibility level. +
+ ++++# postconf 'smtp_tls_fingerprint_digest = md5' \ + 'lmtp_tls_fingerprint_digest = md5' +# postfix reload ++
Backwards compatibility is turned off by updating the diff --git a/postfix/html/TLS_README.html b/postfix/html/TLS_README.html index ed2dfe15f..4af1be12e 100644 --- a/postfix/html/TLS_README.html +++ b/postfix/html/TLS_README.html @@ -783,8 +783,14 @@ table.
The digest algorithm used to compute the client certificate fingerprints is specified with the main.cf smtpd_tls_fingerprint_digest -parameter. The default is "md5", for compatibility with Postfix -versions < 2.5.
+parameter. The default algorithm is sha256 with Postfix ≥ +3.6 and the compatibility_level set to 3 or higher. With +Postfix ≤ 3.5, the default algorithm is md5. The +best-practice algorithm is now sha256. Recent advances in hash +function cryptanalysis have led to md5 and sha1 being deprecated in +favor of sha256. However, as long as there are no known "second +pre-image" attacks against the older algorithms, their use in this +context, though not recommended, is still likely safe.The permit_tls_all_clientcerts feature must be used with caution, because it can result in too many access permissions. Use this @@ -847,30 +853,15 @@ key always in "PEM" format. We pipe the result to another OpenSSL command that converts the key to DER and then to the "dgst" command to compute the fingerprint.
-The actual command to transform the key to DER format depends -on the version of OpenSSL used. With OpenSSL 1.0.0 and later, the -"pkey" command supports all key types. With OpenSSL 0.9.8 and -earlier, the key type is always RSA (nobody uses DSA, and EC -keys are not fully supported by 0.9.8), so the "rsa" command is -used.
+Example:
-# OpenSSL 1.0 with all certificates and SHA-1 fingerprints.
$ openssl x509 -in cert.pem -noout -pubkey |
openssl pkey -pubin -outform DER |
- openssl dgst -sha1 -c
-(stdin)= 64:3f:1f:f6:e5:1e:d4:2a:56:8b:fc:09:1a:61:98:b5:bc:7c:60:58
-
-# OpenSSL 0.9.8 with RSA certificates and MD5 fingerprints.
-$ openssl x509 -in cert.pem -noout -pubkey |
- openssl rsa -pubin -outform DER |
- openssl dgst -md5 -c
-(stdin)= f4:62:60:f6:12:8f:d5:8d:28:4d:13:a7:db:b2:ff:50
+ openssl dgst -sha256 -c
+(stdin)= 64:3f:1f:f6:e5:1e:d4:2a:...:8b:fc:09:1a:61:98:b5:bc:7c:60:58
-Note: Postfix 2.9.0–2.9.5 computed the public key -fingerprint incorrectly. To use public-key fingerprints, upgrade -to Postfix 2.9.6 or later.
The default algorithm is sha256 with Postfix ≥ 3.6 +and the compatibility_level set to 3 or higher; with Postfix +≤ 3.5, the default algorithm is md5. The +best-practice algorithm is now sha256. Recent advances in hash +function cryptanalysis have led to md5 and sha1 being deprecated in +favor of sha256. However, as long as there are no known "second +pre-image" attacks against the older algorithms, their use in this +context, though not recommended, is still likely safe.
+Example: fingerprint TLS security with an internal mailhub. Two matching fingerprints are listed. The relayhost may be multiple physical hosts behind a load-balancer, each with its own private/public @@ -1521,10 +1521,10 @@ another, and both keys are trusted just prior to the transition.
relayhost = [mailhub.example.com]
smtp_tls_security_level = fingerprint
- smtp_tls_fingerprint_digest = md5
+ smtp_tls_fingerprint_digest = sha256
smtp_tls_fingerprint_cert_match =
- 3D:95:34:51:24:66:33:B9:D2:40:99:C0:C1:17:0B:D1
- EC:3B:2D:B0:5B:B1:FB:6D:20:A3:9D:72:F6:8D:12:35
+ 51:e9:af:2e:1e:40:1f:de:64:...:30:35:2d:09:16:31:5a:eb:82:76
+ b6:b4:72:34:e2:59:cd:fb:c2:...:63:0d:4d:cc:2c:7d:84:de:e6:2f
@@ -1534,15 +1534,15 @@ As in the example above, we show two matching fingerprints:
/etc/postfix/main.cf: smtp_tls_policy_maps = hash:/etc/postfix/tls_policy - smtp_tls_fingerprint_digest = md5 + smtp_tls_fingerprint_digest = sha256
/etc/postfix/tls_policy:
example.com fingerprint
- match=3D:95:34:51:24:66:33:B9:D2:40:99:C0:C1:17:0B:D1
- match=EC:3B:2D:B0:5B:B1:FB:6D:20:A3:9D:72:F6:8D:12:35
+ match=51:e9:af:2e:1e:40:1f:de:...:35:2d:09:16:31:5a:eb:82:76
+ match=b6:b4:72:34:e2:59:cd:fb:...:0d:4d:cc:2c:7d:84:de:e6:2f
@@ -1554,30 +1554,15 @@ key always in "PEM" format. We pipe the result to another OpenSSL
command that converts the key to DER and then to the "dgst" command
to compute the fingerprint.
-The actual command to transform the key to DER format depends -on the version of OpenSSL used. With OpenSSL 1.0.0 and later, the -"pkey" command supports all key types. With OpenSSL 0.9.8 and -earlier, the key type is always RSA (nobody uses DSA, and EC -keys are not fully supported by 0.9.8), so the "rsa" command is -used.
+Example:
-# OpenSSL 1.0 with all certificates and SHA-1 fingerprints.
$ openssl x509 -in cert.pem -noout -pubkey |
openssl pkey -pubin -outform DER |
- openssl dgst -sha1 -c
-(stdin)= 64:3f:1f:f6:e5:1e:d4:2a:56:8b:fc:09:1a:61:98:b5:bc:7c:60:58
-
-# OpenSSL 0.9.8 with RSA certificates and MD5 fingerprints.
-$ openssl x509 -in cert.pem -noout -pubkey |
- openssl rsa -pubin -outform DER |
- openssl dgst -md5 -c
-(stdin)= f4:62:60:f6:12:8f:d5:8d:28:4d:13:a7:db:b2:ff:50
+ openssl dgst -sha256 -c
+(stdin)= 64:3f:1f:f6:e5:1e:d4:2a:56:...:09:1a:61:98:b5:bc:7c:60:58
-Note: Postfix 2.9.0–2.9.5 computed the public key -fingerprint incorrectly. To use public-key fingerprints, upgrade -to Postfix 2.9.6 or later.
-MAKEDEFS(1) MAKEDEFS(1)
+MAKEDEFS(1) General Commands Manual MAKEDEFS(1)
NAME
makedefs - Postfix makefile configuration utility
@@ -110,45 +110,45 @@ MAKEDEFS(1) MAKEDEFS(1)
Disable support for POSIX getpwnam_r/getpwuid_r.
-DNO_RES_NCALLS
- Do not build with the threadsafe resolver(5) API
+ Do not build with the threadsafe resolver(5) API
(res_ninit() etc.).
-DNO_SIGSETJMP
- Use setjmp()/longjmp() instead of sigsetjmp()/sig-
- longjmp(). By default, Postfix uses sigsetjmp()/sig-
+ Use setjmp()/longjmp() instead of sigsetjmp()/sig-
+ longjmp(). By default, Postfix uses sigsetjmp()/sig-
longjmp() when they appear to work.
-DNO_SNPRINTF
- Use sprintf() instead of snprintf(). By default, Postfix
+ Use sprintf() instead of snprintf(). By default, Postfix
uses snprintf() except on ancient systems.
DEBUG=debug_level
- Specifies a non-default debugging level. The default is -g.
+ Specifies a non-default debugging level. The default is -g.
Specify DEBUG= to turn off debugging.
OPT=optimization_level
- Specifies a non-default optimization level. The default is -O.
+ Specifies a non-default optimization level. The default is -O.
Specify OPT= to turn off optimization.
POSTFIX_INSTALL_OPTS=-option...
- Specifies options for the postfix-install command, separated by
- whitespace. Currently, the only supported option is
+ Specifies options for the postfix-install command, separated by
+ whitespace. Currently, the only supported option is
-keep-build-mtime.
SHLIB_CFLAGS=flags
- Override the compiler flags (typically, "-fPIC") for Postfix
+ Override the compiler flags (typically, "-fPIC") for Postfix
dynamically-linked libraries and database plugins.
This feature was introduced with Postfix 3.0.
SHLIB_RPATH=rpath
- Override the runpath (typically, "'-Wl,-rpath,${SHLIB_DIR}'")
+ Override the runpath (typically, "'-Wl,-rpath,${SHLIB_DIR}'")
for Postfix dynamically-linked libraries.
This feature was introduced with Postfix 3.0.
SHLIB_SUFFIX=suffix
- Override the filename suffix (typically, ".so") for Postfix
+ Override the filename suffix (typically, ".so") for Postfix
dynamically-linked libraries and database plugins.
This feature was introduced with Postfix 3.0.
@@ -156,7 +156,7 @@ MAKEDEFS(1) MAKEDEFS(1)
shared=yes
shared=no
- Enable (disable) Postfix builds with dynamically-linked
+ Enable (disable) Postfix builds with dynamically-linked
libraries typically named $shlib_directory/libpostfix-*.so.*.
This feature was introduced with Postfix 3.0.
@@ -164,39 +164,39 @@ MAKEDEFS(1) MAKEDEFS(1)
dynamicmaps=yes
dynamicmaps=no
- Enable (disable) Postfix builds with the configuration file
+ Enable (disable) Postfix builds with the configuration file
$meta_directory/dynamicmaps.cf and dynamically-loadable database
- plugins typically named postfix-*.so.*. The setting "dynam-
- icmaps=yes" implicitly enables Postfix dynamically-linked
+ plugins typically named postfix-*.so.*. The setting "dynam-
+ icmaps=yes" implicitly enables Postfix dynamically-linked
libraries.
This feature was introduced with Postfix 3.0.
pie=yes
- pie=no Enable (disable) Postfix builds with position-independent exe-
+ pie=no Enable (disable) Postfix builds with position-independent exe-
cutables, on platforms where this is supported.
This feature was introduced with Postfix 3.0.
installation_parameter=value...
- Override the compiled-in default value of the specified instal-
- lation parameter(s). The following parameters are supported in
+ Override the compiled-in default value of the specified instal-
+ lation parameter(s). The following parameters are supported in
this context:
- command_directory config_directory daemon_directory data_direc-
- tory default_database_type html_directory mail_spool_directory
- mailq_path manpage_directory meta_directory newaliases_path
- queue_directory readme_directory sendmail_path shlib_directory
+ command_directory config_directory daemon_directory data_direc-
+ tory default_database_type html_directory mail_spool_directory
+ mailq_path manpage_directory meta_directory newaliases_path
+ queue_directory readme_directory sendmail_path shlib_directory
openssl_path
- See the postconf(5) manpage for a description of these parame-
+ See the postconf(5) manpage for a description of these parame-
ters.
This feature was introduced with Postfix 3.0.
WARN=warning_flags
- Specifies non-default gcc compiler warning options for use when
+ Specifies non-default gcc compiler warning options for use when
"make" is invoked in a source subdirectory only.
LICENSE
diff --git a/postfix/html/newaliases.1.html b/postfix/html/newaliases.1.html
index 02f20fe89..a83307fc6 100644
--- a/postfix/html/newaliases.1.html
+++ b/postfix/html/newaliases.1.html
@@ -45,24 +45,27 @@ SENDMAIL(1) SENDMAIL(1)
ery attempt will be made until the mail is taken off
hold.
- This mode of operation is implemented by executing the
+ # The message is forced to expire. See the postsuper(1)
+ options -e or -f.
+
+ This mode of operation is implemented by executing the
postqueue(1) command.
newaliases
- Initialize the alias database. If no input file is specified
- (with the -oA option, see below), the program processes the
- file(s) specified with the alias_database configuration parame-
- ter. If no alias database type is specified, the program uses
- the type specified with the default_database_type configuration
+ Initialize the alias database. If no input file is specified
+ (with the -oA option, see below), the program processes the
+ file(s) specified with the alias_database configuration parame-
+ ter. If no alias database type is specified, the program uses
+ the type specified with the default_database_type configuration
parameter. This mode of operation is implemented by running the
postalias(1) command.
Note: it may take a minute or so before an alias database update
- becomes visible. Use the "postfix reload" command to eliminate
+ becomes visible. Use the "postfix reload" command to eliminate
this delay.
- These and other features can be selected by specifying the appropriate
- combination of command-line options. Some features are controlled by
+ These and other features can be selected by specifying the appropriate
+ combination of command-line options. Some features are controlled by
parameters in the main.cf configuration file.
The following options are recognized:
@@ -70,13 +73,13 @@ SENDMAIL(1) SENDMAIL(1)
-Am (ignored)
-Ac (ignored)
- Postfix sendmail uses the same configuration file regardless of
+ Postfix sendmail uses the same configuration file regardless of
whether or not a message is an initial submission.
-B body_type
The message body MIME type: 7BIT or 8BITMIME.
- -bd Go into daemon mode. This mode of operation is implemented by
+ -bd Go into daemon mode. This mode of operation is implemented by
executing the "postfix start" command.
-bh (ignored)
@@ -86,8 +89,8 @@ SENDMAIL(1) SENDMAIL(1)
-bi Initialize alias database. See the newaliases command above.
- -bl Go into daemon mode. To accept only local connections as with
- Sendmail's -bl option, specify "inet_interfaces = loopback" in
+ -bl Go into daemon mode. To accept only local connections as with
+ Sendmail's -bl option, specify "inet_interfaces = loopback" in
the Postfix main.cf configuration file.
-bm Read mail from standard input and arrange for delivery. This is
@@ -95,17 +98,17 @@ SENDMAIL(1) SENDMAIL(1)
-bp List the mail queue. See the mailq command above.
- -bs Stand-alone SMTP server mode. Read SMTP commands from standard
- input, and write responses to standard output. In stand-alone
- SMTP server mode, mail relaying and other access controls are
- disabled by default. To enable them, run the process as the
+ -bs Stand-alone SMTP server mode. Read SMTP commands from standard
+ input, and write responses to standard output. In stand-alone
+ SMTP server mode, mail relaying and other access controls are
+ disabled by default. To enable them, run the process as the
mail_owner user.
- This mode of operation is implemented by running the smtpd(8)
+ This mode of operation is implemented by running the smtpd(8)
daemon.
- -bv Do not collect or deliver a message. Instead, send an email
- report after verifying each recipient address. This is useful
+ -bv Do not collect or deliver a message. Instead, send an email
+ report after verifying each recipient address. This is useful
for testing address rewriting and routing configurations.
This feature is available in Postfix version 2.1 and later.
@@ -113,58 +116,58 @@ SENDMAIL(1) SENDMAIL(1)
-C config_file
-C config_dir
- The path name of the Postfix main.cf file, or of its parent
- directory. This information is ignored with Postfix versions
+ The path name of the Postfix main.cf file, or of its parent
+ directory. This information is ignored with Postfix versions
before 2.3.
With Postfix version 3.2 and later, a non-default directory must
- be authorized in the default main.cf file, through the alter-
+ be authorized in the default main.cf file, through the alter-
nate_config_directories or multi_instance_directories parame-
ters.
- With all Postfix versions, you can specify a directory pathname
- with the MAIL_CONFIG environment variable to override the loca-
+ With all Postfix versions, you can specify a directory pathname
+ with the MAIL_CONFIG environment variable to override the loca-
tion of configuration files.
-F full_name
- Set the sender full name. This overrides the NAME environment
+ Set the sender full name. This overrides the NAME environment
variable, and is used only with messages that have no From: mes-
sage header.
-f sender
- Set the envelope sender address. This is the address where
+ Set the envelope sender address. This is the address where
delivery problems are sent to. With Postfix versions before 2.1,
- the Errors-To: message header overrides the error return
+ the Errors-To: message header overrides the error return
address.
- -G Gateway (relay) submission, as opposed to initial user submis-
- sion. Either do not rewrite addresses at all, or update incom-
- plete addresses with the domain information specified with
+ -G Gateway (relay) submission, as opposed to initial user submis-
+ sion. Either do not rewrite addresses at all, or update incom-
+ plete addresses with the domain information specified with
remote_header_rewrite_domain.
This option is ignored before Postfix version 2.3.
-h hop_count (ignored)
- Hop count limit. Use the hopcount_limit configuration parameter
+ Hop count limit. Use the hopcount_limit configuration parameter
instead.
-I Initialize alias database. See the newaliases command above.
- -i When reading a message from standard input, don't treat a line
+ -i When reading a message from standard input, don't treat a line
with only a . character as the end of input.
-L label (ignored)
- The logging label. Use the syslog_name configuration parameter
+ The logging label. Use the syslog_name configuration parameter
instead.
-m (ignored)
Backwards compatibility.
-N dsn (default: 'delay, failure')
- Delivery status notification control. Specify either a
+ Delivery status notification control. Specify either a
comma-separated list with one or more of failure (send notifica-
- tion when delivery fails), delay (send notification when deliv-
- ery is delayed), or success (send notification when the message
+ tion when delivery fails), delay (send notification when deliv-
+ ery is delayed), or success (send notification when the message
is delivered); or specify never (don't send any notifications at
all).
@@ -174,50 +177,50 @@ SENDMAIL(1) SENDMAIL(1)
Backwards compatibility.
-oAalias_database
- Non-default alias database. Specify pathname or type:pathname.
+ Non-default alias database. Specify pathname or type:pathname.
See postalias(1) for details.
-O option=value (ignored)
- Set the named option to value. Use the equivalent configuration
+ Set the named option to value. Use the equivalent configuration
parameter in main.cf instead.
-o7 (ignored)
-o8 (ignored)
- To send 8-bit or binary content, use an appropriate MIME encap-
+ To send 8-bit or binary content, use an appropriate MIME encap-
sulation and specify the appropriate -B command-line option.
- -oi When reading a message from standard input, don't treat a line
+ -oi When reading a message from standard input, don't treat a line
with only a . character as the end of input.
-om (ignored)
The sender is never eliminated from alias etc. expansions.
-o x value (ignored)
- Set option x to value. Use the equivalent configuration parame-
+ Set option x to value. Use the equivalent configuration parame-
ter in main.cf instead.
-r sender
- Set the envelope sender address. This is the address where
+ Set the envelope sender address. This is the address where
delivery problems are sent to. With Postfix versions before 2.1,
- the Errors-To: message header overrides the error return
+ the Errors-To: message header overrides the error return
address.
-R return
- Delivery status notification control. Specify "hdrs" to return
- only the header when a message bounces, "full" to return a full
+ Delivery status notification control. Specify "hdrs" to return
+ only the header when a message bounces, "full" to return a full
copy (the default behavior).
The -R option specifies an upper bound; Postfix will return only
- the header, when a full copy would exceed the bounce_size_limit
+ the header, when a full copy would exceed the bounce_size_limit
setting.
This option is ignored before Postfix version 2.10.
- -q Attempt to deliver all queued mail. This is implemented by exe-
+ -q Attempt to deliver all queued mail. This is implemented by exe-
cuting the postqueue(1) command.
- Warning: flushing undeliverable mail frequently will result in
+ Warning: flushing undeliverable mail frequently will result in
poor delivery performance of all other mail.
-qinterval (ignored)
@@ -226,21 +229,21 @@ SENDMAIL(1) SENDMAIL(1)
-qIqueueid
Schedule immediate delivery of mail with the specified queue ID.
- This option is implemented by executing the postqueue(1) com-
+ This option is implemented by executing the postqueue(1) com-
mand, and is available with Postfix version 2.4 and later.
-qRsite
- Schedule immediate delivery of all mail that is queued for the
- named site. This option accepts only site names that are eligi-
- ble for the "fast flush" service, and is implemented by execut-
+ Schedule immediate delivery of all mail that is queued for the
+ named site. This option accepts only site names that are eligi-
+ ble for the "fast flush" service, and is implemented by execut-
ing the postqueue(1) command. See flush(8) for more information
about the "fast flush" service.
-qSsite
- This command is not implemented. Use the slower "sendmail -q"
+ This command is not implemented. Use the slower "sendmail -q"
command instead.
- -t Extract recipients from message headers. These are added to any
+ -t Extract recipients from message headers. These are added to any
recipients specified on the command line.
With Postfix versions prior to 2.1, this option requires that no
@@ -256,23 +259,23 @@ SENDMAIL(1) SENDMAIL(1)
This feature is available in Postfix 2.3 and later.
-XV (Postfix 2.2 and earlier: -V)
- Variable Envelope Return Path. Given an envelope sender address
- of the form owner-listname@origin, each recipient user@domain
+ Variable Envelope Return Path. Given an envelope sender address
+ of the form owner-listname@origin, each recipient user@domain
receives mail with a personalized envelope sender address.
- By default, the personalized envelope sender address is
- owner-listname+user=domain@origin. The default + and = charac-
- ters are configurable with the default_verp_delimiters configu-
+ By default, the personalized envelope sender address is
+ owner-listname+user=domain@origin. The default + and = charac-
+ ters are configurable with the default_verp_delimiters configu-
ration parameter.
-XVxy (Postfix 2.2 and earlier: -Vxy)
- As -XV, but uses x and y as the VERP delimiter characters,
+ As -XV, but uses x and y as the VERP delimiter characters,
instead of the characters specified with the default_verp_delim-
iters configuration parameter.
-v Send an email report of the first delivery attempt (Postfix ver-
- sions 2.1 and later). Mail delivery always happens in the back-
- ground. When multiple -v options are given, enable verbose log-
+ sions 2.1 and later). Mail delivery always happens in the back-
+ ground. When multiple -v options are given, enable verbose log-
ging for debugging purposes.
-X log_file (ignored)
@@ -280,12 +283,42 @@ SENDMAIL(1) SENDMAIL(1)
configuration parameters instead.
SECURITY
- By design, this program is not set-user (or group) id. However, it must
- handle data from untrusted, possibly remote, users. Thus, the usual
- precautions need to be taken against malicious inputs.
+ By design, this program is not set-user (or group) id. It is prepared
+ to handle message content from untrusted, possibly remote, users.
+
+ However, like most Postfix programs, this program does not enforce a
+ security policy on its command-line arguments. Instead, it relies on
+ the UNIX system to enforce access policies based on the effective user
+ and group IDs of the process. Concretely, this means that running Post-
+ fix commands as root (from sudo or equivalent) on behalf of a non-root
+ user is likely to create privilege escalation opportunities.
+
+ If an application runs any Postfix programs on behalf of users that do
+ not have normal shell access to Postfix commands, then that application
+ MUST restrict user-specified command-line arguments to avoid privilege
+ escalation.
+
+ o Filter all command-line arguments, for example arguments that
+ contain a pathname or that specify a database access method.
+ These pathname checks must reject user-controlled symlinks or
+ hardlinks to sensitive files, and must not be vulnerable to TOC-
+ TOU race attacks.
+
+ o Disable command options processing for all command arguments
+ that contain user-specified data. For example, the Postfix send-
+ mail(1) command line MUST be structured as follows:
+
+ /path/to/sendmail system-arguments -- user-arguments
+
+ Here, the "--" disables command option processing for all
+ user-arguments that follow.
+
+ Without the "--", a malicious user could enable Postfix send-
+ mail(1) command options, by specifying an email address that
+ starts with "-".
DIAGNOSTICS
- Problems are logged to syslogd(8) or postlogd(8), and to the standard
+ Problems are logged to syslogd(8) or postlogd(8), and to the standard
error stream.
ENVIRONMENT
@@ -299,12 +332,12 @@ SENDMAIL(1) SENDMAIL(1)
Enable debugging with an external command, as specified with the
debugger_command configuration parameter.
- NAME The sender full name. This is used only with messages that have
+ NAME The sender full name. This is used only with messages that have
no From: message header. See also the -F option above.
CONFIGURATION PARAMETERS
- The following main.cf parameters are especially relevant to this pro-
- gram. The text below provides only a parameter summary. See post-
+ The following main.cf parameters are especially relevant to this pro-
+ gram. The text below provides only a parameter summary. See post-
conf(5) for more details including examples.
COMPATIBILITY CONTROLS
@@ -315,7 +348,7 @@ SENDMAIL(1) SENDMAIL(1)
line endings from <CR><LF> into UNIX format (<LF>).
TROUBLE SHOOTING CONTROLS
- The DEBUG_README file gives examples of how to troubleshoot a Postfix
+ The DEBUG_README file gives examples of how to troubleshoot a Postfix
system.
debugger_command (empty)
@@ -323,13 +356,15 @@ SENDMAIL(1) SENDMAIL(1)
invoked with the -D option.
debug_peer_level (2)
- The increment in verbose logging level when a remote client or
- server matches a pattern in the debug_peer_list parameter.
+ The increment in verbose logging level when a nexthop destina-
+ tion, remote client or server name or network address matches a
+ pattern given with the debug_peer_list parameter.
debug_peer_list (empty)
- Optional list of remote client or server hostname or network
- address patterns that cause the verbose logging level to
- increase by the amount specified in $debug_peer_level.
+ Optional list of nexthop destination, remote client or server
+ name or network address patterns that, if matched, cause the
+ verbose logging level to increase by the amount specified in
+ $debug_peer_level.
ACCESS CONTROLS
Available in Postfix version 2.2 and later:
@@ -341,13 +376,13 @@ SENDMAIL(1) SENDMAIL(1)
List of users who are authorized to view the queue.
authorized_submit_users (static:anyone)
- List of users who are authorized to submit mail with the send-
+ List of users who are authorized to submit mail with the send-
mail(1) command (and with the privileged postdrop(1) helper com-
mand).
RESOURCE AND RATE CONTROLS
bounce_size_limit (50000)
- The maximal amount of original message text that is sent in a
+ The maximal amount of original message text that is sent in a
non-delivery notification.
fork_attempts (5)
@@ -361,11 +396,11 @@ SENDMAIL(1) SENDMAIL(1)
in the primary message headers.
queue_run_delay (300s)
- The time between deferred queue scans by the queue manager;
+ The time between deferred queue scans by the queue manager;
prior to Postfix 2.4 the default value was 1000s.
FAST FLUSH CONTROLS
- The ETRN_README file describes configuration and operation details for
+ The ETRN_README file describes configuration and operation details for
the Postfix "fast flush" service.
fast_flush_domains ($relay_domains)
@@ -373,26 +408,26 @@ SENDMAIL(1) SENDMAIL(1)
tion logfiles with mail that is queued to those destinations.
VERP CONTROLS
- The VERP_README file describes configuration and operation details of
+ The VERP_README file describes configuration and operation details of
Postfix support for variable envelope return path addresses.
default_verp_delimiters (+=)
The two default VERP delimiter characters.
verp_delimiter_filter (-=+)
- The characters Postfix accepts as VERP delimiter characters on
+ The characters Postfix accepts as VERP delimiter characters on
the Postfix sendmail(1) command line and in SMTP commands.
MISCELLANEOUS CONTROLS
alias_database (see 'postconf -d' output)
- The alias databases for local(8) delivery that are updated with
+ The alias databases for local(8) delivery that are updated with
"newaliases" or with "sendmail -bi".
command_directory (see 'postconf -d' output)
The location of all postfix administrative commands.
config_directory (see 'postconf -d' output)
- The default location of the Postfix main.cf and master.cf con-
+ The default location of the Postfix main.cf and master.cf con-
figuration files.
daemon_directory (see 'postconf -d' output)
@@ -403,46 +438,46 @@ SENDMAIL(1) SENDMAIL(1)
and postmap(1) commands.
delay_warning_time (0h)
- The time after which the sender receives a copy of the message
+ The time after which the sender receives a copy of the message
headers of mail that is still queued.
import_environment (see 'postconf -d' output)
- The list of environment parameters that a privileged Postfix
- process will import from a non-Postfix parent process, or
+ The list of environment parameters that a privileged Postfix
+ process will import from a non-Postfix parent process, or
name=value environment overrides.
mail_owner (postfix)
- The UNIX system account that owns the Postfix queue and most
+ The UNIX system account that owns the Postfix queue and most
Postfix daemon processes.
queue_directory (see 'postconf -d' output)
The location of the Postfix top-level queue directory.
remote_header_rewrite_domain (empty)
- Don't rewrite message headers from remote clients at all when
- this parameter is empty; otherwise, rewrite message headers and
+ Don't rewrite message headers from remote clients at all when
+ this parameter is empty; otherwise, rewrite message headers and
append the specified domain name to incomplete addresses.
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
+ A prefix that is prepended to the process name in syslog
records, so that, for example, "smtpd" becomes "prefix/smtpd".
Postfix 3.2 and later:
alternate_config_directories (empty)
A list of non-default Postfix configuration directories that may
- be specified with "-c config_directory" on the command line (in
- the case of sendmail(1), with the "-C" option), or via the
+ be specified with "-c config_directory" on the command line (in
+ the case of sendmail(1), with the "-C" option), or via the
MAIL_CONFIG environment parameter.
multi_instance_directories (empty)
- An optional list of non-default Postfix configuration directo-
- ries; these directories belong to additional Postfix instances
- that share the Postfix executable files and documentation with
- the default Postfix instance, and that are started, stopped,
+ An optional list of non-default Postfix configuration directo-
+ ries; these directories belong to additional Postfix instances
+ that share the Postfix executable files and documentation with
+ the default Postfix instance, and that are started, stopped,
etc., together with the default Postfix instance.
FILES
@@ -463,7 +498,7 @@ SENDMAIL(1) SENDMAIL(1)
syslogd(8), system logging
README_FILES
- Use "postconf readme_directory" or "postconf html_directory" to locate
+ Use "postconf readme_directory" or "postconf html_directory" to locate
this information.
DEBUG_README, Postfix debugging howto
ETRN_README, Postfix ETRN howto
diff --git a/postfix/html/postconf.5.html b/postfix/html/postconf.5.html
index a29f9223e..13d621cc6 100644
--- a/postfix/html/postconf.5.html
+++ b/postfix/html/postconf.5.html
@@ -5354,7 +5354,7 @@ configuration parameter. See there for details.
The LMTP-specific version of the smtp_tls_fingerprint_digest configuration parameter. See there for details.
@@ -5721,6 +5721,15 @@ The fingerprint digest algorithm is configurable via the smtpd_tls_fingerprint_digest parameter (hard-coded as md5 prior to Postfix version 2.5).The default algorithm is sha256 with Postfix ≥ 3.6 +and the compatibility_level set to 3 or higher. With Postfix +≤ 3.5, the default algorithm is md5. The best-practice +algorithm is now sha256. Recent advances in hash function +cryptanalysis have led to md5 and sha1 being deprecated in favor of +sha256. However, as long as there are no known "second pre-image" +attacks against the older algorithms, their use in this context, though +not recommended, is still likely safe.
+Postfix lookup tables are in the form of (key, value) pairs. Since we only need the key, the value can be chosen freely, e.g. the name of the user or host: @@ -9575,10 +9593,6 @@ D7:04:2F:A7:0B:8C:A5:21:FA:31:77:E1:41:8A:EE:80 lutzpc.at.home
an appropriate access(5) policy for each client. See RESTRICTION_CLASS_README. -Note: Postfix 2.9.0–2.9.5 computed the public key -fingerprint incorrectly. To use public-key fingerprints, upgrade -to Postfix 2.9.6 or later.
-This feature is available with Postfix version 2.2.
@@ -12573,6 +12587,10 @@ is a message digest of the server certificate (or public key). The digest algorithm is selected via the smtp_tls_fingerprint_digest parameter. +The colons between each pair of nibbles in the fingerprint value +are optional (Postfix ≥ 3.6). These were required in earlier +Postfix releases.
+When an smtp_tls_policy_maps table entry specifies the "fingerprint" security level, any "match" attributes in that entry specify the list of valid fingerprints for the corresponding destination. Multiple @@ -12590,10 +12608,10 @@ another, and both keys are trusted just prior to the transition.
relayhost = [mailhub.example.com] smtp_tls_security_level = fingerprint -smtp_tls_fingerprint_digest = md5 +smtp_tls_fingerprint_digest = sha256 smtp_tls_fingerprint_cert_match = - 3D:95:34:51:24:66:33:B9:D2:40:99:C0:C1:17:0B:D1 - EC:3B:2D:B0:5B:B1:FB:6D:20:A3:9D:72:F6:8D:12:35 + cd:fc:d8:db:f8:c4:82:96:6c:...:28:71:e8:f5:8d:a5:0d:9b:d4:a6 + dd:5c:ef:f5:c3:bc:64:25:36:...:99:36:06:ce:40:ef:de:2e:ad:a4@@ -12604,7 +12622,7 @@ As in the example above, we show two matching fingerprints:
/etc/postfix/main.cf: smtp_tls_policy_maps = hash:/etc/postfix/tls_policy - smtp_tls_fingerprint_digest = md5 + smtp_tls_fingerprint_digest = sha256@@ -12612,8 +12630,8 @@ As in the example above, we show two matching fingerprints:
/etc/postfix/tls_policy:
example.com fingerprint
- match=3D:95:34:51:24:66:33:B9:D2:40:99:C0:C1:17:0B:D1
- match=EC:3B:2D:B0:5B:B1:FB:6D:20:A3:9D:72:F6:8D:12:35
+ match=51:e9:af:2e:1e:40:1f:...:64:0a:30:35:2d:09:16:31:5a:eb:82:76
+ match=b6:b4:72:34:e2:59:cd:...:c2:ca:63:0d:4d:cc:2c:7d:84:de:e6:2f
@@ -12623,7 +12641,7 @@ As in the example above, we show two matching fingerprints:
The message digest algorithm used to construct remote SMTP server certificate fingerprints. At the "fingerprint" TLS security level @@ -12636,19 +12654,19 @@ algorithm. With a digest algorithm resistant to "second pre-image" attacks, it is not feasible to create a new public key and a matching certificate (or public/private key-pair) that has the same fingerprint.
-The default algorithm is md5; this is consistent with -the backwards compatible setting of the digest used to verify client -certificates in the SMTP server.
+The default algorithm is sha256 with Postfix ≥ 3.6 +and the compatibility_level set to 3 or higher. With Postfix +≤ 3.5, the default algorithm is md5.
-The best practice algorithm is now sha1. Recent advances in hash -function cryptanalysis have led to md5 being deprecated in favor of sha1. -However, as long as there are no known "second pre-image" attacks -against md5, its use in this context can still be considered safe. -
+The best-practice algorithm is now sha256. Recent advances in hash +function cryptanalysis have led to md5 and sha1 being deprecated in favor of +sha256. However, as long as there are no known "second pre-image" attacks +against the older algorithms, their use in this context, though not +recommended, is still likely safe.
While additional digest algorithms are often available with OpenSSL's libcrypto, only those used by libssl in SSL cipher suites are available to -Postfix. For now this means just md5 or sha1.
+Postfix. You'll likely find support for md5, sha1, sha256 and sha512.To find the fingerprint of a specific certificate file, with a specific digest algorithm, run: @@ -12665,8 +12683,8 @@ For example:
@@ -12678,29 +12696,16 @@ key always in "PEM" format. We pipe the result to another OpenSSL command that converts the key to DER and then to the "dgst" command to compute the fingerprint. --$ openssl x509 -noout -fingerprint -sha1 -in cert.pem -SHA1 Fingerprint=D4:6A:AB:19:24:79:F8:32:BB:A6:CB:66:82:C0:8E:9B:EE:29:A8:1A +$ openssl x509 -noout -fingerprint -sha256 -in cert.pem +SHA256 Fingerprint=D4:6A:AB:19:24:...:BB:A6:CB:66:82:C0:8E:9B:EE:29:A8:1A
The actual command to transform the key to DER format depends -on the version of OpenSSL used. With OpenSSL 1.0.0 and later, the -"pkey" command supports all key types. With OpenSSL 0.9.8 and -earlier, the key type is always RSA (nobody uses DSA, and EC -keys are not fully supported by 0.9.8), so the "rsa" command is -used.
+The actual command to transform the key to DER format depends on the +version of OpenSSL used. As of OpenSSL 1.0.0, the "pkey" command supports +all key types.
-# OpenSSL 1.0 with all certificates and SHA-1 fingerprints.
+# OpenSSL ≥ 1.0 with SHA-256 fingerprints.
$ openssl x509 -in cert.pem -noout -pubkey |
openssl pkey -pubin -outform DER |
- openssl dgst -sha1 -c
-(stdin)= 64:3f:1f:f6:e5:1e:d4:2a:56:8b:fc:09:1a:61:98:b5:bc:7c:60:58
-
-
-
--@@ -12708,10 +12713,6 @@ $ openssl x509 -in cert.pem -noout -pubkey | fingerprint and public key fingerprint when the TLS loglevel is 2 or higher. --# OpenSSL 0.9.8 with RSA certificates and MD5 fingerprints. -$ openssl x509 -in cert.pem -noout -pubkey | - openssl rsa -pubin -outform DER | - openssl dgst -md5 -c -(stdin)= f4:62:60:f6:12:8f:d5:8d:28:4d:13:a7:db:b2:ff:50 + openssl dgst -sha256 -c +(stdin)= 64:3f:1f:f6:e5:1e:d4:2a:56:...:fc:09:1a:61:98:b5:bc:7c:60:58
Note: Postfix 2.9.0–2.9.5 computed the public key -fingerprint incorrectly. To use public-key fingerprints, upgrade -to Postfix 2.9.6 or later.
-This feature is available in Postfix 2.5 and later.
@@ -13204,8 +13205,12 @@ Example:/etc/postfix/main.cf: smtp_tls_policy_maps = hash:/etc/postfix/tls_policy - # Postfix 2.5 and later - smtp_tls_fingerprint_digest = md5 + # Postfix 2.5 and later. + # + # The default digest is sha256 with Postfix ≥ 3.6 and + # compatibility level ≥ 3. + # + smtp_tls_fingerprint_digest = sha256
@@ -13219,8 +13224,8 @@ Example:
[mail.example.org]:587 secure match=nexthop
# Postfix 2.5 and later
[thumb.example.org] fingerprint
- match=EC:3B:2D:B0:5B:B1:FB:6D:20:A3:9D:72:F6:8D:12:35
- match=3D:95:34:51:24:66:33:B9:D2:40:99:C0:C1:17:0B:D1
+ match=b6:b4:72:34:e2:59:cd:...:c2:ca:63:0d:4d:cc:2c:7d:84:de:e6:2f
+ match=51:e9:af:2e:1e:40:1f:...:64:0a:30:35:2d:09:16:31:5a:eb:82:76
Note: The hostname strategy if listed in a non-default
@@ -14249,7 +14254,14 @@ Postfix version 2.5). This feature requires "
-
+
File with DH parameters that the Postfix SMTP server should use with non-export EDH ciphers.
+The best-practice choice of parameters uses a 2048-bit prime. This is fine, +despite the historical "1024" in the parameter name. Do not be tempted to use +much larger values, performance degrades quickly, and you may also cease to +interoperate with some mainstream SMTP clients. As of Postfix 3.1, the +compiled-in default prime is 2048-bits, and it is not strictly necessary, +though perhaps somewhat beneficial to generate custom DH parameters.
+Instead of using the exact same parameter sets as distributed with other TLS packages, it is more secure to generate your own set of parameters with something like the following commands:
@@ -17220,6 +17250,9 @@ grade is "medium" with Postfix releases after the middle of 2015, and as a result export-grade cipher suites are by default not used. +-openssl dhparam -out /etc/postfix/dh512.pem 512 -openssl dhparam -out /etc/postfix/dh1024.pem 1024 openssl dhparam -out /etc/postfix/dh2048.pem 2048 +openssl dhparam -out /etc/postfix/dh1024.pem 1024 +# As of Postfix 3.6, export-grade 512-bit DH parameters are no longer +# supported or needed. +openssl dhparam -out /etc/postfix/dh512.pem 512
With Postfix ≥ 3.6 export-grade Diffie-Hellman key exchange +is no longer supported, and this parameter is silently ignored.
+See also the discussion under the smtpd_tls_dh1024_param_file configuration parameter.
@@ -17298,32 +17331,32 @@ compiled and linked with OpenSSL 1.0.0 or later. (default: see "postconf -d" output)The Postfix SMTP server security grade for ephemeral elliptic-curve -Diffie-Hellman (EECDH) key exchange.
+Diffie-Hellman (EECDH) key exchange. As of Postfix 3.6, the value of +this parameter is always ignored, and Postfix behaves as though th +auto value (described below) was chosen. +The available choices are:
The message digest algorithm to construct remote SMTP -client-certificate -fingerprints or public key fingerprints (Postfix 2.9 and later) -for check_ccert_access and permit_tls_clientcerts. The -default algorithm is md5, for backwards compatibility with Postfix -releases prior to 2.5.
+The message digest algorithm to construct remote SMTP client-certificate +fingerprints or public key fingerprints (Postfix 2.9 and later) for +check_ccert_access and permit_tls_clientcerts.
-Advances in hash -function cryptanalysis have led to md5 being deprecated in favor of sha1. -However, as long as there are no known "second pre-image" attacks -against md5, its use in this context can still be considered safe. -
+The default algorithm is sha256 with Postfix ≥ 3.6 +and the compatibility_level set to 3 or higher. With Postfix +≤ 3.5, the default algorithm is md5.
+ +The best-practice algorithm is now sha256. Recent advances in hash +function cryptanalysis have led to md5 and sha1 being deprecated in favor of +sha256. However, as long as there are no known "second pre-image" attacks +against the older algorithms, their use in this context, though not +recommended, is still likely safe.
While additional digest algorithms are often available with OpenSSL's libcrypto, only those used by libssl in SSL cipher suites are available to -Postfix.
+Postfix. You'll likely find support for md5, sha1, sha256 and sha512.To find the fingerprint of a specific certificate file, with a specific digest algorithm, run:
@@ -17413,8 +17447,8 @@ For example:@@ -17426,46 +17460,26 @@ key always in "PEM" format. We pipe the result to another OpenSSL command that converts the key to DER and then to the "dgst" command to compute the fingerprint. --$ openssl x509 -noout -fingerprint -sha1 -in cert.pem -SHA1 Fingerprint=D4:6A:AB:19:24:79:F8:32:BB:A6:CB:66:82:C0:8E:9B:EE:29:A8:1A +$ openssl x509 -noout -fingerprint -sha256 -in cert.pem +SHA256 Fingerprint=D4:6A:AB:19:24:...:A6:CB:66:82:C0:8E:9B:EE:29:A8:1A
The actual command to transform the key to DER format depends -on the version of OpenSSL used. With OpenSSL 1.0.0 and later, the -"pkey" command supports all key types. With OpenSSL 0.9.8 and -earlier, the key type is always RSA (nobody uses DSA, and EC -keys are not fully supported by 0.9.8), so the "rsa" command is -used.
+Example:
-# OpenSSL 1.0 with all certificates and SHA-1 fingerprints.
$ openssl x509 -in cert.pem -noout -pubkey |
openssl pkey -pubin -outform DER |
- openssl dgst -sha1 -c
+ openssl dgst -sha256 -c
(stdin)= 64:3f:1f:f6:e5:1e:d4:2a:56:8b:fc:09:1a:61:98:b5:bc:7c:60:58
----# OpenSSL 0.9.8 with RSA certificates and MD5 fingerprints. -$ openssl x509 -in cert.pem -noout -pubkey | - openssl rsa -pubin -outform DER | - openssl dgst -md5 -c -(stdin)= f4:62:60:f6:12:8f:d5:8d:28:4d:13:a7:db:b2:ff:50 --
The Postfix SMTP server and client log the peer (leaf) certificate fingerprint and public key fingerprint when the TLS loglevel is 2 or higher.
-Note: Postfix 2.9.0–2.9.5 computed the public key -fingerprint incorrectly. To use public-key fingerprints, upgrade -to Postfix 2.9.6 or later.
- -Example: client-certificate access table, with sha1 fingerprints:
+Example: client-certificate access table, with sha256 fingerprints:
@@ -19423,6 +19437,9 @@ for further details. The default SMTP server cipher grade is "medium" with Postfix releases after the middle of 2015, and as a result export-grade cipher suites are by default not used. +/etc/postfix/main.cf: - smtpd_tls_fingerprint_digest = sha1 + smtpd_tls_fingerprint_digest = sha256 smtpd_client_restrictions = check_ccert_access hash:/etc/postfix/access, reject @@ -17473,9 +17487,9 @@ to Postfix 2.9.6 or later./etc/postfix/access: # Action folded to next line... - AF:88:7C:AD:51:95:6F:36:96:F6:01:FB:2E:48:CD:AB:49:25:A2:3B + AF:88:7C:AD:51:95:6F:36:96:...:01:FB:2E:48:CD:AB:49:25:A2:3B OK - 85:16:78:FD:73:6E:CE:70:E0:31:5F:0D:3C:C8:6D:C4:2C:24:59:E1 + 85:16:78:FD:73:6E:CE:70:E0:...:5F:0D:3C:C8:6D:C4:2C:24:59:E1 permit_auth_destination
With Postfix ≥ 3.6 export-grade Diffie-Hellman key exchange +is no longer supported, and this parameter is silently ignored.
+This feature is available in Postfix 2.8 and later.
diff --git a/postfix/html/posttls-finger.1.html b/postfix/html/posttls-finger.1.html index 4a47a4818..fd9d83baa 100644 --- a/postfix/html/posttls-finger.1.html +++ b/postfix/html/posttls-finger.1.html @@ -4,7 +4,7 @@
-POSTTLS-FINGER(1) POSTTLS-FINGER(1)
+POSTTLS-FINGER(1) General Commands Manual POSTTLS-FINGER(1)
NAME
posttls-finger - Probe the TLS properties of an ESMTP or LMTP server.
@@ -104,77 +104,78 @@ POSTTLS-FINGER(1) POSTTLS-FINGER(1)
tificates. To see the actual chain sent by the remote SMTP
server leave CAfile and CApath unset.
- -d mdalg (default: sha1)
+ -d mdalg (default: $smtp_tls_fingerprint_digest)
The message digest algorithm to use for reporting remote SMTP
server fingerprints and matching against user provided certifi-
cate fingerprints (with DANE TLSA records the algorithm is spec-
- ified in the DNS).
+ ified in the DNS). In Postfix versions prior to 3.6, the
+ default value was "sha1".
- -f Lookup the associated DANE TLSA RRset even when a hostname is
- not an alias and its address records lie in an unsigned zone.
+ -f Lookup the associated DANE TLSA RRset even when a hostname is
+ not an alias and its address records lie in an unsigned zone.
See smtp_tls_force_insecure_host_tlsa_lookup for details.
-F CAfile.pem (default: none)
The PEM formatted CAfile for remote SMTP server certificate ver-
- ification. By default no CAfile is used and no public CAs are
+ ification. By default no CAfile is used and no public CAs are
trusted.
-g grade (default: medium)
- The minimum TLS cipher grade used by posttls-finger. See
+ The minimum TLS cipher grade used by posttls-finger. See
smtp_tls_mandatory_ciphers for details.
-h host_lookup (default: dns)
- The hostname lookup methods used for the connection. See the
+ The hostname lookup methods used for the connection. See the
documentation of smtp_host_lookup for syntax and semantics.
-H chainfiles (default: none)
List of files with a sequence PEM-encoded TLS client certificate
- chains. The list can be built-up incrementally, by specifying
- the option multiple times, or all at once via a comma or white-
- space separated list of filenames. Each chain starts with a
- private key, which is followed immediately by the corresponding
- certificate, and optionally by additional issuer certificates.
+ chains. The list can be built-up incrementally, by specifying
+ the option multiple times, or all at once via a comma or white-
+ space separated list of filenames. Each chain starts with a
+ private key, which is followed immediately by the corresponding
+ certificate, and optionally by additional issuer certificates.
Each new key begins a new chain for the corresponding algorithm.
- This option is mutually exclusive with the below -k and -K
+ This option is mutually exclusive with the below -k and -K
options.
-k certfile (default: keyfile)
- File with PEM-encoded TLS client certificate chain. This
+ File with PEM-encoded TLS client certificate chain. This
defaults to keyfile if one is specified.
-K keyfile (default: certfile)
- File with PEM-encoded TLS client private key. This defaults to
+ File with PEM-encoded TLS client private key. This defaults to
certfile if one is specified.
-l level (default: dane or secure)
- The security level for the connection, default dane or secure
+ The security level for the connection, default dane or secure
depending on whether DNSSEC is available. For syntax and seman-
- tics, see the documentation of smtp_tls_security_level. When
- dane or dane-only is supported and selected, if no TLSA records
- are found, or all the records found are unusable, the secure
- level will be used instead. The fingerprint security level
+ tics, see the documentation of smtp_tls_security_level. When
+ dane or dane-only is supported and selected, if no TLSA records
+ are found, or all the records found are unusable, the secure
+ level will be used instead. The fingerprint security level
allows you to test certificate or public-key fingerprint matches
before you deploy them in the policy table.
- Note, since posttls-finger does not actually deliver any email,
- the none, may and encrypt security levels are not very useful.
+ Note, since posttls-finger does not actually deliver any email,
+ the none, may and encrypt security levels are not very useful.
Since may and encrypt don't require peer certificates, they will
- often negotiate anonymous TLS ciphersuites, so you won't learn
+ often negotiate anonymous TLS ciphersuites, so you won't learn
much about the remote SMTP server's certificates at these levels
if it also supports anonymous TLS (though you may learn that the
server supports anonymous TLS).
-L logopts (default: routine,certmatch)
- Fine-grained TLS logging options. To tune the TLS features
+ Fine-grained TLS logging options. To tune the TLS features
logged during the TLS handshake, specify one or more of:
0, none
- These yield no TLS logging; you'll generally want more,
+ These yield no TLS logging; you'll generally want more,
but this is handy if you just want the trust chain:
$ posttls-finger -cC -L none destination
1, routine, summary
- These synonymous values yield a normal one-line summary
+ These synonymous values yield a normal one-line summary
of the TLS connection.
2, debug
@@ -182,104 +183,104 @@ POSTTLS-FINGER(1) POSTTLS-FINGER(1)
and verbose.
3, ssl-expert
- These synonymous values combine debug with ssl-hand-
+ These synonymous values combine debug with ssl-hand-
shake-packet-dump. For experts only.
4, ssl-developer
- These synonymous values combine ssl-expert with ssl-ses-
- sion-packet-dump. For experts only, and in most cases,
+ These synonymous values combine ssl-expert with ssl-ses-
+ sion-packet-dump. For experts only, and in most cases,
use wireshark instead.
ssl-debug
- Turn on OpenSSL logging of the progress of the SSL hand-
+ Turn on OpenSSL logging of the progress of the SSL hand-
shake.
ssl-handshake-packet-dump
- Log hexadecimal packet dumps of the SSL handshake; for
+ Log hexadecimal packet dumps of the SSL handshake; for
experts only.
ssl-session-packet-dump
- Log hexadecimal packet dumps of the entire SSL session;
- only useful to those who can debug SSL protocol problems
+ Log hexadecimal packet dumps of the entire SSL session;
+ only useful to those who can debug SSL protocol problems
from hex dumps.
untrusted
- Logs trust chain verification problems. This is turned
- on automatically at security levels that use peer names
- signed by Certification Authorities to validate certifi-
- cates. So while this setting is recognized, you should
+ Logs trust chain verification problems. This is turned
+ on automatically at security levels that use peer names
+ signed by Certification Authorities to validate certifi-
+ cates. So while this setting is recognized, you should
never need to set it explicitly.
peercert
- This logs a one line summary of the remote SMTP server
+ This logs a one line summary of the remote SMTP server
certificate subject, issuer, and fingerprints.
certmatch
- This logs remote SMTP server certificate matching, show-
+ This logs remote SMTP server certificate matching, show-
ing the CN and each subjectAltName and which name
- matched. With DANE, logs matching of TLSA record
+ matched. With DANE, logs matching of TLSA record
trust-anchor and end-entity certificates.
- cache This logs session cache operations, showing whether ses-
- sion caching is effective with the remote SMTP server.
- Automatically used when reconnecting with the -r option;
+ cache This logs session cache operations, showing whether ses-
+ sion caching is effective with the remote SMTP server.
+ Automatically used when reconnecting with the -r option;
rarely needs to be set explicitly.
verbose
Enables verbose logging in the Postfix TLS driver;
includes all of peercert..cache and more.
- The default is routine,certmatch. After a reconnect, peercert,
+ The default is routine,certmatch. After a reconnect, peercert,
certmatch and verbose are automatically disabled while cache and
summary are enabled.
-m count (default: 5)
- When the -r delay option is specified, the -m option determines
- the maximum number of reconnect attempts to use with a server
- behind a load balancer, to see whether connection caching is
- likely to be effective for this destination. Some MTAs don't
- expose the underlying server identity in their EHLO response;
- with these servers there will never be more than 1 reconnection
+ When the -r delay option is specified, the -m option determines
+ the maximum number of reconnect attempts to use with a server
+ behind a load balancer, to see whether connection caching is
+ likely to be effective for this destination. Some MTAs don't
+ expose the underlying server identity in their EHLO response;
+ with these servers there will never be more than 1 reconnection
attempt.
-M insecure_mx_policy (default: dane)
- The TLS policy for MX hosts with "secure" TLSA records when the
- nexthop destination security level is dane, but the MX record
+ The TLS policy for MX hosts with "secure" TLSA records when the
+ nexthop destination security level is dane, but the MX record
was found via an "insecure" MX lookup. See the main.cf documen-
tation for smtp_tls_insecure_mx_policy for details.
-o name=value
- Specify zero or more times to override the value of the main.cf
- parameter name with value. Possible use-cases include overrid-
- ing the values of TLS library parameters, or "myhostname" to
+ Specify zero or more times to override the value of the main.cf
+ parameter name with value. Possible use-cases include overrid-
+ ing the values of TLS library parameters, or "myhostname" to
configure the SMTP EHLO name sent to the remote server.
-p protocols (default: !SSLv2)
- List of TLS protocols that posttls-finger will exclude or
+ List of TLS protocols that posttls-finger will exclude or
include. See smtp_tls_mandatory_protocols for details.
-P CApath/ (default: none)
- The OpenSSL CApath/ directory (indexed via c_rehash(1)) for
+ The OpenSSL CApath/ directory (indexed via c_rehash(1)) for
remote SMTP server certificate verification. By default no CAp-
ath is used and no public CAs are trusted.
-r delay
- With a cacheable TLS session, disconnect and reconnect after
+ With a cacheable TLS session, disconnect and reconnect after
delay seconds. Report whether the session is re-used. Retry if a
- new server is encountered, up to 5 times or as specified with
- the -m option. By default reconnection is disabled, specify a
+ new server is encountered, up to 5 times or as specified with
+ the -m option. By default reconnection is disabled, specify a
positive delay to enable this behavior.
-s servername
- The server name to send with the TLS Server Name Indication
- (SNI) extension. When the server has DANE TLSA records, this
- parameter is ignored and the TLSA base domain is used instead.
- Otherwise, SNI is not used by default, but can be enabled by
+ The server name to send with the TLS Server Name Indication
+ (SNI) extension. When the server has DANE TLSA records, this
+ parameter is ignored and the TLSA base domain is used instead.
+ Otherwise, SNI is not used by default, but can be enabled by
specifying the desired value with this option.
- -S Disable SMTP; that is, connect to an LMTP server. The default
- port for LMTP over TCP is 24. Alternative ports can specified
- by appending ":servicename" or ":portnumber" to the destination
+ -S Disable SMTP; that is, connect to an LMTP server. The default
+ port for LMTP over TCP is 24. Alternative ports can specified
+ by appending ":servicename" or ":portnumber" to the destination
argument.
-t timeout (default: 30)
@@ -287,7 +288,7 @@ POSTTLS-FINGER(1) POSTTLS-FINGER(1)
reading the remote server's 220 banner.
-T timeout (default: 30)
- The SMTP/LMTP command timeout for EHLO/LHLO, STARTTLS and QUIT.
+ The SMTP/LMTP command timeout for EHLO/LHLO, STARTTLS and QUIT.
-v Enable verbose Postfix logging. Specify more than once to
increase the level of verbose logging.
diff --git a/postfix/html/sendmail.1.html b/postfix/html/sendmail.1.html
index 02f20fe89..a83307fc6 100644
--- a/postfix/html/sendmail.1.html
+++ b/postfix/html/sendmail.1.html
@@ -45,24 +45,27 @@ SENDMAIL(1) SENDMAIL(1)
ery attempt will be made until the mail is taken off
hold.
- This mode of operation is implemented by executing the
+ # The message is forced to expire. See the postsuper(1)
+ options -e or -f.
+
+ This mode of operation is implemented by executing the
postqueue(1) command.
newaliases
- Initialize the alias database. If no input file is specified
- (with the -oA option, see below), the program processes the
- file(s) specified with the alias_database configuration parame-
- ter. If no alias database type is specified, the program uses
- the type specified with the default_database_type configuration
+ Initialize the alias database. If no input file is specified
+ (with the -oA option, see below), the program processes the
+ file(s) specified with the alias_database configuration parame-
+ ter. If no alias database type is specified, the program uses
+ the type specified with the default_database_type configuration
parameter. This mode of operation is implemented by running the
postalias(1) command.
Note: it may take a minute or so before an alias database update
- becomes visible. Use the "postfix reload" command to eliminate
+ becomes visible. Use the "postfix reload" command to eliminate
this delay.
- These and other features can be selected by specifying the appropriate
- combination of command-line options. Some features are controlled by
+ These and other features can be selected by specifying the appropriate
+ combination of command-line options. Some features are controlled by
parameters in the main.cf configuration file.
The following options are recognized:
@@ -70,13 +73,13 @@ SENDMAIL(1) SENDMAIL(1)
-Am (ignored)
-Ac (ignored)
- Postfix sendmail uses the same configuration file regardless of
+ Postfix sendmail uses the same configuration file regardless of
whether or not a message is an initial submission.
-B body_type
The message body MIME type: 7BIT or 8BITMIME.
- -bd Go into daemon mode. This mode of operation is implemented by
+ -bd Go into daemon mode. This mode of operation is implemented by
executing the "postfix start" command.
-bh (ignored)
@@ -86,8 +89,8 @@ SENDMAIL(1) SENDMAIL(1)
-bi Initialize alias database. See the newaliases command above.
- -bl Go into daemon mode. To accept only local connections as with
- Sendmail's -bl option, specify "inet_interfaces = loopback" in
+ -bl Go into daemon mode. To accept only local connections as with
+ Sendmail's -bl option, specify "inet_interfaces = loopback" in
the Postfix main.cf configuration file.
-bm Read mail from standard input and arrange for delivery. This is
@@ -95,17 +98,17 @@ SENDMAIL(1) SENDMAIL(1)
-bp List the mail queue. See the mailq command above.
- -bs Stand-alone SMTP server mode. Read SMTP commands from standard
- input, and write responses to standard output. In stand-alone
- SMTP server mode, mail relaying and other access controls are
- disabled by default. To enable them, run the process as the
+ -bs Stand-alone SMTP server mode. Read SMTP commands from standard
+ input, and write responses to standard output. In stand-alone
+ SMTP server mode, mail relaying and other access controls are
+ disabled by default. To enable them, run the process as the
mail_owner user.
- This mode of operation is implemented by running the smtpd(8)
+ This mode of operation is implemented by running the smtpd(8)
daemon.
- -bv Do not collect or deliver a message. Instead, send an email
- report after verifying each recipient address. This is useful
+ -bv Do not collect or deliver a message. Instead, send an email
+ report after verifying each recipient address. This is useful
for testing address rewriting and routing configurations.
This feature is available in Postfix version 2.1 and later.
@@ -113,58 +116,58 @@ SENDMAIL(1) SENDMAIL(1)
-C config_file
-C config_dir
- The path name of the Postfix main.cf file, or of its parent
- directory. This information is ignored with Postfix versions
+ The path name of the Postfix main.cf file, or of its parent
+ directory. This information is ignored with Postfix versions
before 2.3.
With Postfix version 3.2 and later, a non-default directory must
- be authorized in the default main.cf file, through the alter-
+ be authorized in the default main.cf file, through the alter-
nate_config_directories or multi_instance_directories parame-
ters.
- With all Postfix versions, you can specify a directory pathname
- with the MAIL_CONFIG environment variable to override the loca-
+ With all Postfix versions, you can specify a directory pathname
+ with the MAIL_CONFIG environment variable to override the loca-
tion of configuration files.
-F full_name
- Set the sender full name. This overrides the NAME environment
+ Set the sender full name. This overrides the NAME environment
variable, and is used only with messages that have no From: mes-
sage header.
-f sender
- Set the envelope sender address. This is the address where
+ Set the envelope sender address. This is the address where
delivery problems are sent to. With Postfix versions before 2.1,
- the Errors-To: message header overrides the error return
+ the Errors-To: message header overrides the error return
address.
- -G Gateway (relay) submission, as opposed to initial user submis-
- sion. Either do not rewrite addresses at all, or update incom-
- plete addresses with the domain information specified with
+ -G Gateway (relay) submission, as opposed to initial user submis-
+ sion. Either do not rewrite addresses at all, or update incom-
+ plete addresses with the domain information specified with
remote_header_rewrite_domain.
This option is ignored before Postfix version 2.3.
-h hop_count (ignored)
- Hop count limit. Use the hopcount_limit configuration parameter
+ Hop count limit. Use the hopcount_limit configuration parameter
instead.
-I Initialize alias database. See the newaliases command above.
- -i When reading a message from standard input, don't treat a line
+ -i When reading a message from standard input, don't treat a line
with only a . character as the end of input.
-L label (ignored)
- The logging label. Use the syslog_name configuration parameter
+ The logging label. Use the syslog_name configuration parameter
instead.
-m (ignored)
Backwards compatibility.
-N dsn (default: 'delay, failure')
- Delivery status notification control. Specify either a
+ Delivery status notification control. Specify either a
comma-separated list with one or more of failure (send notifica-
- tion when delivery fails), delay (send notification when deliv-
- ery is delayed), or success (send notification when the message
+ tion when delivery fails), delay (send notification when deliv-
+ ery is delayed), or success (send notification when the message
is delivered); or specify never (don't send any notifications at
all).
@@ -174,50 +177,50 @@ SENDMAIL(1) SENDMAIL(1)
Backwards compatibility.
-oAalias_database
- Non-default alias database. Specify pathname or type:pathname.
+ Non-default alias database. Specify pathname or type:pathname.
See postalias(1) for details.
-O option=value (ignored)
- Set the named option to value. Use the equivalent configuration
+ Set the named option to value. Use the equivalent configuration
parameter in main.cf instead.
-o7 (ignored)
-o8 (ignored)
- To send 8-bit or binary content, use an appropriate MIME encap-
+ To send 8-bit or binary content, use an appropriate MIME encap-
sulation and specify the appropriate -B command-line option.
- -oi When reading a message from standard input, don't treat a line
+ -oi When reading a message from standard input, don't treat a line
with only a . character as the end of input.
-om (ignored)
The sender is never eliminated from alias etc. expansions.
-o x value (ignored)
- Set option x to value. Use the equivalent configuration parame-
+ Set option x to value. Use the equivalent configuration parame-
ter in main.cf instead.
-r sender
- Set the envelope sender address. This is the address where
+ Set the envelope sender address. This is the address where
delivery problems are sent to. With Postfix versions before 2.1,
- the Errors-To: message header overrides the error return
+ the Errors-To: message header overrides the error return
address.
-R return
- Delivery status notification control. Specify "hdrs" to return
- only the header when a message bounces, "full" to return a full
+ Delivery status notification control. Specify "hdrs" to return
+ only the header when a message bounces, "full" to return a full
copy (the default behavior).
The -R option specifies an upper bound; Postfix will return only
- the header, when a full copy would exceed the bounce_size_limit
+ the header, when a full copy would exceed the bounce_size_limit
setting.
This option is ignored before Postfix version 2.10.
- -q Attempt to deliver all queued mail. This is implemented by exe-
+ -q Attempt to deliver all queued mail. This is implemented by exe-
cuting the postqueue(1) command.
- Warning: flushing undeliverable mail frequently will result in
+ Warning: flushing undeliverable mail frequently will result in
poor delivery performance of all other mail.
-qinterval (ignored)
@@ -226,21 +229,21 @@ SENDMAIL(1) SENDMAIL(1)
-qIqueueid
Schedule immediate delivery of mail with the specified queue ID.
- This option is implemented by executing the postqueue(1) com-
+ This option is implemented by executing the postqueue(1) com-
mand, and is available with Postfix version 2.4 and later.
-qRsite
- Schedule immediate delivery of all mail that is queued for the
- named site. This option accepts only site names that are eligi-
- ble for the "fast flush" service, and is implemented by execut-
+ Schedule immediate delivery of all mail that is queued for the
+ named site. This option accepts only site names that are eligi-
+ ble for the "fast flush" service, and is implemented by execut-
ing the postqueue(1) command. See flush(8) for more information
about the "fast flush" service.
-qSsite
- This command is not implemented. Use the slower "sendmail -q"
+ This command is not implemented. Use the slower "sendmail -q"
command instead.
- -t Extract recipients from message headers. These are added to any
+ -t Extract recipients from message headers. These are added to any
recipients specified on the command line.
With Postfix versions prior to 2.1, this option requires that no
@@ -256,23 +259,23 @@ SENDMAIL(1) SENDMAIL(1)
This feature is available in Postfix 2.3 and later.
-XV (Postfix 2.2 and earlier: -V)
- Variable Envelope Return Path. Given an envelope sender address
- of the form owner-listname@origin, each recipient user@domain
+ Variable Envelope Return Path. Given an envelope sender address
+ of the form owner-listname@origin, each recipient user@domain
receives mail with a personalized envelope sender address.
- By default, the personalized envelope sender address is
- owner-listname+user=domain@origin. The default + and = charac-
- ters are configurable with the default_verp_delimiters configu-
+ By default, the personalized envelope sender address is
+ owner-listname+user=domain@origin. The default + and = charac-
+ ters are configurable with the default_verp_delimiters configu-
ration parameter.
-XVxy (Postfix 2.2 and earlier: -Vxy)
- As -XV, but uses x and y as the VERP delimiter characters,
+ As -XV, but uses x and y as the VERP delimiter characters,
instead of the characters specified with the default_verp_delim-
iters configuration parameter.
-v Send an email report of the first delivery attempt (Postfix ver-
- sions 2.1 and later). Mail delivery always happens in the back-
- ground. When multiple -v options are given, enable verbose log-
+ sions 2.1 and later). Mail delivery always happens in the back-
+ ground. When multiple -v options are given, enable verbose log-
ging for debugging purposes.
-X log_file (ignored)
@@ -280,12 +283,42 @@ SENDMAIL(1) SENDMAIL(1)
configuration parameters instead.
SECURITY
- By design, this program is not set-user (or group) id. However, it must
- handle data from untrusted, possibly remote, users. Thus, the usual
- precautions need to be taken against malicious inputs.
+ By design, this program is not set-user (or group) id. It is prepared
+ to handle message content from untrusted, possibly remote, users.
+
+ However, like most Postfix programs, this program does not enforce a
+ security policy on its command-line arguments. Instead, it relies on
+ the UNIX system to enforce access policies based on the effective user
+ and group IDs of the process. Concretely, this means that running Post-
+ fix commands as root (from sudo or equivalent) on behalf of a non-root
+ user is likely to create privilege escalation opportunities.
+
+ If an application runs any Postfix programs on behalf of users that do
+ not have normal shell access to Postfix commands, then that application
+ MUST restrict user-specified command-line arguments to avoid privilege
+ escalation.
+
+ o Filter all command-line arguments, for example arguments that
+ contain a pathname or that specify a database access method.
+ These pathname checks must reject user-controlled symlinks or
+ hardlinks to sensitive files, and must not be vulnerable to TOC-
+ TOU race attacks.
+
+ o Disable command options processing for all command arguments
+ that contain user-specified data. For example, the Postfix send-
+ mail(1) command line MUST be structured as follows:
+
+ /path/to/sendmail system-arguments -- user-arguments
+
+ Here, the "--" disables command option processing for all
+ user-arguments that follow.
+
+ Without the "--", a malicious user could enable Postfix send-
+ mail(1) command options, by specifying an email address that
+ starts with "-".
DIAGNOSTICS
- Problems are logged to syslogd(8) or postlogd(8), and to the standard
+ Problems are logged to syslogd(8) or postlogd(8), and to the standard
error stream.
ENVIRONMENT
@@ -299,12 +332,12 @@ SENDMAIL(1) SENDMAIL(1)
Enable debugging with an external command, as specified with the
debugger_command configuration parameter.
- NAME The sender full name. This is used only with messages that have
+ NAME The sender full name. This is used only with messages that have
no From: message header. See also the -F option above.
CONFIGURATION PARAMETERS
- The following main.cf parameters are especially relevant to this pro-
- gram. The text below provides only a parameter summary. See post-
+ The following main.cf parameters are especially relevant to this pro-
+ gram. The text below provides only a parameter summary. See post-
conf(5) for more details including examples.
COMPATIBILITY CONTROLS
@@ -315,7 +348,7 @@ SENDMAIL(1) SENDMAIL(1)
line endings from <CR><LF> into UNIX format (<LF>).
TROUBLE SHOOTING CONTROLS
- The DEBUG_README file gives examples of how to troubleshoot a Postfix
+ The DEBUG_README file gives examples of how to troubleshoot a Postfix
system.
debugger_command (empty)
@@ -323,13 +356,15 @@ SENDMAIL(1) SENDMAIL(1)
invoked with the -D option.
debug_peer_level (2)
- The increment in verbose logging level when a remote client or
- server matches a pattern in the debug_peer_list parameter.
+ The increment in verbose logging level when a nexthop destina-
+ tion, remote client or server name or network address matches a
+ pattern given with the debug_peer_list parameter.
debug_peer_list (empty)
- Optional list of remote client or server hostname or network
- address patterns that cause the verbose logging level to
- increase by the amount specified in $debug_peer_level.
+ Optional list of nexthop destination, remote client or server
+ name or network address patterns that, if matched, cause the
+ verbose logging level to increase by the amount specified in
+ $debug_peer_level.
ACCESS CONTROLS
Available in Postfix version 2.2 and later:
@@ -341,13 +376,13 @@ SENDMAIL(1) SENDMAIL(1)
List of users who are authorized to view the queue.
authorized_submit_users (static:anyone)
- List of users who are authorized to submit mail with the send-
+ List of users who are authorized to submit mail with the send-
mail(1) command (and with the privileged postdrop(1) helper com-
mand).
RESOURCE AND RATE CONTROLS
bounce_size_limit (50000)
- The maximal amount of original message text that is sent in a
+ The maximal amount of original message text that is sent in a
non-delivery notification.
fork_attempts (5)
@@ -361,11 +396,11 @@ SENDMAIL(1) SENDMAIL(1)
in the primary message headers.
queue_run_delay (300s)
- The time between deferred queue scans by the queue manager;
+ The time between deferred queue scans by the queue manager;
prior to Postfix 2.4 the default value was 1000s.
FAST FLUSH CONTROLS
- The ETRN_README file describes configuration and operation details for
+ The ETRN_README file describes configuration and operation details for
the Postfix "fast flush" service.
fast_flush_domains ($relay_domains)
@@ -373,26 +408,26 @@ SENDMAIL(1) SENDMAIL(1)
tion logfiles with mail that is queued to those destinations.
VERP CONTROLS
- The VERP_README file describes configuration and operation details of
+ The VERP_README file describes configuration and operation details of
Postfix support for variable envelope return path addresses.
default_verp_delimiters (+=)
The two default VERP delimiter characters.
verp_delimiter_filter (-=+)
- The characters Postfix accepts as VERP delimiter characters on
+ The characters Postfix accepts as VERP delimiter characters on
the Postfix sendmail(1) command line and in SMTP commands.
MISCELLANEOUS CONTROLS
alias_database (see 'postconf -d' output)
- The alias databases for local(8) delivery that are updated with
+ The alias databases for local(8) delivery that are updated with
"newaliases" or with "sendmail -bi".
command_directory (see 'postconf -d' output)
The location of all postfix administrative commands.
config_directory (see 'postconf -d' output)
- The default location of the Postfix main.cf and master.cf con-
+ The default location of the Postfix main.cf and master.cf con-
figuration files.
daemon_directory (see 'postconf -d' output)
@@ -403,46 +438,46 @@ SENDMAIL(1) SENDMAIL(1)
and postmap(1) commands.
delay_warning_time (0h)
- The time after which the sender receives a copy of the message
+ The time after which the sender receives a copy of the message
headers of mail that is still queued.
import_environment (see 'postconf -d' output)
- The list of environment parameters that a privileged Postfix
- process will import from a non-Postfix parent process, or
+ The list of environment parameters that a privileged Postfix
+ process will import from a non-Postfix parent process, or
name=value environment overrides.
mail_owner (postfix)
- The UNIX system account that owns the Postfix queue and most
+ The UNIX system account that owns the Postfix queue and most
Postfix daemon processes.
queue_directory (see 'postconf -d' output)
The location of the Postfix top-level queue directory.
remote_header_rewrite_domain (empty)
- Don't rewrite message headers from remote clients at all when
- this parameter is empty; otherwise, rewrite message headers and
+ Don't rewrite message headers from remote clients at all when
+ this parameter is empty; otherwise, rewrite message headers and
append the specified domain name to incomplete addresses.
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
+ A prefix that is prepended to the process name in syslog
records, so that, for example, "smtpd" becomes "prefix/smtpd".
Postfix 3.2 and later:
alternate_config_directories (empty)
A list of non-default Postfix configuration directories that may
- be specified with "-c config_directory" on the command line (in
- the case of sendmail(1), with the "-C" option), or via the
+ be specified with "-c config_directory" on the command line (in
+ the case of sendmail(1), with the "-C" option), or via the
MAIL_CONFIG environment parameter.
multi_instance_directories (empty)
- An optional list of non-default Postfix configuration directo-
- ries; these directories belong to additional Postfix instances
- that share the Postfix executable files and documentation with
- the default Postfix instance, and that are started, stopped,
+ An optional list of non-default Postfix configuration directo-
+ ries; these directories belong to additional Postfix instances
+ that share the Postfix executable files and documentation with
+ the default Postfix instance, and that are started, stopped,
etc., together with the default Postfix instance.
FILES
@@ -463,7 +498,7 @@ SENDMAIL(1) SENDMAIL(1)
syslogd(8), system logging
README_FILES
- Use "postconf readme_directory" or "postconf html_directory" to locate
+ Use "postconf readme_directory" or "postconf html_directory" to locate
this information.
DEBUG_README, Postfix debugging howto
ETRN_README, Postfix ETRN howto
diff --git a/postfix/html/smtp.8.html b/postfix/html/smtp.8.html
index f79f4e04e..3c20579ef 100644
--- a/postfix/html/smtp.8.html
+++ b/postfix/html/smtp.8.html
@@ -567,7 +567,7 @@ SMTP(8) SMTP(8)
for the "fingerprint" TLS security level (smtp_tls_secu-
rity_level = fingerprint).
- smtp_tls_fingerprint_digest (md5)
+ smtp_tls_fingerprint_digest (see 'postconf -d' output)
The message digest algorithm used to construct remote SMTP
server certificate fingerprints.
@@ -826,12 +826,12 @@ SMTP(8) SMTP(8)
TROUBLE SHOOTING CONTROLS
debug_peer_level (2)
- The increment in verbose logging level when a next-hop destina-
+ The increment in verbose logging level when a nexthop destina-
tion, remote client or server name or network address matches a
pattern given with the debug_peer_list parameter.
debug_peer_list (empty)
- Optional list of next-hop destination, remote client or server
+ Optional list of nexthop destination, remote client or server
name or network address patterns that, if matched, cause the
verbose logging level to increase by the amount specified in
$debug_peer_level.
diff --git a/postfix/html/smtpd.8.html b/postfix/html/smtpd.8.html
index b81b864cd..1258376b7 100644
--- a/postfix/html/smtpd.8.html
+++ b/postfix/html/smtpd.8.html
@@ -516,7 +516,7 @@ SMTPD(8) SMTPD(8)
Available in Postfix version 2.5 and later:
- smtpd_tls_fingerprint_digest (md5)
+ smtpd_tls_fingerprint_digest (see 'postconf -d' output)
The message digest algorithm to construct remote SMTP
client-certificate fingerprints or public key fingerprints
(Postfix 2.9 and later) for check_ccert_access and per-
@@ -675,13 +675,15 @@ SMTPD(8) SMTPD(8)
or debugger.
debug_peer_level (2)
- The increment in verbose logging level when a remote client or
- server matches a pattern in the debug_peer_list parameter.
+ The increment in verbose logging level when a nexthop destina-
+ tion, remote client or server name or network address matches a
+ pattern given with the debug_peer_list parameter.
debug_peer_list (empty)
- Optional list of remote client or server hostname or network
- address patterns that cause the verbose logging level to
- increase by the amount specified in $debug_peer_level.
+ Optional list of nexthop destination, remote client or server
+ name or network address patterns that, if matched, cause the
+ verbose logging level to increase by the amount specified in
+ $debug_peer_level.
error_notice_recipient (postmaster)
The recipient of postmaster notifications about mail delivery
diff --git a/postfix/man/man1/posttls-finger.1 b/postfix/man/man1/posttls-finger.1
index 9529c20c1..93995eed6 100644
--- a/postfix/man/man1/posttls-finger.1
+++ b/postfix/man/man1/posttls-finger.1
@@ -102,11 +102,12 @@ certificate block. If you specify \fB\-F \fICAfile\fR or
\fB\-P \fICApath\fR, the OpenSSL library may augment the chain with
missing issuer certificates. To see the actual chain sent by the
remote SMTP server leave \fICAfile\fR and \fICApath\fR unset.
-.IP "\fB\-d \fImdalg\fR (default: \fBsha1\fR)"
+.IP "\fB\-d \fImdalg\fR (default: \fB$smtp_tls_fingerprint_digest\fR)"
The message digest algorithm to use for reporting remote SMTP server
fingerprints and matching against user provided certificate
fingerprints (with DANE TLSA records the algorithm is specified
-in the DNS).
+in the DNS). In Postfix versions prior to 3.6, the default value
+was "sha1".
.IP "\fB\-f\fR"
Lookup the associated DANE TLSA RRset even when a hostname is not an
alias and its address records lie in an unsigned zone. See
diff --git a/postfix/man/man1/sendmail.1 b/postfix/man/man1/sendmail.1
index e52861b1b..3722a1787 100644
--- a/postfix/man/man1/sendmail.1
+++ b/postfix/man/man1/sendmail.1
@@ -45,6 +45,9 @@ selected for delivery.
.IP \fB!\fR
The message is in the \fBhold\fR queue, i.e. no further delivery
attempt will be made until the mail is taken off hold.
+.IP \fB#\fR
+The message is forced to expire. See the \fBpostsuper\fR(1)
+options \fB\-e\fR or \fB\-f\fR.
.RE
.IP
This mode of operation is implemented by executing the
@@ -258,10 +261,43 @@ Log mailer traffic. Use the \fBdebug_peer_list\fR and
.nf
.ad
.fi
-By design, this program is not set\-user (or group) id. However,
-it must handle data from untrusted, possibly remote, users.
-Thus, the usual precautions need to be taken against malicious
-inputs.
+By design, this program is not set\-user (or group) id.
+It is prepared to handle message content from untrusted,
+possibly remote, users.
+
+However, like most Postfix programs, this program does not
+enforce a security policy on its command\-line arguments.
+Instead, it relies on the UNIX system to enforce access
+policies based on the effective user and group IDs of the
+process. Concretely, this means that running Postfix commands
+as root (from sudo or equivalent) on behalf of a non\-root
+user is likely to create privilege escalation opportunities.
+
+If an application runs any Postfix programs on behalf of
+users that do not have normal shell access to Postfix
+commands, then that application MUST restrict user\-specified
+command\-line arguments to avoid privilege escalation.
+.IP \(bu
+Filter all command\-line arguments, for example arguments
+that contain a pathname or that specify a database access
+method. These pathname checks must reject user\-controlled
+symlinks or hardlinks to sensitive files, and must not be
+vulnerable to TOCTOU race attacks.
+.IP \(bu
+Disable command options processing for all command arguments
+that contain user\-specified data. For example, the Postfix
+\fBsendmail\fR(1) command line MUST be structured as follows:
+
+.nf
+ \fB/path/to/sendmail\fR \fIsystem\-arguments\fR \fB\-\-\fR \fIuser\-arguments\fR
+.fi
+
+Here, the "\fB\-\-\fR" disables command option processing for
+all \fIuser\-arguments\fR that follow.
+.IP
+Without the "\fB\-\-\fR", a malicious user could enable Postfix
+\fBsendmail\fR(1) command options, by specifying an email
+address that starts with "\fB\-\fR".
.SH DIAGNOSTICS
.ad
.fi
@@ -312,12 +348,13 @@ Postfix system.
The external command to execute when a Postfix daemon program is
invoked with the \-D option.
.IP "\fBdebug_peer_level (2)\fR"
-The increment in verbose logging level when a remote client or
-server matches a pattern in the debug_peer_list parameter.
+The increment in verbose logging level when a nexthop destination,
+remote client or server name or network address matches a pattern
+given with the debug_peer_list parameter.
.IP "\fBdebug_peer_list (empty)\fR"
-Optional list of remote client or server hostname or network
-address patterns that cause the verbose logging level to increase
-by the amount specified in $debug_peer_level.
+Optional list of nexthop destination, remote client or server
+name or network address patterns that, if matched, cause the verbose
+logging level to increase by the amount specified in $debug_peer_level.
.SH "ACCESS CONTROLS"
.na
.nf
diff --git a/postfix/man/man5/postconf.5 b/postfix/man/man5/postconf.5
index db912da01..9f7e8a782 100644
--- a/postfix/man/man5/postconf.5
+++ b/postfix/man/man5/postconf.5
@@ -3212,7 +3212,7 @@ The LMTP\-specific version of the smtp_tls_fingerprint_cert_match
configuration parameter. See there for details.
.PP
This feature is available in Postfix 2.5 and later.
-.SH lmtp_tls_fingerprint_digest (default: md5)
+.SH lmtp_tls_fingerprint_digest (default: see "postconf \-d" output)
The LMTP\-specific version of the smtp_tls_fingerprint_digest
configuration parameter. See there for details.
.PP
@@ -3412,6 +3412,15 @@ The fingerprint digest algorithm is configurable via the
smtpd_tls_fingerprint_digest parameter (hard\-coded as md5 prior to
Postfix version 2.5).
.br
+The default algorithm is \fBsha256\fR with Postfix >= 3.6
+and the \fBcompatibility_level\fR set to 3 or higher. With Postfix
+<= 3.5, the default algorithm is \fBmd5\fR. The best\-practice
+algorithm is now \fBsha256\fR. Recent advances in hash function
+cryptanalysis have led to md5 and sha1 being deprecated in favor of
+sha256. However, as long as there are no known "second pre\-image"
+attacks against the older algorithms, their use in this context, though
+not recommended, is still likely safe.
+.br
.IP "\fBpermit_tls_all_clientcerts \fR"
Append the domain name in $myorigin or $mydomain when the
remote SMTP client TLS certificate is successfully verified, regardless of
@@ -5910,6 +5919,15 @@ feature. The fingerprint digest algorithm is configurable via the
smtpd_tls_fingerprint_digest parameter (hard\-coded as md5 prior to
Postfix version 2.5).
.PP
+The default algorithm is \fBsha256\fR with Postfix >= 3.6
+and the \fBcompatibility_level\fR set to 3 or higher. With Postfix
+<= 3.5, the default algorithm is \fBmd5\fR. The best\-practice
+algorithm is now \fBsha256\fR. Recent advances in hash function
+cryptanalysis have led to md5 and sha1 being deprecated in favor of
+sha256. However, as long as there are no known "second pre\-image"
+attacks against the older algorithms, their use in this context, though
+not recommended, is still likely safe.
+.PP
Postfix lookup tables are in the form of (key, value) pairs.
Since we only need the key, the value can be chosen freely, e.g.
the name of the user or host:
@@ -5929,10 +5947,6 @@ For more fine\-grained control, use check_ccert_access to select
an appropriate \fBaccess\fR(5) policy for each client.
See RESTRICTION_CLASS_README.
.PP
-\fBNote:\fR Postfix 2.9.0-2.9.5 computed the public key
-fingerprint incorrectly. To use public\-key fingerprints, upgrade
-to Postfix 2.9.6 or later.
-.PP
This feature is available with Postfix version 2.2.
.SH relay_destination_concurrency_limit (default: $default_destination_concurrency_limit)
The maximal number of parallel deliveries to the same destination
@@ -8079,6 +8093,10 @@ is a message digest of the server certificate (or public key). The
digest algorithm is selected via the \fBsmtp_tls_fingerprint_digest\fR
parameter.
.PP
+The colons between each pair of nibbles in the fingerprint value
+are optional (Postfix >= 3.6). These were required in earlier
+Postfix releases.
+.PP
When an \fBsmtp_tls_policy_maps\fR table entry specifies the
"fingerprint" security level, any "match" attributes in that entry specify
the list of valid fingerprints for the corresponding destination. Multiple
@@ -8098,10 +8116,10 @@ another, and both keys are trusted just prior to the transition.
.ft C
relayhost = [mailhub.example.com]
smtp_tls_security_level = fingerprint
-smtp_tls_fingerprint_digest = md5
+smtp_tls_fingerprint_digest = sha256
smtp_tls_fingerprint_cert_match =
- 3D:95:34:51:24:66:33:B9:D2:40:99:C0:C1:17:0B:D1
- EC:3B:2D:B0:5B:B1:FB:6D:20:A3:9D:72:F6:8D:12:35
+ cd:fc:d8:db:f8:c4:82:96:6c:...:28:71:e8:f5:8d:a5:0d:9b:d4:a6
+ dd:5c:ef:f5:c3:bc:64:25:36:...:99:36:06:ce:40:ef:de:2e:ad:a4
.fi
.ad
.ft R
@@ -8116,7 +8134,7 @@ As in the example above, we show two matching fingerprints:
.ft C
/etc/postfix/main.cf:
smtp_tls_policy_maps = hash:/etc/postfix/tls_policy
- smtp_tls_fingerprint_digest = md5
+ smtp_tls_fingerprint_digest = sha256
.fi
.ad
.ft R
@@ -8128,15 +8146,15 @@ As in the example above, we show two matching fingerprints:
.ft C
/etc/postfix/tls_policy:
example.com fingerprint
- match=3D:95:34:51:24:66:33:B9:D2:40:99:C0:C1:17:0B:D1
- match=EC:3B:2D:B0:5B:B1:FB:6D:20:A3:9D:72:F6:8D:12:35
+ match=51:e9:af:2e:1e:40:1f:...:64:0a:30:35:2d:09:16:31:5a:eb:82:76
+ match=b6:b4:72:34:e2:59:cd:...:c2:ca:63:0d:4d:cc:2c:7d:84:de:e6:2f
.fi
.ad
.ft R
.in -4
.PP
This feature is available in Postfix 2.5 and later.
-.SH smtp_tls_fingerprint_digest (default: md5)
+.SH smtp_tls_fingerprint_digest (default: see "postconf \-d" output)
The message digest algorithm used to construct remote SMTP server
certificate fingerprints. At the "fingerprint" TLS security level
(\fBsmtp_tls_security_level\fR = fingerprint), the server certificate is
@@ -8148,18 +8166,19 @@ algorithm. With a digest algorithm resistant to "second pre\-image"
attacks, it is not feasible to create a new public key and a matching
certificate (or public/private key\-pair) that has the same fingerprint.
.PP
-The default algorithm is \fBmd5\fR; this is consistent with
-the backwards compatible setting of the digest used to verify client
-certificates in the SMTP server.
+The default algorithm is \fBsha256\fR with Postfix >= 3.6
+and the \fBcompatibility_level\fR set to 3 or higher. With Postfix
+<= 3.5, the default algorithm is \fBmd5\fR.
.PP
-The best practice algorithm is now \fBsha1\fR. Recent advances in hash
-function cryptanalysis have led to md5 being deprecated in favor of sha1.
-However, as long as there are no known "second pre\-image" attacks
-against md5, its use in this context can still be considered safe.
+The best\-practice algorithm is now \fBsha256\fR. Recent advances in hash
+function cryptanalysis have led to md5 and sha1 being deprecated in favor of
+sha256. However, as long as there are no known "second pre\-image" attacks
+against the older algorithms, their use in this context, though not
+recommended, is still likely safe.
.PP
While additional digest algorithms are often available with OpenSSL's
libcrypto, only those used by libssl in SSL cipher suites are available to
-Postfix. For now this means just md5 or sha1.
+Postfix. You'll likely find support for md5, sha1, sha256 and sha512.
.PP
To find the fingerprint of a specific certificate file, with a
specific digest algorithm, run:
@@ -8181,8 +8200,8 @@ For example:
.nf
.na
.ft C
-$ openssl x509 \-noout \-fingerprint \-sha1 \-in cert.pem
-SHA1 Fingerprint=D4:6A:AB:19:24:79:F8:32:BB:A6:CB:66:82:C0:8E:9B:EE:29:A8:1A
+$ openssl x509 \-noout \-fingerprint \-sha256 \-in cert.pem
+SHA256 Fingerprint=D4:6A:AB:19:24:...:BB:A6:CB:66:82:C0:8E:9B:EE:29:A8:1A
.fi
.ad
.ft R
@@ -8196,36 +8215,19 @@ key always in "PEM" format. We pipe the result to another OpenSSL
command that converts the key to DER and then to the "dgst" command
to compute the fingerprint.
.PP
-The actual command to transform the key to DER format depends
-on the version of OpenSSL used. With OpenSSL 1.0.0 and later, the
-"pkey" command supports all key types. With OpenSSL 0.9.8 and
-earlier, the key type is always RSA (nobody uses DSA, and EC
-keys are not fully supported by 0.9.8), so the "rsa" command is
-used.
+The actual command to transform the key to DER format depends on the
+version of OpenSSL used. As of OpenSSL 1.0.0, the "pkey" command supports
+all key types.
.sp
.in +4
.nf
.na
.ft C
-# OpenSSL 1.0 with all certificates and SHA\-1 fingerprints.
+# OpenSSL >= 1.0 with SHA\-256 fingerprints.
$ openssl x509 \-in cert.pem \-noout \-pubkey |
openssl pkey \-pubin \-outform DER |
- openssl dgst \-sha1 \-c
-(stdin)= 64:3f:1f:f6:e5:1e:d4:2a:56:8b:fc:09:1a:61:98:b5:bc:7c:60:58
-.fi
-.ad
-.ft R
-.in -4
-.sp
-.in +4
-.nf
-.na
-.ft C
-# OpenSSL 0.9.8 with RSA certificates and MD5 fingerprints.
-$ openssl x509 \-in cert.pem \-noout \-pubkey |
- openssl rsa \-pubin \-outform DER |
- openssl dgst \-md5 \-c
-(stdin)= f4:62:60:f6:12:8f:d5:8d:28:4d:13:a7:db:b2:ff:50
+ openssl dgst \-sha256 \-c
+(stdin)= 64:3f:1f:f6:e5:1e:d4:2a:56:...:fc:09:1a:61:98:b5:bc:7c:60:58
.fi
.ad
.ft R
@@ -8235,10 +8237,6 @@ The Postfix SMTP server and client log the peer (leaf) certificate
fingerprint and public key fingerprint when the TLS loglevel is 2 or
higher.
.PP
-\fBNote:\fR Postfix 2.9.0-2.9.5 computed the public key
-fingerprint incorrectly. To use public\-key fingerprints, upgrade
-to Postfix 2.9.6 or later.
-.PP
This feature is available in Postfix 2.5 and later.
.SH smtp_tls_force_insecure_host_tlsa_lookup (default: no)
Lookup the associated DANE TLSA RRset even when a hostname is
@@ -8682,8 +8680,12 @@ Example:
.ft C
/etc/postfix/main.cf:
smtp_tls_policy_maps = hash:/etc/postfix/tls_policy
- # Postfix 2.5 and later
- smtp_tls_fingerprint_digest = md5
+ # Postfix 2.5 and later.
+ #
+ # The default digest is sha256 with Postfix >= 3.6 and
+ # compatibility level >= 3.
+ #
+ smtp_tls_fingerprint_digest = sha256
.fi
.ad
.ft R
@@ -8701,8 +8703,8 @@ Example:
[mail.example.org]:587 secure match=nexthop
# Postfix 2.5 and later
[thumb.example.org] fingerprint
- match=EC:3B:2D:B0:5B:B1:FB:6D:20:A3:9D:72:F6:8D:12:35
- match=3D:95:34:51:24:66:33:B9:D2:40:99:C0:C1:17:0B:D1
+ match=b6:b4:72:34:e2:59:cd:...:c2:ca:63:0d:4d:cc:2c:7d:84:de:e6:2f
+ match=51:e9:af:2e:1e:40:1f:...:64:0a:30:35:2d:09:16:31:5a:eb:82:76
.fi
.ad
.ft R
@@ -9532,6 +9534,14 @@ Postfix version 2.5). This feature requires "smtpd_tls_ask_ccert
= yes" and is available with Postfix version
2.2 and later.
.br
+The default algorithm is \fBsha256\fR with Postfix >= 3.6
+and the \fBcompatibility_level\fR set to 3 or higher. With Postfix
+<= 3.5, the default algorithm is \fBmd5\fR. The best\-practice
+algorithm is now \fBsha256\fR. Recent advances in hash function
+cryptanalysis have led to md5 and sha1 being deprecated in favor of
+sha256. However, as long as there are no known "second pre\-image"
+attacks against the older algorithms, their use in this context, though
+not recommended, is still likely safe.
.br
Alternatively, check_ccert_access accepts an explicit search
order (Postfix 3.5 and later). The default search order as described
@@ -9639,6 +9649,15 @@ smtpd_tls_fingerprint_digest parameter (hard\-coded as md5 prior to
Postfix version 2.5). This feature requires "smtpd_tls_ask_ccert
= yes" and is available with Postfix version 2.2 and later.
.br
+The default algorithm is \fBsha256\fR with Postfix >= 3.6
+and the \fBcompatibility_level\fR set to 3 or higher. With Postfix
+<= 3.5, the default algorithm is \fBmd5\fR. The best\-practice
+algorithm is now \fBsha256\fR. Recent advances in hash function
+cryptanalysis have led to md5 and sha1 being deprecated in favor of
+sha256. However, as long as there are no known "second pre\-image"
+attacks against the older algorithms, their use in this context, though
+not recommended, is still likely safe.
+.br
.IP "\fBreject_rbl_client \fIrbl_domain=d.d.d.d\fR\fR"
Reject the request when the reversed client network address is
listed with the A record "\fId.d.d.d\fR" under \fIrbl_domain\fR
@@ -11852,6 +11871,13 @@ This feature is available in Postfix 2.2 and later.
File with DH parameters that the Postfix SMTP server should
use with non\-export EDH ciphers.
.PP
+The best\-practice choice of parameters uses a 2048\-bit prime. This is fine,
+despite the historical "1024" in the parameter name. Do not be tempted to use
+much larger values, performance degrades quickly, and you may also cease to
+interoperate with some mainstream SMTP clients. As of Postfix 3.1, the
+compiled\-in default prime is 2048\-bits, and it is not strictly necessary,
+though perhaps somewhat beneficial to generate custom DH parameters.
+.PP
Instead of using the exact same parameter sets as distributed
with other TLS packages, it is more secure to generate your own
set of parameters with something like the following commands:
@@ -11860,9 +11886,11 @@ set of parameters with something like the following commands:
.nf
.na
.ft C
-openssl dhparam \-out /etc/postfix/dh512.pem 512
-openssl dhparam \-out /etc/postfix/dh1024.pem 1024
openssl dhparam \-out /etc/postfix/dh2048.pem 2048
+openssl dhparam \-out /etc/postfix/dh1024.pem 1024
+# As of Postfix 3.6, export\-grade 512\-bit DH parameters are no longer
+# supported or needed.
+openssl dhparam \-out /etc/postfix/dh512.pem 512
.fi
.ad
.ft R
@@ -11897,6 +11925,9 @@ use with export\-grade EDH ciphers. The default SMTP server cipher
grade is "medium" with Postfix releases after the middle of 2015,
and as a result export\-grade cipher suites are by default not used.
.PP
+With Postfix >= 3.6 export\-grade Diffie\-Hellman key exchange
+is no longer supported, and this parameter is silently ignored.
+.PP
See also the discussion under the smtpd_tls_dh1024_param_file
configuration parameter.
.PP
@@ -11959,32 +11990,32 @@ This feature is available in Postfix 2.6 and later, when Postfix is
compiled and linked with OpenSSL 1.0.0 or later.
.SH smtpd_tls_eecdh_grade (default: see "postconf \-d" output)
The Postfix SMTP server security grade for ephemeral elliptic\-curve
-Diffie\-Hellman (EECDH) key exchange.
+Diffie\-Hellman (EECDH) key exchange. As of Postfix 3.6, the value of
+this parameter is always ignored, and Postfix behaves as though th
+\fBauto\fR value (described below) was chosen.
.PP
The available choices are:
+.IP "\fBauto\fR"
+Use the most preferred curve that is
+supported by both the client and the server. This setting requires
+Postfix >= 3.2 compiled and linked with OpenSSL >= 1.0.2. This
+is the default setting under the above conditions (and the only
+setting used with Postfix >= 3.6).
+.br
.IP "\fBnone\fR"
Don't use EECDH. Ciphers based on EECDH key
exchange will be disabled. This is the default in Postfix versions
2.6 and 2.7.
.br
.IP "\fBstrong\fR"
-Use EECDH with approximately 128
-bits of security at a reasonable computational cost. This is the
-current best\-practice trade\-off between security and computational
-efficiency. This is the default in Postfix version 2.8 and later.
+Use EECDH with approximately 128 bits of
+security at a reasonable computational cost. This is the default in
+Postfix versions 2.8-3.5.
.br
.IP "\fBultra\fR"
Use EECDH with approximately 192 bits of
security at computational cost that is approximately twice as high
-as 128 bit strength ECC. Barring significant progress in attacks on
-elliptic curve crypto\-systems, the "strong" curve is sufficient for most
-users.
-.br
-.IP "\fBauto\fR"
-Use the most preferred curve that is
-supported by both the client and the server. This setting requires
-Postfix >= 3.2 compiled and linked with OpenSSL >= 1.0.2. This
-is the default setting under the above conditions.
+as 128 bit strength ECC.
.br
.br
.PP
@@ -12032,22 +12063,24 @@ and "DES\-CBC3\-MD5". The last setting disables ciphers that use "EDH"
key exchange with RSA authentication.
.PP
This feature is available in Postfix 2.3 and later.
-.SH smtpd_tls_fingerprint_digest (default: md5)
-The message digest algorithm to construct remote SMTP
-client\-certificate
-fingerprints or public key fingerprints (Postfix 2.9 and later)
-for \fBcheck_ccert_access\fR and \fBpermit_tls_clientcerts\fR. The
-default algorithm is \fBmd5\fR, for backwards compatibility with Postfix
-releases prior to 2.5.
+.SH smtpd_tls_fingerprint_digest (default: see "postconf \-d" output)
+The message digest algorithm to construct remote SMTP client\-certificate
+fingerprints or public key fingerprints (Postfix 2.9 and later) for
+\fBcheck_ccert_access\fR and \fBpermit_tls_clientcerts\fR.
+.PP
+The default algorithm is \fBsha256\fR with Postfix >= 3.6
+and the \fBcompatibility_level\fR set to 3 or higher. With Postfix
+<= 3.5, the default algorithm is \fBmd5\fR.
.PP
-Advances in hash
-function cryptanalysis have led to md5 being deprecated in favor of sha1.
-However, as long as there are no known "second pre\-image" attacks
-against md5, its use in this context can still be considered safe.
+The best\-practice algorithm is now \fBsha256\fR. Recent advances in hash
+function cryptanalysis have led to md5 and sha1 being deprecated in favor of
+sha256. However, as long as there are no known "second pre\-image" attacks
+against the older algorithms, their use in this context, though not
+recommended, is still likely safe.
.PP
While additional digest algorithms are often available with OpenSSL's
libcrypto, only those used by libssl in SSL cipher suites are available to
-Postfix.
+Postfix. You'll likely find support for md5, sha1, sha256 and sha512.
.PP
To find the fingerprint of a specific certificate file, with a
specific digest algorithm, run:
@@ -12069,8 +12102,8 @@ For example:
.nf
.na
.ft C
-$ openssl x509 \-noout \-fingerprint \-sha1 \-in cert.pem
-SHA1 Fingerprint=D4:6A:AB:19:24:79:F8:32:BB:A6:CB:66:82:C0:8E:9B:EE:29:A8:1A
+$ openssl x509 \-noout \-fingerprint \-sha256 \-in cert.pem
+SHA256 Fingerprint=D4:6A:AB:19:24:...:A6:CB:66:82:C0:8E:9B:EE:29:A8:1A
.fi
.ad
.ft R
@@ -12084,57 +12117,33 @@ key always in "PEM" format. We pipe the result to another OpenSSL
command that converts the key to DER and then to the "dgst" command
to compute the fingerprint.
.PP
-The actual command to transform the key to DER format depends
-on the version of OpenSSL used. With OpenSSL 1.0.0 and later, the
-"pkey" command supports all key types. With OpenSSL 0.9.8 and
-earlier, the key type is always RSA (nobody uses DSA, and EC
-keys are not fully supported by 0.9.8), so the "rsa" command is
-used.
+Example:
.sp
.in +4
.nf
.na
.ft C
-# OpenSSL 1.0 with all certificates and SHA\-1 fingerprints.
$ openssl x509 \-in cert.pem \-noout \-pubkey |
openssl pkey \-pubin \-outform DER |
- openssl dgst \-sha1 \-c
+ openssl dgst \-sha256 \-c
(stdin)= 64:3f:1f:f6:e5:1e:d4:2a:56:8b:fc:09:1a:61:98:b5:bc:7c:60:58
.fi
.ad
.ft R
.in -4
-.sp
-.in +4
-.nf
-.na
-.ft C
-# OpenSSL 0.9.8 with RSA certificates and MD5 fingerprints.
-$ openssl x509 \-in cert.pem \-noout \-pubkey |
- openssl rsa \-pubin \-outform DER |
- openssl dgst \-md5 \-c
-(stdin)= f4:62:60:f6:12:8f:d5:8d:28:4d:13:a7:db:b2:ff:50
-.fi
-.ad
-.ft R
-.in -4
.PP
The Postfix SMTP server and client log the peer (leaf) certificate
fingerprint and public key fingerprint when the TLS loglevel is 2 or
higher.
.PP
-\fBNote:\fR Postfix 2.9.0-2.9.5 computed the public key
-fingerprint incorrectly. To use public\-key fingerprints, upgrade
-to Postfix 2.9.6 or later.
-.PP
-Example: client\-certificate access table, with sha1 fingerprints:
+Example: client\-certificate access table, with sha256 fingerprints:
.sp
.in +4
.nf
.na
.ft C
/etc/postfix/main.cf:
- smtpd_tls_fingerprint_digest = sha1
+ smtpd_tls_fingerprint_digest = sha256
smtpd_client_restrictions =
check_ccert_access hash:/etc/postfix/access,
reject
@@ -12146,9 +12155,9 @@ Example: client\-certificate access table, with sha1 fingerprints:
.ft C
/etc/postfix/access:
# Action folded to next line...
- AF:88:7C:AD:51:95:6F:36:96:F6:01:FB:2E:48:CD:AB:49:25:A2:3B
+ AF:88:7C:AD:51:95:6F:36:96:...:01:FB:2E:48:CD:AB:49:25:A2:3B
OK
- 85:16:78:FD:73:6E:CE:70:E0:31:5F:0D:3C:C8:6D:C4:2C:24:59:E1
+ 85:16:78:FD:73:6E:CE:70:E0:...:5F:0D:3C:C8:6D:C4:2C:24:59:E1
permit_auth_destination
.fi
.ad
@@ -13551,6 +13560,9 @@ for further details. The default SMTP server cipher grade is
"medium" with Postfix releases after the middle of 2015, and as a
result export\-grade cipher suites are by default not used.
.PP
+With Postfix >= 3.6 export\-grade Diffie\-Hellman key exchange
+is no longer supported, and this parameter is silently ignored.
+.PP
This feature is available in Postfix 2.8 and later.
.SH tlsproxy_tls_dkey_file (default: $smtpd_tls_dkey_file)
File with the Postfix \fBtlsproxy\fR(8) server DSA private key in PEM
diff --git a/postfix/man/man8/smtp.8 b/postfix/man/man8/smtp.8
index 1aaae63d3..697f0f653 100644
--- a/postfix/man/man8/smtp.8
+++ b/postfix/man/man8/smtp.8
@@ -527,7 +527,7 @@ Available in Postfix version 2.5 and later:
List of acceptable remote SMTP server certificate fingerprints for
the "fingerprint" TLS security level (\fBsmtp_tls_security_level\fR =
fingerprint).
-.IP "\fBsmtp_tls_fingerprint_digest (md5)\fR"
+.IP "\fBsmtp_tls_fingerprint_digest (see 'postconf -d' output)\fR"
The message digest algorithm used to construct remote SMTP server
certificate fingerprints.
.PP
@@ -744,11 +744,11 @@ used for DNS lookups.
.ad
.fi
.IP "\fBdebug_peer_level (2)\fR"
-The increment in verbose logging level when a next\-hop destination,
+The increment in verbose logging level when a nexthop destination,
remote client or server name or network address matches a pattern
given with the debug_peer_list parameter.
.IP "\fBdebug_peer_list (empty)\fR"
-Optional list of next\-hop destination, remote client or server
+Optional list of nexthop destination, remote client or server
name or network address patterns that, if matched, cause the verbose
logging level to increase by the amount specified in $debug_peer_level.
.IP "\fBerror_notice_recipient (postmaster)\fR"
diff --git a/postfix/man/man8/smtpd.8 b/postfix/man/man8/smtpd.8
index d7f65af09..b646af00e 100644
--- a/postfix/man/man8/smtpd.8
+++ b/postfix/man/man8/smtpd.8
@@ -470,11 +470,10 @@ The OpenSSL cipherlist for "NULL" grade ciphers that provide
authentication without encryption.
.PP
Available in Postfix version 2.5 and later:
-.IP "\fBsmtpd_tls_fingerprint_digest (md5)\fR"
-The message digest algorithm to construct remote SMTP
-client\-certificate
-fingerprints or public key fingerprints (Postfix 2.9 and later)
-for \fBcheck_ccert_access\fR and \fBpermit_tls_clientcerts\fR.
+.IP "\fBsmtpd_tls_fingerprint_digest (see 'postconf -d' output)\fR"
+The message digest algorithm to construct remote SMTP client\-certificate
+fingerprints or public key fingerprints (Postfix 2.9 and later) for
+\fBcheck_ccert_access\fR and \fBpermit_tls_clientcerts\fR.
.PP
Available in Postfix version 2.6 and later:
.IP "\fBsmtpd_tls_protocols (!SSLv2, !SSLv3)\fR"
@@ -611,12 +610,13 @@ Postfix mail system. The methods vary from making the software log
a lot of detail, to running some daemon processes under control of
a call tracer or debugger.
.IP "\fBdebug_peer_level (2)\fR"
-The increment in verbose logging level when a remote client or
-server matches a pattern in the debug_peer_list parameter.
+The increment in verbose logging level when a nexthop destination,
+remote client or server name or network address matches a pattern
+given with the debug_peer_list parameter.
.IP "\fBdebug_peer_list (empty)\fR"
-Optional list of remote client or server hostname or network
-address patterns that cause the verbose logging level to increase
-by the amount specified in $debug_peer_level.
+Optional list of nexthop destination, remote client or server
+name or network address patterns that, if matched, cause the verbose
+logging level to increase by the amount specified in $debug_peer_level.
.IP "\fBerror_notice_recipient (postmaster)\fR"
The recipient of postmaster notifications about mail delivery
problems that are caused by policy, resource, software or protocol
diff --git a/postfix/proto/COMPATIBILITY_README.html b/postfix/proto/COMPATIBILITY_README.html
index 291979d98..a6b027f60 100644
--- a/postfix/proto/COMPATIBILITY_README.html
+++ b/postfix/proto/COMPATIBILITY_README.html
@@ -72,6 +72,15 @@ setting relay_domains=$mydestination
Using backwards-compatible default setting smtputf8_enable=no
+Using backwards-compatible +default setting smtpd_tls_fingerprint_digest=md5
+ +Using backwards-compatible +default setting smtp_tls_fingerprint_digest=md5
+ +Using backwards-compatible +default setting lmtp_tls_fingerprint_digest=md5
+If such a message is logged in the context of a legitimate @@ -327,7 +336,7 @@ explicit list of domain names.
The smtputf8_enable default value has changed from "no" to "yes. +
The smtputf8_enable default value has changed from "no" to "yes". With the new "yes" setting, the Postfix SMTP server rejects non-ASCII addresses from clients that don't request SMTPUTF8 support, after Postfix is updated from an older version. The backwards-compatibility @@ -366,6 +375,92 @@ in main.cf: +
The smtpd_tls_fingerprint_digest default value has changed from +"md5" to "sha256". With the new "sha256" setting, the Postfix SMTP +server avoids using the deprecated "md5" algorithm and computes a more +secure digest of the client certificate.
+ +If you're using the default "md5" setting, or even an explicit +"sha1" (also deprecated) setting, you should consider switching to +"sha256". This will require updating any associated lookup table keys +with the "sha256" digests of the expected client certificate or public +key.
+ +As long as the smtpd_tls_fingerprint_digest parameter is left at its +implicit default value, and the compatibility_level setting is less than +3, Postfix logs a warning each time a client certificate or public key +fingerprint is (potentially) used for access control:
+ +++ ++postfix/smtpd[27560]: using backwards-compatible default setting + smtpd_tls_fingerprint_digest=md5 to compute certificate fingerprints ++
Since any client certificate fingerprints are passed in policy service +lookups, and Postfix doesn't know whether the fingerprint will be used, the +warning may also be logged when policy lookups are performed for connections +that used a client certificate, even if the policy service does not in fact +examine the client certificate. To reduce the noise somewhat, such warnings +are issued at most once per smtpd(8) process instance.
+ +If you prefer to stick with "md5", you can suppress the warnings by +making that setting explicit. After addressing any other compatibility +warnings, you can update your compatibility level. +
+ +++ ++# postconf smtpd_tls_fingerprint_digest=md5 +# postfix reload ++
The smtp_tls_fingerprint_digest and lmtp_tls_fingerprint_digest +default values have changed from "md5" to "sha256". With the new +"sha256" setting, the Postfix SMTP and LMTP client avoids using the +deprecated "md5" algorithm and computes a more secure digest of the +server certificate.
+ +If you're using the default "md5" setting, or even an explicit +"sha1" (also deprecated) setting, you should consider switching to +"sha256". This will require updating any "fingerprint" security level +policies in the TLS policy table to specify matching "sha256" digests of +the expected server certificates or public keys.
+ +As long as the smtp_tls_fingerprint_digest (or LMTP equivalent) +parameter is left at its implicit default value, and the +compatibility_level setting is less than 3, Postfix logs a warning each +time the "fingerprint" security level is used to specify matching "md5" +digests of trusted server certificates or public keys:
+ +++ ++postfix/smtp[27560]: using backwards-compatible default setting + smtp_tls_fingerprint_digest=md5 to compute certificate fingerprints ++
If you prefer to stick with "md5", you can suppress the warnings by +making that setting explicit. After addressing any other compatibility +warnings, you can update your compatibility level. +
+ ++++# postconf 'smtp_tls_fingerprint_digest = md5' \ + 'lmtp_tls_fingerprint_digest = md5' +# postfix reload ++
Backwards compatibility is turned off by updating the diff --git a/postfix/proto/TLS_README.html b/postfix/proto/TLS_README.html index 8f1022589..79732e904 100644 --- a/postfix/proto/TLS_README.html +++ b/postfix/proto/TLS_README.html @@ -783,8 +783,14 @@ table.
The digest algorithm used to compute the client certificate fingerprints is specified with the main.cf smtpd_tls_fingerprint_digest -parameter. The default is "md5", for compatibility with Postfix -versions < 2.5.
+parameter. The default algorithm is sha256 with Postfix ≥ +3.6 and the compatibility_level set to 3 or higher. With +Postfix ≤ 3.5, the default algorithm is md5. The +best-practice algorithm is now sha256. Recent advances in hash +function cryptanalysis have led to md5 and sha1 being deprecated in +favor of sha256. However, as long as there are no known "second +pre-image" attacks against the older algorithms, their use in this +context, though not recommended, is still likely safe.The permit_tls_all_clientcerts feature must be used with caution, because it can result in too many access permissions. Use this @@ -847,30 +853,15 @@ key always in "PEM" format. We pipe the result to another OpenSSL command that converts the key to DER and then to the "dgst" command to compute the fingerprint.
-The actual command to transform the key to DER format depends -on the version of OpenSSL used. With OpenSSL 1.0.0 and later, the -"pkey" command supports all key types. With OpenSSL 0.9.8 and -earlier, the key type is always RSA (nobody uses DSA, and EC -keys are not fully supported by 0.9.8), so the "rsa" command is -used.
+Example:
-# OpenSSL 1.0 with all certificates and SHA-1 fingerprints.
$ openssl x509 -in cert.pem -noout -pubkey |
openssl pkey -pubin -outform DER |
- openssl dgst -sha1 -c
-(stdin)= 64:3f:1f:f6:e5:1e:d4:2a:56:8b:fc:09:1a:61:98:b5:bc:7c:60:58
-
-# OpenSSL 0.9.8 with RSA certificates and MD5 fingerprints.
-$ openssl x509 -in cert.pem -noout -pubkey |
- openssl rsa -pubin -outform DER |
- openssl dgst -md5 -c
-(stdin)= f4:62:60:f6:12:8f:d5:8d:28:4d:13:a7:db:b2:ff:50
+ openssl dgst -sha256 -c
+(stdin)= 64:3f:1f:f6:e5:1e:d4:2a:...:8b:fc:09:1a:61:98:b5:bc:7c:60:58
-Note: Postfix 2.9.0–2.9.5 computed the public key -fingerprint incorrectly. To use public-key fingerprints, upgrade -to Postfix 2.9.6 or later.
The default algorithm is sha256 with Postfix ≥ 3.6 +and the compatibility_level set to 3 or higher; with Postfix +≤ 3.5, the default algorithm is md5. The +best-practice algorithm is now sha256. Recent advances in hash +function cryptanalysis have led to md5 and sha1 being deprecated in +favor of sha256. However, as long as there are no known "second +pre-image" attacks against the older algorithms, their use in this +context, though not recommended, is still likely safe.
+Example: fingerprint TLS security with an internal mailhub. Two matching fingerprints are listed. The relayhost may be multiple physical hosts behind a load-balancer, each with its own private/public @@ -1521,10 +1521,10 @@ another, and both keys are trusted just prior to the transition.
relayhost = [mailhub.example.com]
smtp_tls_security_level = fingerprint
- smtp_tls_fingerprint_digest = md5
+ smtp_tls_fingerprint_digest = sha256
smtp_tls_fingerprint_cert_match =
- 3D:95:34:51:24:66:33:B9:D2:40:99:C0:C1:17:0B:D1
- EC:3B:2D:B0:5B:B1:FB:6D:20:A3:9D:72:F6:8D:12:35
+ 51:e9:af:2e:1e:40:1f:de:64:...:30:35:2d:09:16:31:5a:eb:82:76
+ b6:b4:72:34:e2:59:cd:fb:c2:...:63:0d:4d:cc:2c:7d:84:de:e6:2f
@@ -1534,15 +1534,15 @@ As in the example above, we show two matching fingerprints:
/etc/postfix/main.cf:
smtp_tls_policy_maps = hash:/etc/postfix/tls_policy
- smtp_tls_fingerprint_digest = md5
+ smtp_tls_fingerprint_digest = sha256
/etc/postfix/tls_policy:
example.com fingerprint
- match=3D:95:34:51:24:66:33:B9:D2:40:99:C0:C1:17:0B:D1
- match=EC:3B:2D:B0:5B:B1:FB:6D:20:A3:9D:72:F6:8D:12:35
+ match=51:e9:af:2e:1e:40:1f:de:...:35:2d:09:16:31:5a:eb:82:76
+ match=b6:b4:72:34:e2:59:cd:fb:...:0d:4d:cc:2c:7d:84:de:e6:2f
@@ -1554,30 +1554,15 @@ key always in "PEM" format. We pipe the result to another OpenSSL
command that converts the key to DER and then to the "dgst" command
to compute the fingerprint.
-The actual command to transform the key to DER format depends -on the version of OpenSSL used. With OpenSSL 1.0.0 and later, the -"pkey" command supports all key types. With OpenSSL 0.9.8 and -earlier, the key type is always RSA (nobody uses DSA, and EC -keys are not fully supported by 0.9.8), so the "rsa" command is -used.
+Example:
-# OpenSSL 1.0 with all certificates and SHA-1 fingerprints.
$ openssl x509 -in cert.pem -noout -pubkey |
openssl pkey -pubin -outform DER |
- openssl dgst -sha1 -c
-(stdin)= 64:3f:1f:f6:e5:1e:d4:2a:56:8b:fc:09:1a:61:98:b5:bc:7c:60:58
-
-# OpenSSL 0.9.8 with RSA certificates and MD5 fingerprints.
-$ openssl x509 -in cert.pem -noout -pubkey |
- openssl rsa -pubin -outform DER |
- openssl dgst -md5 -c
-(stdin)= f4:62:60:f6:12:8f:d5:8d:28:4d:13:a7:db:b2:ff:50
+ openssl dgst -sha256 -c
+(stdin)= 64:3f:1f:f6:e5:1e:d4:2a:56:...:09:1a:61:98:b5:bc:7c:60:58
-Note: Postfix 2.9.0–2.9.5 computed the public key -fingerprint incorrectly. To use public-key fingerprints, upgrade -to Postfix 2.9.6 or later.
The default algorithm is sha256 with Postfix ≥ 3.6 +and the compatibility_level set to 3 or higher. With Postfix +≤ 3.5, the default algorithm is md5. The best-practice +algorithm is now sha256. Recent advances in hash function +cryptanalysis have led to md5 and sha1 being deprecated in favor of +sha256. However, as long as there are no known "second pre-image" +attacks against the older algorithms, their use in this context, though +not recommended, is still likely safe.
+Postfix lookup tables are in the form of (key, value) pairs. Since we only need the key, the value can be chosen freely, e.g. the name of the user or host: @@ -9726,10 +9760,6 @@ relay_clientcerts = hash:/etc/postfix/relay_clientcerts an appropriate access(5) policy for each client. See RESTRICTION_CLASS_README.
-Note: Postfix 2.9.0–2.9.5 computed the public key -fingerprint incorrectly. To use public-key fingerprints, upgrade -to Postfix 2.9.6 or later.
-This feature is available with Postfix version 2.2.
%PARAM smtpd_tls_cipherlist @@ -9754,15 +9784,24 @@ Postfix 2.3 and later; use smtpd_tls_mandatory_ciphers instead.File with DH parameters that the Postfix SMTP server should use with non-export EDH ciphers.
+The best-practice choice of parameters uses a 2048-bit prime. This is fine, +despite the historical "1024" in the parameter name. Do not be tempted to use +much larger values, performance degrades quickly, and you may also cease to +interoperate with some mainstream SMTP clients. As of Postfix 3.1, the +compiled-in default prime is 2048-bits, and it is not strictly necessary, +though perhaps somewhat beneficial to generate custom DH parameters.
+Instead of using the exact same parameter sets as distributed with other TLS packages, it is more secure to generate your own set of parameters with something like the following commands:
@@ -9796,6 +9835,9 @@ grade is "medium" with Postfix releases after the middle of 2015, and as a result export-grade cipher suites are by default not used. +-openssl dhparam -out /etc/postfix/dh512.pem 512 -openssl dhparam -out /etc/postfix/dh1024.pem 1024 openssl dhparam -out /etc/postfix/dh2048.pem 2048 +openssl dhparam -out /etc/postfix/dh1024.pem 1024 +# As of Postfix 3.6, export-grade 512-bit DH parameters are no longer +# supported or needed. +openssl dhparam -out /etc/postfix/dh512.pem 512
With Postfix ≥ 3.6 export-grade Diffie-Hellman key exchange +is no longer supported, and this parameter is silently ignored.
+See also the discussion under the smtpd_tls_dh1024_param_file configuration parameter.
@@ -11226,8 +11268,12 @@ Example:
/etc/postfix/main.cf:
smtp_tls_policy_maps = hash:/etc/postfix/tls_policy
- # Postfix 2.5 and later
- smtp_tls_fingerprint_digest = md5
+ # Postfix 2.5 and later.
+ #
+ # The default digest is sha256 with Postfix ≥ 3.6 and
+ # compatibility level ≥ 3.
+ #
+ smtp_tls_fingerprint_digest = sha256
@@ -11241,8 +11287,8 @@ Example:
[mail.example.org]:587 secure match=nexthop
# Postfix 2.5 and later
[thumb.example.org] fingerprint
- match=EC:3B:2D:B0:5B:B1:FB:6D:20:A3:9D:72:F6:8D:12:35
- match=3D:95:34:51:24:66:33:B9:D2:40:99:C0:C1:17:0B:D1
+ match=b6:b4:72:34:e2:59:cd:...:c2:ca:63:0d:4d:cc:2c:7d:84:de:e6:2f
+ match=51:e9:af:2e:1e:40:1f:...:64:0a:30:35:2d:09:16:31:5a:eb:82:76
Note: The hostname strategy if listed in a non-default @@ -12316,7 +12362,7 @@ configuration parameter. See there for details.
This feature is available in Postfix 2.4 and later.
-%PARAM smtp_tls_fingerprint_digest md5 +%PARAM smtp_tls_fingerprint_digest see "postconf -d" outputThe message digest algorithm used to construct remote SMTP server certificate fingerprints. At the "fingerprint" TLS security level @@ -12329,19 +12375,19 @@ algorithm. With a digest algorithm resistant to "second pre-image" attacks, it is not feasible to create a new public key and a matching certificate (or public/private key-pair) that has the same fingerprint.
-The default algorithm is md5; this is consistent with -the backwards compatible setting of the digest used to verify client -certificates in the SMTP server.
+The default algorithm is sha256 with Postfix ≥ 3.6 +and the compatibility_level set to 3 or higher. With Postfix +≤ 3.5, the default algorithm is md5.
-The best practice algorithm is now sha1. Recent advances in hash -function cryptanalysis have led to md5 being deprecated in favor of sha1. -However, as long as there are no known "second pre-image" attacks -against md5, its use in this context can still be considered safe. -
+The best-practice algorithm is now sha256. Recent advances in hash +function cryptanalysis have led to md5 and sha1 being deprecated in favor of +sha256. However, as long as there are no known "second pre-image" attacks +against the older algorithms, their use in this context, though not +recommended, is still likely safe.
While additional digest algorithms are often available with OpenSSL's libcrypto, only those used by libssl in SSL cipher suites are available to -Postfix. For now this means just md5 or sha1.
+Postfix. You'll likely find support for md5, sha1, sha256 and sha512.To find the fingerprint of a specific certificate file, with a specific digest algorithm, run: @@ -12358,8 +12404,8 @@ For example:
@@ -12371,29 +12417,16 @@ key always in "PEM" format. We pipe the result to another OpenSSL command that converts the key to DER and then to the "dgst" command to compute the fingerprint. --$ openssl x509 -noout -fingerprint -sha1 -in cert.pem -SHA1 Fingerprint=D4:6A:AB:19:24:79:F8:32:BB:A6:CB:66:82:C0:8E:9B:EE:29:A8:1A +$ openssl x509 -noout -fingerprint -sha256 -in cert.pem +SHA256 Fingerprint=D4:6A:AB:19:24:...:BB:A6:CB:66:82:C0:8E:9B:EE:29:A8:1A
The actual command to transform the key to DER format depends -on the version of OpenSSL used. With OpenSSL 1.0.0 and later, the -"pkey" command supports all key types. With OpenSSL 0.9.8 and -earlier, the key type is always RSA (nobody uses DSA, and EC -keys are not fully supported by 0.9.8), so the "rsa" command is -used.
+The actual command to transform the key to DER format depends on the +version of OpenSSL used. As of OpenSSL 1.0.0, the "pkey" command supports +all key types.
-# OpenSSL 1.0 with all certificates and SHA-1 fingerprints.
+# OpenSSL ≥ 1.0 with SHA-256 fingerprints.
$ openssl x509 -in cert.pem -noout -pubkey |
openssl pkey -pubin -outform DER |
- openssl dgst -sha1 -c
-(stdin)= 64:3f:1f:f6:e5:1e:d4:2a:56:8b:fc:09:1a:61:98:b5:bc:7c:60:58
-
-
-
--@@ -12401,10 +12434,6 @@ $ openssl x509 -in cert.pem -noout -pubkey | fingerprint and public key fingerprint when the TLS loglevel is 2 or higher. --# OpenSSL 0.9.8 with RSA certificates and MD5 fingerprints. -$ openssl x509 -in cert.pem -noout -pubkey | - openssl rsa -pubin -outform DER | - openssl dgst -md5 -c -(stdin)= f4:62:60:f6:12:8f:d5:8d:28:4d:13:a7:db:b2:ff:50 + openssl dgst -sha256 -c +(stdin)= 64:3f:1f:f6:e5:1e:d4:2a:56:...:fc:09:1a:61:98:b5:bc:7c:60:58
Note: Postfix 2.9.0–2.9.5 computed the public key -fingerprint incorrectly. To use public-key fingerprints, upgrade -to Postfix 2.9.6 or later.
-This feature is available in Postfix 2.5 and later.
%PARAM smtp_tls_fingerprint_cert_match @@ -12419,6 +12448,10 @@ is a message digest of the server certificate (or public key). The digest algorithm is selected via the smtp_tls_fingerprint_digest parameter. +The colons between each pair of nibbles in the fingerprint value +are optional (Postfix ≥ 3.6). These were required in earlier +Postfix releases.
+When an smtp_tls_policy_maps table entry specifies the "fingerprint" security level, any "match" attributes in that entry specify the list of valid fingerprints for the corresponding destination. Multiple @@ -12436,10 +12469,10 @@ another, and both keys are trusted just prior to the transition.
relayhost = [mailhub.example.com] smtp_tls_security_level = fingerprint -smtp_tls_fingerprint_digest = md5 +smtp_tls_fingerprint_digest = sha256 smtp_tls_fingerprint_cert_match = - 3D:95:34:51:24:66:33:B9:D2:40:99:C0:C1:17:0B:D1 - EC:3B:2D:B0:5B:B1:FB:6D:20:A3:9D:72:F6:8D:12:35 + cd:fc:d8:db:f8:c4:82:96:6c:...:28:71:e8:f5:8d:a5:0d:9b:d4:a6 + dd:5c:ef:f5:c3:bc:64:25:36:...:99:36:06:ce:40:ef:de:2e:ad:a4@@ -12450,7 +12483,7 @@ As in the example above, we show two matching fingerprints:
/etc/postfix/main.cf:
smtp_tls_policy_maps = hash:/etc/postfix/tls_policy
- smtp_tls_fingerprint_digest = md5
+ smtp_tls_fingerprint_digest = sha256
@@ -12458,8 +12491,8 @@ As in the example above, we show two matching fingerprints:
/etc/postfix/tls_policy:
example.com fingerprint
- match=3D:95:34:51:24:66:33:B9:D2:40:99:C0:C1:17:0B:D1
- match=EC:3B:2D:B0:5B:B1:FB:6D:20:A3:9D:72:F6:8D:12:35
+ match=51:e9:af:2e:1e:40:1f:...:64:0a:30:35:2d:09:16:31:5a:eb:82:76
+ match=b6:b4:72:34:e2:59:cd:...:c2:ca:63:0d:4d:cc:2c:7d:84:de:e6:2f
@@ -12472,31 +12505,32 @@ configuration parameter. See there for details.
This feature is available in Postfix 2.5 and later.
-%PARAM lmtp_tls_fingerprint_digest md5 +%PARAM lmtp_tls_fingerprint_digest see "postconf -d" outputThe LMTP-specific version of the smtp_tls_fingerprint_digest configuration parameter. See there for details.
This feature is available in Postfix 2.5 and later.
-%PARAM smtpd_tls_fingerprint_digest md5 +%PARAM smtpd_tls_fingerprint_digest see "postconf -d" output -The message digest algorithm to construct remote SMTP -client-certificate -fingerprints or public key fingerprints (Postfix 2.9 and later) -for check_ccert_access and permit_tls_clientcerts. The -default algorithm is md5, for backwards compatibility with Postfix -releases prior to 2.5.
+The message digest algorithm to construct remote SMTP client-certificate +fingerprints or public key fingerprints (Postfix 2.9 and later) for +check_ccert_access and permit_tls_clientcerts.
-Advances in hash -function cryptanalysis have led to md5 being deprecated in favor of sha1. -However, as long as there are no known "second pre-image" attacks -against md5, its use in this context can still be considered safe. -
+The default algorithm is sha256 with Postfix ≥ 3.6 +and the compatibility_level set to 3 or higher. With Postfix +≤ 3.5, the default algorithm is md5.
+ +The best-practice algorithm is now sha256. Recent advances in hash +function cryptanalysis have led to md5 and sha1 being deprecated in favor of +sha256. However, as long as there are no known "second pre-image" attacks +against the older algorithms, their use in this context, though not +recommended, is still likely safe.
While additional digest algorithms are often available with OpenSSL's libcrypto, only those used by libssl in SSL cipher suites are available to -Postfix.
+Postfix. You'll likely find support for md5, sha1, sha256 and sha512.To find the fingerprint of a specific certificate file, with a specific digest algorithm, run:
@@ -12512,8 +12546,8 @@ For example:@@ -12525,46 +12559,26 @@ key always in "PEM" format. We pipe the result to another OpenSSL command that converts the key to DER and then to the "dgst" command to compute the fingerprint. --$ openssl x509 -noout -fingerprint -sha1 -in cert.pem -SHA1 Fingerprint=D4:6A:AB:19:24:79:F8:32:BB:A6:CB:66:82:C0:8E:9B:EE:29:A8:1A +$ openssl x509 -noout -fingerprint -sha256 -in cert.pem +SHA256 Fingerprint=D4:6A:AB:19:24:...:A6:CB:66:82:C0:8E:9B:EE:29:A8:1A
The actual command to transform the key to DER format depends -on the version of OpenSSL used. With OpenSSL 1.0.0 and later, the -"pkey" command supports all key types. With OpenSSL 0.9.8 and -earlier, the key type is always RSA (nobody uses DSA, and EC -keys are not fully supported by 0.9.8), so the "rsa" command is -used.
+Example:
-# OpenSSL 1.0 with all certificates and SHA-1 fingerprints.
$ openssl x509 -in cert.pem -noout -pubkey |
openssl pkey -pubin -outform DER |
- openssl dgst -sha1 -c
+ openssl dgst -sha256 -c
(stdin)= 64:3f:1f:f6:e5:1e:d4:2a:56:8b:fc:09:1a:61:98:b5:bc:7c:60:58
----# OpenSSL 0.9.8 with RSA certificates and MD5 fingerprints. -$ openssl x509 -in cert.pem -noout -pubkey | - openssl rsa -pubin -outform DER | - openssl dgst -md5 -c -(stdin)= f4:62:60:f6:12:8f:d5:8d:28:4d:13:a7:db:b2:ff:50 --
The Postfix SMTP server and client log the peer (leaf) certificate fingerprint and public key fingerprint when the TLS loglevel is 2 or higher.
-Note: Postfix 2.9.0–2.9.5 computed the public key -fingerprint incorrectly. To use public-key fingerprints, upgrade -to Postfix 2.9.6 or later.
- -Example: client-certificate access table, with sha1 fingerprints:
+Example: client-certificate access table, with sha256 fingerprints:
/etc/postfix/main.cf:
- smtpd_tls_fingerprint_digest = sha1
+ smtpd_tls_fingerprint_digest = sha256
smtpd_client_restrictions =
check_ccert_access hash:/etc/postfix/access,
reject
@@ -12572,9 +12586,9 @@ to Postfix 2.9.6 or later.
/etc/postfix/access:
# Action folded to next line...
- AF:88:7C:AD:51:95:6F:36:96:F6:01:FB:2E:48:CD:AB:49:25:A2:3B
+ AF:88:7C:AD:51:95:6F:36:96:...:01:FB:2E:48:CD:AB:49:25:A2:3B
OK
- 85:16:78:FD:73:6E:CE:70:E0:31:5F:0D:3C:C8:6D:C4:2C:24:59:E1
+ 85:16:78:FD:73:6E:CE:70:E0:...:5F:0D:3C:C8:6D:C4:2C:24:59:E1
permit_auth_destination
@@ -12859,32 +12873,32 @@ EC algorithms have not been disabled by the vendor.
%PARAM smtpd_tls_eecdh_grade see "postconf -d" output
The Postfix SMTP server security grade for ephemeral elliptic-curve -Diffie-Hellman (EECDH) key exchange.
+Diffie-Hellman (EECDH) key exchange. As of Postfix 3.6, the value of +this parameter is always ignored, and Postfix behaves as though th +auto value (described below) was chosen. +The available choices are:
With Postfix ≥ 3.6 export-grade Diffie-Hellman key exchange +is no longer supported, and this parameter is silently ignored.
+This feature is available in Postfix 2.8 and later.
%PARAM tlsproxy_tls_dkey_file $smtpd_tls_dkey_file diff --git a/postfix/src/global/mail_params.c b/postfix/src/global/mail_params.c index 91c70f75e..0efd00eda 100644 --- a/postfix/src/global/mail_params.c +++ b/postfix/src/global/mail_params.c @@ -147,6 +147,10 @@ /* int warn_compat_break_flush_domains; /* int warn_compat_break_mynetworks_style; /* +/* int warn_compat_break_smtpd_tls_fpt_dgst; +/* int warn_compat_break_smtp_tls_fpt_dgst; +/* int warn_compat_break_lmtp_tls_fpt_dgst; +/* /* char *var_maillog_file; /* char *var_maillog_file_pfxs; /* char *var_maillog_file_comp; @@ -356,14 +360,21 @@ char *var_drop_hdrs; char *var_info_log_addr_form; bool var_enable_orcpt; -char *var_maillog_file; -char *var_maillog_file_pfxs; -char *var_maillog_file_comp; -char *var_maillog_file_stamp; -char *var_postlog_service; +char *var_maillog_file; +char *var_maillog_file_pfxs; +char *var_maillog_file_comp; +char *var_maillog_file_stamp; +char *var_postlog_service; const char null_format_string[1] = ""; + /* + * Compatibility level 3. + */ +int warn_compat_break_smtpd_tls_fpt_dgst; +int warn_compat_break_smtp_tls_fpt_dgst; +int warn_compat_break_lmtp_tls_fpt_dgst; + /* * Compatibility level 2. */ @@ -618,6 +629,23 @@ static void check_legacy_defaults(void) * bits. */ + /* + * Look for specific parameters whose default changed when the + * compatibility level changed to 3. + */ + if (var_compat_level < 3) { + if (mail_conf_lookup(VAR_SMTPD_TLS_FPT_DGST) == 0) + warn_compat_break_smtpd_tls_fpt_dgst = 1; + if (mail_conf_lookup(VAR_SMTP_TLS_FPT_DGST) == 0) + warn_compat_break_smtp_tls_fpt_dgst = 1; + if (mail_conf_lookup(VAR_LMTP_TLS_FPT_DGST) == 0) + warn_compat_break_lmtp_tls_fpt_dgst = 1; + } else { + warn_compat_break_smtpd_tls_fpt_dgst = 0; + warn_compat_break_smtp_tls_fpt_dgst = 0; + warn_compat_break_lmtp_tls_fpt_dgst = 0; + } + /* * Look for specific parameters whose default changed when the * compatibility level changed to 2. diff --git a/postfix/src/global/mail_params.h b/postfix/src/global/mail_params.h index a6119f1b2..65906f187 100644 --- a/postfix/src/global/mail_params.h +++ b/postfix/src/global/mail_params.h @@ -19,8 +19,8 @@ typedef int bool; #ifdef USE_TLS #include