From: Wietse Venema
For servers that are not public Internet MX hosts, Postfix -supports configurations with no certificates. This entails the -use of just the anonymous TLS ciphers, which are not supported by -typical SMTP clients. Since such clients will not, as a rule, fall -back to plain text after a TLS handshake failure, a certificate-less -Postfix SMTP server will -be unable to receive email from most TLS enabled clients. To avoid -accidental configurations with no certificates, Postfix enables -certificate-less operation only when the administrator explicitly sets -"smtpd_tls_cert_file = none". This ensures that new Postfix -SMTP server configurations will not accidentally run with no -certificates.
+supports configurations with no certificates. This entails the use of +just the anonymous TLS ciphers, which are not supported by typical SMTP +clients. Since some clients may not fall back to plain text after a TLS +handshake failure, a certificate-less Postfix SMTP server will be unable +to receive email from some TLS-enabled clients. To avoid accidental +configurations with no certificates, Postfix enables certificate-less +operation only when the administrator explicitly sets +"smtpd_tls_cert_file = none". This ensures that new Postfix SMTP server +configurations will not accidentally enable TLS without certificates. + +Note that server certificates are not optional in TLS 1.3. To +run without certificates you'd have to disable the TLS 1.3 protocol by +including '!TLSv1.3' in "smtpd_tls_protocols" and perhaps also +"smtpd_tls_mandatory_protocols". It is simpler instead to just +configure a certificate chain. Certificate-less operation is not +recommended.
RSA, DSA and ECDSA (Postfix ≥ 2.6) certificates are supported. Most sites only have RSA certificates. You can configure all three @@ -239,11 +244,10 @@ applies to "2 0 2" and "2 1 2" TLSA records or any other digest of a CA certificate, but it is expected that SHA256 will be by far the most common digest for TLSA.
-As a best practice, publish either "3 0 1" or "3 1 1" TLSA -associations that specify the SHA256 digest of the server certificate -public key with the alias-expanded hostname of each STARTTLS capable -SMTP server. These continue to work when a certificate is renewed -with the same public/private key pair.
+As a best practice, publish "3 1 1" TLSA associations that specify +the SHA256 digest of the server's public key. These continue to work +unmodified when a certificate is renewed with the same public/private +key pair.
@@ -269,6 +273,58 @@ directory.Example: Postfix ≥ 3.4 all-in-one chain file(s). One or more +chain files that start with a key that is immediately followed by the +corresponding certificate and any additional issuer certificates. A +single file can hold multiple (key, cert, [chain]) sequences, one +per algorithm. It is typically simpler to keep the chain for each +algorithm in its own file. Most users are likely to deploy just a +single RSA chain, but with OpenSSL 1.1.1, it is possible to deploy up to +five chains, one each for RSA, ECDSA, ED25519, ED448 and even the +obsolete DSA.
+ +++ ++ # Postfix ≥ 3.4. Preferred configuration interface. Each file + # starts with the private key, followed by the corresponding + # certificate, and any intermediate issuer certificates. The root CA + # cert may also be needed when published as a DANE trust anchor. + # + smtpd_tls_chain_files = + /etc/postfix/rsa.pem, + /etc/postfix/ecdsa.pem, + /etc/postfix/ed25519.pem, + /etc/postfix/ed448.pem ++
You can also store the keys separately from their certificates, again +provided each is listed before the corresponding certificate chain. Storing a +key and its associated certificate chain in separate files is not recommended, +because this is prone to race conditions during key rollover, as there is no +way to update multiple files atomically.
+ +++ ++ # Postfix ≥ 3.4. + # Storing keys separately from the associated certificates is not + # recommended. + smtpd_tls_chain_files = + /etc/postfix/rsakey.pem, + /etc/postfix/rsacerts.pem, + /etc/postfix/ecdsakey.pem, + /etc/postfix/ecdsacerts.pem ++
The below examples show the legacy algorithm-specific configurations +for Postfix 3.3 and older. With Postfix ≤ 3.3, even if the key is +stored in the same file as the certificate, the file is read twice and a +(brief) race condition still exists during key rollover. While Postfix +≥ 3.4 avoids the race when the key and certificate are in the same +file, you should use the new "smtpd_tls_chain_files" interface shown +above.
+
RSA key and certificate examples:
@@ -294,8 +350,8 @@ directory.+/etc/postfix/main.cf: - # Most clients will not be ECDSA capable, so you will likely also need - # an RSA or DSA certificate and private key. + # Some clients will not be ECDSA capable, so you will likely still need + # an RSA certificate and private key. # smtpd_tls_eccert_file = /etc/postfix/server-ecdsa.pem smtpd_tls_eckey_file = $smtpd_tls_eccert_file @@ -308,6 +364,8 @@ anonymous-cipher capable clients:@@ -854,7 +912,11 @@ without corresponding changes to the Postfix source code. supports configurations with no server certificates that use only the anonymous ciphers. This is enabled by explicitly setting "smtpd_tls_cert_file = none" -and not specifying an smtpd_tls_dcert_file or smtpd_tls_eccert_file. +and not specifying an smtpd_tls_dcert_file or smtpd_tls_eccert_file. +Such configurations may not interoperate with some clients, and require +that TLSv1.3 be explicitly disabled. Therefore, they are not +recommended, it is better and simpler to just configure a suitable +certificate./etc/postfix/main.cf: + # Not recommended: breaks TLS 1.3 and clients that don't support + # anonymous cipher suites. smtpd_tls_cert_file = noneExample, MSA that requires TLSv1 or higher, not SSLv2 or SSLv3, with high grade ciphers:
@@ -874,6 +936,21 @@ with high grade ciphers:With Postfix ≥ 3.4, specify instead a single file that holds the +key followed by the corresponding certificate and any associated issuing +certificates, leaving the "smtpd_tls_cert_file" and "smtpd_tls_key_file" +and related DSA and ECDSA parameters empty.
+ ++++/etc/postfix/main.cf: + smtpd_tls_chain_files = /etc/postfix/rsachain.pem + smtpd_tls_cert_file = + smtpd_tls_key_file = + ... ++If you want to take maximal advantage of ciphers that offer forward secrecy see the Getting @@ -1140,7 +1217,7 @@ parameters includes useful interoperability and security guidelines.
Despite the potential for eliminating passive eavesdropping attacks, mandatory TLS encryption is not viable as a default security level for -mail delivery to the public Internet. Most MX hosts do not support TLS at +mail delivery to the public Internet. Some MX hosts do not support TLS at all, and some of those that do have broken implementations. On a host that delivers mail to the Internet, you should not configure mandatory TLS encryption as the default security level.
@@ -1540,8 +1617,8 @@ parent certificates will be ignored.Despite the potential for eliminating "man-in-the-middle" and other attacks, mandatory certificate trust chain and subject name verification -is not viable as a default Internet mail delivery policy. Most MX hosts -do not support TLS at all, and a significant portion of TLS enabled +is not viable as a default Internet mail delivery policy. Some MX hosts +do not support TLS at all, and a significant portion of TLS-enabled MTAs use self-signed certificates, or certificates that are signed by a private Certification Authority. On a machine that delivers mail to the Internet, you should not configure mandatory server certificate @@ -1614,8 +1691,8 @@ parent certificates will be ignored.
Despite the potential for eliminating "man-in-the-middle" and other attacks, mandatory secure server certificate verification is not -viable as a default Internet mail delivery policy. Most MX hosts -do not support TLS at all, and a significant portion of TLS enabled +viable as a default Internet mail delivery policy. Some MX hosts +do not support TLS at all, and a significant portion of TLS-enabled MTAs use self-signed certificates, or certificates that are signed by a private Certification Authority. On a machine that delivers mail to the Internet, you should not configure secure TLS verification @@ -1776,24 +1853,24 @@ well without them. The recommended setting is to let the defaults stand:
# Postfix ≥ 2.6 smtp_tls_eccert_file = smtp_tls_eckey_file = + # Postfix ≥ 3.4 + smtp_tls_chain_files =
The best way to use the default settings is to comment out the above parameters in main.cf if present.
-During TLS startup negotiation the Postfix SMTP client may present -a certificate to the remote SMTP server. The Netscape client is -rather clever here and lets the user select between only those -certificates that match CA certificates offered by the remote SMTP -server. As the Postfix SMTP client uses the "SSL_connect()" function -from the OpenSSL package, this is not possible and we have to choose -just one certificate. So for now the default is to use _no_ -certificate and key unless one is explicitly specified here.
+During TLS startup negotiation the Postfix SMTP client may present a +certificate to the remote SMTP server. Browsers typically let the user +select among the certificates that match the CA names indicated by the +remote SMTP server. The Postfix SMTP client does not yet have a mechanism +to select from multiple candidate certificates on the fly, and supports a +single set of certificates (at most one per public key algorithm).
RSA, DSA and ECDSA (Postfix ≥ 2.6) certificates are supported. You can configure all three at the same time, in which case the -cipher used determines which certificate is presented.
+cipher used determines which certificate is presented.It is possible for the Postfix SMTP client to use the same key/certificate pair as the Postfix SMTP server. If a certificate @@ -1802,6 +1879,14 @@ must not be encrypted, meaning: it must be accessible without password. Both parts (certificate and private key) may be in the same file.
+With OpenSSL 1.1.1 and Postfix ≥ 3.4 it is also possible to +configure Ed25519 and Ed448 certificates. Rather than add two more +pairs of key and certificate parameters, Postfix 3.4 introduces a new +"smtp_tls_chain_files" parameter which specifies all the configured +certificates at once, and handles files that hold both the key and the +associated certificates in one pass, thereby avoiding potential race +conditions during key rollover.
+To enable remote SMTP servers to verify the Postfix SMTP client certificate, the issuing CA certificates must be made available to the server. You should include the required certificates in the client @@ -1810,11 +1895,12 @@ CA(s) (bottom-up order).
Example: the certificate for "client.example.com" was issued by "intermediate CA" which itself has a certificate issued by "root CA". -Create the client.pem file with:
+As the "root" super-user create the client.pem file with:@@ -1824,13 +1910,64 @@ sslclient ..." test.-% cat client_cert.pem intermediate_CA.pem > client.pem +# umask 077 +# cat client_key.pem client_cert.pem intermediate_CA.pem > chain.pem
A server that trusts the root CA has a local copy of the root CA certificate, so it is not necessary to include the root CA -certificate here. Leaving it out of the "client.pem" file reduces +certificate here. Leaving it out of the "chain.pem" file reduces the overhead of the TLS exchange.
If you want the Postfix SMTP client to accept remote SMTP server certificates issued by these CAs, append the root certificate to $smtp_tls_CAfile or install it in the $smtp_tls_CApath directory.
+Example: Postfix ≥ 3.4 all-in-one chain file(s). One or more +chain files that start with a key that is immediately followed by the +corresponding certificate and any additional issuer certificates. A +single file can hold multiple (key, cert, [chain]) sequences, one +per algorithm. It is typically simpler to keep the chain for each +algorithm in its own file. Most users are likely to deploy at most a +single RSA chain, but with OpenSSL 1.1.1, it is possible to deploy up +five chains, one each for RSA, ECDSA, ED25519, ED448 and even the +obsolete DSA.
+ +++ ++ # Postfix ≥ 3.4. Preferred configuration interface. Each file + # starts with the private key, followed by the corresponding + # certificate, and any intermediate issuer certificates. + # + smtp_tls_chain_files = + /etc/postfix/rsa.pem, + /etc/postfix/ecdsa.pem, + /etc/postfix/ed25519.pem, + /etc/postfix/ed448.pem ++
You can also store the keys separately from their certificates, again +provided each is listed before the corresponding certificate chain. Storing a +key and its associated certificate chain in separate files is not recommended, +because this is prone to race conditions during key rollover, as there is no +way to update multiple files atomically.
+ +++ ++ # Postfix ≥ 3.4. + # Storing keys separately from the associated certificates is not + # recommended. + smtp_tls_chain_files = + /etc/postfix/rsakey.pem, + /etc/postfix/rsacerts.pem, + /etc/postfix/ecdsakey.pem, + /etc/postfix/ecdsacerts.pem ++
The below examples show the legacy algorithm-specific configurations +for Postfix 3.3 and older. With Postfix ≤ 3.3, even if the key is +stored in the same file as the certificate, the file is read twice and a +(brief) race condition still exists during key rollover. While Postfix +≥ 3.4 avoids the race when the key and certificate are in the same +file, you should use the new "smtp_tls_chain_files" interface shown +above.
+
RSA key and certificate examples:
@@ -2144,7 +2281,10 @@ additional attributes are supported at this level. The optional "ciphers", "exclude" and "protocols" attributes (available for opportunistic TLS with Postfix ≥ 2.6) override the "smtp_tls_ciphers", "smtp_tls_exclude_ciphers" and "smtp_tls_protocols" -configuration parameters. +configuration parameters. At this level and higher, the optional +"servername" attribute (available with Postfix ≥ 3.4) overrides the +global "smtp_tls_servername" parameter, enabling per-destination +configuration of the SNI extension sent to the remote SMTP server.@@ -11975,13 +12001,19 @@ CA(s) (bottom-up order).encrypt Mandatory encryption. Mail is delivered only if the remote SMTP server offers STARTTLS @@ -2830,6 +2970,9 @@ DANE TLSA records. See the postfix-tls(1) docu + +The following commands (credits: Viktor Dukhovni) generate and install a 2048-bit RSA private key and 10-year self-signed certificate for the local Postfix system. This requires super-user privileges. +(By using date-specific filenames for the certificate and key files, +and updating main.cf with new filenames, a potential race condition +in which the key and certificate might not match is avoided).
diff --git a/postfix/html/lmtp.8.html b/postfix/html/lmtp.8.html index 2ac36e297..4bba215ad 100644 --- a/postfix/html/lmtp.8.html +++ b/postfix/html/lmtp.8.html @@ -578,6 +578,14 @@ SMTP(8) SMTP(8) smtp_tls_connection_reuse (no) Try to make multiple deliveries per TLS-encrypted connection. + smtp_tls_chain_files (empty) + List of one or more PEM files, each holding one or more private + keys directly followed by a corresponding certificate chain. + + smtp_tls_servername (empty) + Optional name to send to the remote SMTP server in the TLS + Server Name Indication (SNI) extension. + OBSOLETE STARTTLS CONTROLS The following configuration parameters exist for compatibility with Postfix versions before 2.3. Support for these will be removed in a diff --git a/postfix/html/mailq.1.html b/postfix/html/mailq.1.html index fa4e4828a..0d416c931 100644 --- a/postfix/html/mailq.1.html +++ b/postfix/html/mailq.1.html @@ -314,7 +314,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 trouble shoot a Postfix + The DEBUG_README file gives examples of how to troubleshoot a Postfix system. debugger_command (empty) diff --git a/postfix/html/newaliases.1.html b/postfix/html/newaliases.1.html index fa4e4828a..0d416c931 100644 --- a/postfix/html/newaliases.1.html +++ b/postfix/html/newaliases.1.html @@ -314,7 +314,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 trouble shoot a Postfix + The DEBUG_README file gives examples of how to troubleshoot a Postfix system. debugger_command (empty) diff --git a/postfix/html/postconf.5.html b/postfix/html/postconf.5.html index decaaa4ce..9abc9f8f1 100644 --- a/postfix/html/postconf.5.html +++ b/postfix/html/postconf.5.html @@ -1952,7 +1952,7 @@ is no maximum, it doesn't make much sense to use values above sayThe only reason why the value of 2 is not the default is the way this parameter affects the delivery of mailing-list mail. In the -worst case, their delivery can take somewhere between (cost+1/cost) +worst case, delivery can take somewhere between (cost+1/cost) and (cost/cost-1) times more than if the preemptive scheduler was disabled. The default value of 5 turns out to provide reasonable message response times while making sure the mailing-list deliveries @@ -5188,6 +5188,17 @@ configuration parameter. See there for details.
This feature is available in Postfix 2.3 and later.
+lmtp_tls_chain_files +(default: empty) + + The LMTP-specific version of the smtp_tls_chain_files configuration +parameter. See there for details.
+ +This feature is available in Postfix 3.4 and later.
+ +lmtp_tls_ciphers @@ -5443,6 +5454,17 @@ parameter. See there for details. This feature is available in Postfix 2.3 and later.
+ + +lmtp_tls_servername +(default: empty) + + The LMTP-specific version of the smtp_tls_servername configuration +parameter. See there for details.
+ +This feature is available in Postfix 3.4 and later.
+ +lmtp_tls_session_cache_database @@ -6079,7 +6101,7 @@ it easier to specify shell syntax (see example below). If you can, avoid shell meta characters because they will force Postfix to run an expensive shell process. If you're delivering -via Procmail then running a shell won't make a noticeable difference +via "procmail" then running a shell won't make a noticeable difference in the total cost.
@@ -6360,7 +6382,7 @@ Example:Optional list of user names that are not subjected to address -masquerading, even when their address matches $masquerade_domains. +masquerading, even when their addresses match $masquerade_domains.
@@ -7685,7 +7707,7 @@ to the configured before/after 220 greeting tests.
/etc/postfix/main.cf: postscreen_access_list = permit_mynetworks, - cidr:/etc/postfix/postscreen_access.cidr + cidr:/etc/postfix/postscreen_access.cidr postscreen_blacklist_action = enforce@@ -10174,8 +10196,8 @@ files in the compiled-in default $shliDisplay the name of the recipient table in the "User unknown" -responses. The extra detail makes trouble shooting easier but also -reveals information that is nobody elses business. +responses. The extra detail makes troubleshooting easier but also +reveals information that is nobody else's business.
@@ -11873,7 +11895,7 @@ chroot jail. If the number of trusted roots is large, consider using present in the chroot jail if the smtp(8) client is chrooted. This file may also be used to augment the client certificate trust chain, but it is best to include all the required certificates directly in -$smtp_tls_cert_file.
+$smtp_tls_cert_file (or, Postfix ≥ 3.4 $smtp_tls_chain_files).Specify "smtp_tls_CAfile = /path/to/system_CA_file" to use ONLY the system-supplied default Certification Authority certificates. @@ -11944,9 +11966,10 @@ the Postfix SMTP client TLS session.
(default: empty)File with the Postfix SMTP client RSA certificate in PEM format. -This file may also contain the Postfix SMTP client private RSA key, -and these may be the same as the Postfix SMTP server RSA certificate and key -file.
+This file may also contain the Postfix SMTP client private RSA key, and +these may be the same as the Postfix SMTP server RSA certificate and key +file. With Postfix ≥ 3.4 the preferred way to configure client keys +and certificates is via the "smtp_tls_chain_files" parameter.Do not configure client certificates unless you must present client TLS certificates to one or more servers. Client certificates are @@ -11957,10 +11980,13 @@ well without them. The recommended setting is to let the defaults stand:
smtp_tls_cert_file = smtp_tls_key_file = -smtp_tls_dcert_file = -smtp_tls_dkey_file = smtp_tls_eccert_file = smtp_tls_eckey_file = +# Obsolete DSA parameters +smtp_tls_dcert_file = +smtp_tls_dkey_file = +# Postfix ≥ 3.4 interface +smtp_tls_chain_files =
Example: the certificate for "client.example.com" was issued by "intermediate CA" which itself has a certificate issued by "root CA". -Create the client.pem file with "cat client_cert.pem intermediate_CA.pem -root_CA.pem > client.pem".
+As the "root" super-user create the client.pem file with: + +++# umask 077 +# cat client_key.pem client_cert.pem intermediate_CA.pem > chain.pem ++
If you also want to verify remote SMTP server certificates issued by these CAs, you can add the CA certificates to the smtp_tls_CAfile, in which case it is not necessary to have them in the smtp_tls_cert_file, -smtp_tls_dcert_file or smtp_tls_eccert_file.
+smtp_tls_dcert_file (obsolete) or smtp_tls_eccert_file.A certificate supplied here must be usable as an SSL client certificate and hence pass the "openssl verify -purpose sslclient ..." test.
@@ -11989,12 +12021,164 @@ and hence pass the "openssl verify -purpose sslclient ..." test.Example:
-smtp_tls_cert_file = /etc/postfix/client.pem +smtp_tls_cert_file = /etc/postfix/chain.pem
This feature is available in Postfix 2.2 and later.
+ + +List of one or more PEM files, each holding one or more private keys +directly followed by a corresponding certificate chain. The file names +are separated by commas and/or whitespace. This parameter obsoletes the +legacy algorithm-specific key and certificate file settings. When this +parameter is non-empty, the legacy parameters are ignored, and a warning +is logged if any are also non-empty.
+ +With the proliferation of multiple private key algorithms—which, +as of OpenSSL 1.1.1, include DSA (obsolete), RSA, ECDSA, Ed25519 +and Ed448—it is increasingly impractical to use separate +parameters to configure the key and certificate chain for each +algorithm. Therefore, Postfix now supports storing multiple keys and +corresponding certificate chains in a single file or in a set of files. + +
Each key must appear immediately before the corresponding +certificate, optionally followed by additional issuer certificates that +complete the certificate chain for that key. When multiple files are +specified, they are equivalent to a single file that is concatenated +from those files in the given order. Thus, while a key must always +precede its certificate and issuer chain, it can be in a separate file, +so long as that file is listed immediately before the file that holds +the corresponding certificate chain. Once all the files are +concatenated, the sequence of PEM objects must be: key1, cert1, +[chain1], key2, cert2, [chain2], ..., keyN, certN, [chainN].
+ +Storing the private key in the same file as the corresponding +certificate is more reliable. With the key and certificate in separate +files, there is a chance that during key rollover a Postfix process +might load a private key and certificate from separate files that don't +match. Various operational errors may even result in a persistent +broken configuration in which the certificate does not match the private +key.
+ +The file or files must contain at most one key of each type. If, +for example, two or more RSA keys and corresponding chains are listed, +depending on the version of OpenSSL either only the last one will be +used or an configuration error may be detected. Note that while +"Ed25519" and "Ed448" are considered separate algorithms, the various +ECDSA curves (typically one of prime256v1, secp384r1 or secp521r1) are +considered as different parameters of a single "ECDSA" algorithm, so it +is not presently possible to configure keys for more than one ECDSA +curve.
+ ++Example (separate files for each key and corresponding certificate chain): +
+
+
+/etc/postfix/main.cf:
+ smtp_tls_chain_files =
+ ${config_directory}/ed25519.pem,
+ ${config_directory}/ed448.pem,
+ ${config_directory}/rsa.pem
+
+
+
+++ ++/etc/postfix/ed25519.pem: + -----BEGIN PRIVATE KEY----- + MC4CAQAwBQYDK2VwBCIEIEJfbbO4BgBQGBg9NAbIJaDBqZb4bC4cOkjtAH+Efbz3 + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIBKzCB3qADAgECAhQaw+rflRreYuUZBp0HuNn/e5rMZDAFBgMrZXAwFDESMBAG + ... + nC0egv51YPDWxEHom4QA + -----END CERTIFICATE----- ++
++ ++/etc/postfix/ed448.pem: + -----BEGIN PRIVATE KEY----- + MEcCAQAwBQYDK2VxBDsEOQf+m0P+G0qi+NZ0RolyeiE5zdlPQR8h8y4jByBifpIe + LNler7nzHQJ1SLcOiXFHXlxp/84VZuh32A== + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIBdjCB96ADAgECAhQSv4oP972KypOZPNPF4fmsiQoRHzAFBgMrZXEwFDESMBAG + ... + pQcWsx+4J29e6YWH3Cy/CdUaexKP4RPCZDrPX7bk5C2BQ+eeYOxyThMA + -----END CERTIFICATE----- ++
++ ++/etc/postfix/rsa.pem: + -----BEGIN PRIVATE KEY----- + MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDc4QusgkahH9rL + ... + ahQkZ3+krcaJvDSMgvu0tDc= + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIC+DCCAeCgAwIBAgIUIUkrbk1GAemPCT8i9wKsTGDH7HswDQYJKoZIhvcNAQEL + ... + Rirz15HGVNTK8wzFd+nulPzwUo6dH2IU8KazmyRi7OGvpyrMlm15TRE2oyE= + -----END CERTIFICATE----- ++
+Example (all keys and certificates in a single file): +
+
+
+/etc/postfix/main.cf:
+ smtp_tls_chain_files = ${config_directory}/chains.pem
+
+
+
+++ ++/etc/postfix/chains.pem: + -----BEGIN PRIVATE KEY----- + MC4CAQAwBQYDK2VwBCIEIEJfbbO4BgBQGBg9NAbIJaDBqZb4bC4cOkjtAH+Efbz3 + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIBKzCB3qADAgECAhQaw+rflRreYuUZBp0HuNn/e5rMZDAFBgMrZXAwFDESMBAG + ... + nC0egv51YPDWxEHom4QA + -----END CERTIFICATE----- + -----BEGIN PRIVATE KEY----- + MEcCAQAwBQYDK2VxBDsEOQf+m0P+G0qi+NZ0RolyeiE5zdlPQR8h8y4jByBifpIe + LNler7nzHQJ1SLcOiXFHXlxp/84VZuh32A== + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIBdjCB96ADAgECAhQSv4oP972KypOZPNPF4fmsiQoRHzAFBgMrZXEwFDESMBAG + ... + pQcWsx+4J29e6YWH3Cy/CdUaexKP4RPCZDrPX7bk5C2BQ+eeYOxyThMA + -----END CERTIFICATE----- + -----BEGIN PRIVATE KEY----- + MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDc4QusgkahH9rL + ... + ahQkZ3+krcaJvDSMgvu0tDc= + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIC+DCCAeCgAwIBAgIUIUkrbk1GAemPCT8i9wKsTGDH7HswDQYJKoZIhvcNAQEL + ... + Rirz15HGVNTK8wzFd+nulPzwUo6dH2IU8KazmyRi7OGvpyrMlm15TRE2oyE= + -----END CERTIFICATE----- ++
This feature is available in Postfix 3.4 and later.
+ +File with the Postfix SMTP client DSA certificate in PEM format. -This file may also contain the Postfix SMTP client private DSA key.
+This file may also contain the Postfix SMTP client private DSA key. +The DSA algorithm is obsolete and should not be used.See the discussion under smtp_tls_cert_file for more details.
@@ -12119,7 +12304,8 @@ This file may also contain the Postfix SMTP client private DSA key.File with the Postfix SMTP client DSA private key in PEM format. This file may be combined with the Postfix SMTP client DSA certificate -file specified with $smtp_tls_dcert_file.
+file specified with $smtp_tls_dcert_file. The DSA algorithm is obsolete +and should not be used.The private key must be accessible without a pass-phrase, i.e. it must not be encrypted. File permissions should grant read-only @@ -12135,7 +12321,9 @@ to anyone else.
(default: empty)File with the Postfix SMTP client ECDSA certificate in PEM format. -This file may also contain the Postfix SMTP client ECDSA private key.
+This file may also contain the Postfix SMTP client ECDSA private key. +With Postfix ≥ 3.4 the preferred way to configure client keys and +certificates is via the "smtp_tls_chain_files" parameter.See the discussion under smtp_tls_cert_file for more details.
@@ -12156,8 +12344,10 @@ compiled and linked with OpenSSL 1.0.0 or later. (default: $smtp_tls_eccert_file)File with the Postfix SMTP client ECDSA private key in PEM format. -This file may be combined with the Postfix SMTP client ECDSA -certificate file specified with $smtp_tls_eccert_file.
+This file may be combined with the Postfix SMTP client ECDSA certificate +file specified with $smtp_tls_eccert_file. With Postfix ≥ 3.4 the +preferred way to configure client keys and certificates is via the +"smtp_tls_chain_files" parameter.The private key must be accessible without a pass-phrase, i.e. it must not be encrypted. File permissions should grant read-only @@ -12407,7 +12597,9 @@ are not prepared to handle the new TLSA RRset.
File with the Postfix SMTP client RSA private key in PEM format. This file may be combined with the Postfix SMTP client RSA certificate -file specified with $smtp_tls_cert_file.
+file specified with $smtp_tls_cert_file. With Postfix ≥ 3.4 the +preferred way to configure client keys and certificates is via the +"smtp_tls_chain_files" parameter.The private key must be accessible without a pass-phrase, i.e. it must not be encrypted. File permissions should grant read-only @@ -13185,6 +13377,42 @@ Examples:
This feature is available in Postfix 2.3 and later.
+Optional name to send to the remote SMTP server in the TLS Server +Name Indication (SNI) extension. The SNI extension is always on when +DANE is used to authenticate the server, and in that case the SNI name +sent is the one required by RFC7672 and this parameter is ignored.
+ +Some SMTP servers use the received SNI name to select an appropriate +certificate chain to present to the client. While this may improve +interoperability with such servers, it may reduce interoperability with +other servers that choose to abort the connection when they don't have a +certificate chain configured for the requested name. Such servers +should select a default certificate chain and continue the handshake, +but some may not. Therefore, absent DANE, no SNI name is sent by +default.
+ +The SNI name must be either a valid DNS hostname, or else one of the +special values hostname or nexthop, which select either the +remote hostname or the nexthop domain respectively. DNS names for SNI must be +in A-label (punycode) form. Invalid DNS names log a configuration error +warning and mail delivery is deferred.
+ +Except when using a relayhost to forward all email, the only +sensible non-empty main.cf setting for this parameter is +hostname. Other non-empty values are only practical on a +per-destination basis via the servername attribute of the Postfix +TLS policy table. When +in doubt, leave this parameter empty, and configure per-destination SNI +as needed.
+ +This feature is available in Postfix 3.4 and later.
+ +File with the Postfix SMTP server RSA certificate in PEM format. -This file may also contain the Postfix SMTP server private RSA key.
+This file may also contain the Postfix SMTP server private RSA key. +With Postfix ≥ 3.4 the preferred way to configure server keys and +certificates is via the "smtpd_tls_chain_files" parameter.Public Internet MX hosts without certificates signed by a "reputable" CA must generate, and be prepared to present to most clients, a @@ -16506,15 +16736,22 @@ able to authenticate the server, but unless it is running Postfix 2.3 or similar software, it will still insist on a server certificate.
For servers that are not public Internet MX hosts, Postfix -2.3 supports configurations with no certificates. This entails the -use of just the anonymous TLS ciphers, which are not supported by -typical SMTP clients. Since such clients will not, as a rule, fall -back to plain text after a TLS handshake failure, the server will -be unable to receive email from TLS enabled clients. To avoid -accidental configurations with no certificates, Postfix 2.3 enables -certificate-less operation only when the administrator explicitly -sets "smtpd_tls_cert_file = none". This ensures that new Postfix -configurations will not accidentally run with no certificates.
+supports configurations with no certificates. This entails the use of +just the anonymous TLS ciphers, which are not supported by typical SMTP +clients. Since some clients may not fall back to plain text after a TLS +handshake failure, a certificate-less Postfix SMTP server will be unable +to receive email from some TLS-enabled clients. To avoid accidental +configurations with no certificates, Postfix enables certificate-less +operation only when the administrator explicitly sets +"smtpd_tls_cert_file = none". This ensures that new Postfix SMTP server +configurations will not accidentally enable TLS without certificates. + +Note that server certificates are not optional in TLS 1.3. To run +without certificates you'd have to disable the TLS 1.3 protocol by +including '!TLSv1.3' in "smtpd_tls_protocols" and perhaps also +"smtpd_tls_mandatory_protocols". It is simpler instead to just +configure a certificate chain. Certificate-less operation is not +recommended.
Both RSA and DSA certificates are supported. When both types are present, the cipher used determines which certificate will be @@ -16534,8 +16771,8 @@ root_CA.pem > server.pem".
If you also want to verify client certificates issued by these CAs, you can add the CA certificates to the smtpd_tls_CAfile, in which -case it is not necessary to have them in the smtpd_tls_cert_file or -smtpd_tls_dcert_file.
+case it is not necessary to have them in the smtpd_tls_cert_file, +smtpd_tls_dcert_file (obsolete) or smtpd_tls_eccert_file.A certificate supplied here must be usable as an SSL server certificate and hence pass the "openssl verify -purpose sslserver ..." test.
@@ -16549,6 +16786,164 @@ and hence pass the "openssl verify -purpose sslserver ..." test.This feature is available in Postfix 2.2 and later.
+List of one or more PEM files, each holding one or more private keys +directly followed by a corresponding certificate chain. The file names +are separated by commas and/or whitespace. This parameter obsoletes the +legacy algorithm-specific key and certificate file settings. When this +parameter is non-empty, the legacy parameters are ignored, and a warning +is logged if any are also non-empty.
+ +With the proliferation of multiple private key algorithms—which, +as of OpenSSL 1.1.1, include DSA (obsolete), RSA, ECDSA, Ed25519 +and Ed448—it is increasingly impractical to use separate +parameters to configure the key and certificate chain for each +algorithm. Therefore, Postfix now supports storing multiple keys and +corresponding certificate chains in a single file or in a set of files. + +
Each key must appear immediately before the corresponding +certificate, optionally followed by additional issuer certificates that +complete the certificate chain for that key. When multiple files are +specified, they are equivalent to a single file that is concatenated +from those files in the given order. Thus, while a key must always +precede its certificate and issuer chain, it can be in a separate file, +so long as that file is listed immediately before the file that holds +the corresponding certificate chain. Once all the files are +concatenated, the sequence of PEM objects must be: key1, cert1, +[chain1], key2, cert2, [chain2], ..., keyN, certN, [chainN].
+ +Storing the private key in the same file as the corresponding +certificate is more reliable. With the key and certificate in separate +files, there is a chance that during key rollover a Postfix process +might load a private key and certificate from separate files that don't +match. Various operational errors may even result in a persistent +broken configuration in which the certificate does not match the private +key.
+ +The file or files must contain at most one key of each type. If, +for example, two or more RSA keys and corresponding chains are listed, +depending on the version of OpenSSL either only the last one will be +used or an configuration error may be detected. Note that while +"Ed25519" and "Ed448" are considered separate algorithms, the various +ECDSA curves (typically one of prime256v1, secp384r1 or secp521r1) are +considered as different parameters of a single "ECDSA" algorithm, so it +is not presently possible to configure keys for more than one ECDSA +curve.
+ +RSA is still the most widely supported algorithm. Presently (late +2018), ECDSA support is common, but not yet universal, and Ed25519 and +Ed448 support is mostly absent. Therefore, an RSA key should generally +be configured, along with any additional keys for the other algorithms +when desired.
+ ++Example (separate files for each key and corresponding certificate chain): +
+
+
+/etc/postfix/main.cf:
+ smtpd_tls_chain_files =
+ ${config_directory}/ed25519.pem,
+ ${config_directory}/ed448.pem,
+ ${config_directory}/rsa.pem
+
+
+
+++ ++/etc/postfix/ed25519.pem: + -----BEGIN PRIVATE KEY----- + MC4CAQAwBQYDK2VwBCIEIEJfbbO4BgBQGBg9NAbIJaDBqZb4bC4cOkjtAH+Efbz3 + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIBKzCB3qADAgECAhQaw+rflRreYuUZBp0HuNn/e5rMZDAFBgMrZXAwFDESMBAG + ... + nC0egv51YPDWxEHom4QA + -----END CERTIFICATE----- ++
++ ++/etc/postfix/ed448.pem: + -----BEGIN PRIVATE KEY----- + MEcCAQAwBQYDK2VxBDsEOQf+m0P+G0qi+NZ0RolyeiE5zdlPQR8h8y4jByBifpIe + LNler7nzHQJ1SLcOiXFHXlxp/84VZuh32A== + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIBdjCB96ADAgECAhQSv4oP972KypOZPNPF4fmsiQoRHzAFBgMrZXEwFDESMBAG + ... + pQcWsx+4J29e6YWH3Cy/CdUaexKP4RPCZDrPX7bk5C2BQ+eeYOxyThMA + -----END CERTIFICATE----- ++
++ ++/etc/postfix/rsa.pem: + -----BEGIN PRIVATE KEY----- + MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDc4QusgkahH9rL + ... + ahQkZ3+krcaJvDSMgvu0tDc= + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIC+DCCAeCgAwIBAgIUIUkrbk1GAemPCT8i9wKsTGDH7HswDQYJKoZIhvcNAQEL + ... + Rirz15HGVNTK8wzFd+nulPzwUo6dH2IU8KazmyRi7OGvpyrMlm15TRE2oyE= + -----END CERTIFICATE----- ++
+Example (all keys and certificates in a single file): +
+
+
+/etc/postfix/main.cf:
+ smtpd_tls_chain_files = ${config_directory}/chains.pem
+
+
+
+++ ++/etc/postfix/chains.pem: + -----BEGIN PRIVATE KEY----- + MC4CAQAwBQYDK2VwBCIEIEJfbbO4BgBQGBg9NAbIJaDBqZb4bC4cOkjtAH+Efbz3 + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIBKzCB3qADAgECAhQaw+rflRreYuUZBp0HuNn/e5rMZDAFBgMrZXAwFDESMBAG + ... + nC0egv51YPDWxEHom4QA + -----END CERTIFICATE----- + -----BEGIN PRIVATE KEY----- + MEcCAQAwBQYDK2VxBDsEOQf+m0P+G0qi+NZ0RolyeiE5zdlPQR8h8y4jByBifpIe + LNler7nzHQJ1SLcOiXFHXlxp/84VZuh32A== + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIBdjCB96ADAgECAhQSv4oP972KypOZPNPF4fmsiQoRHzAFBgMrZXEwFDESMBAG + ... + pQcWsx+4J29e6YWH3Cy/CdUaexKP4RPCZDrPX7bk5C2BQ+eeYOxyThMA + -----END CERTIFICATE----- + -----BEGIN PRIVATE KEY----- + MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDc4QusgkahH9rL + ... + ahQkZ3+krcaJvDSMgvu0tDc= + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIC+DCCAeCgAwIBAgIUIUkrbk1GAemPCT8i9wKsTGDH7HswDQYJKoZIhvcNAQEL + ... + Rirz15HGVNTK8wzFd+nulPzwUo6dH2IU8KazmyRi7OGvpyrMlm15TRE2oyE= + -----END CERTIFICATE----- ++
This feature is available in Postfix 3.4 and later.
+ +File with the Postfix SMTP server DSA certificate in PEM format. -This file may also contain the Postfix SMTP server private DSA key.
+This file may also contain the Postfix SMTP server private DSA key. +The DSA algorithm is obsolete and should not be used.See the discussion under smtpd_tls_cert_file for more details.
@@ -16684,7 +17080,8 @@ configuration parameter.File with the Postfix SMTP server DSA private key in PEM format. This file may be combined with the Postfix SMTP server DSA certificate -file specified with $smtpd_tls_dcert_file.
+file specified with $smtpd_tls_dcert_file. The DSA algorithm is obsolete +and should not be used.The private key must be accessible without a pass-phrase, i.e. it must not be encrypted. File permissions should grant read-only @@ -16700,7 +17097,9 @@ to anyone else.
(default: empty)File with the Postfix SMTP server ECDSA certificate in PEM format. -This file may also contain the Postfix SMTP server private ECDSA key.
+This file may also contain the Postfix SMTP server private ECDSA key. +With Postfix ≥ 3.4 the preferred way to configure server keys and +certificates is via the "smtpd_tls_chain_files" parameter.See the discussion under smtpd_tls_cert_file for more details.
@@ -16721,7 +17120,9 @@ compiled and linked with OpenSSL 1.0.0 or later.File with the Postfix SMTP server ECDSA private key in PEM format. This file may be combined with the Postfix SMTP server ECDSA certificate -file specified with $smtpd_tls_eccert_file.
+file specified with $smtpd_tls_eccert_file. With Postfix ≥ 3.4 the +preferred way to configure server keys and certificates is via the +"smtpd_tls_chain_files" parameter.The private key must be accessible without a pass-phrase, i.e. it must not be encrypted. File permissions should grant read-only @@ -16930,7 +17331,9 @@ to Postfix 2.9.6 or later.
File with the Postfix SMTP server RSA private key in PEM format. This file may be combined with the Postfix SMTP server RSA certificate -file specified with $smtpd_tls_cert_file.
+file specified with $smtpd_tls_cert_file. With Postfix ≥ 3.4 the +preferred way to configure server keys and certificates is via the +"smtpd_tls_chain_files" parameter.The private key must be accessible without a pass-phrase, i.e. it must not be encrypted. File permissions should grant read-only @@ -18218,6 +18621,76 @@ gives timeout errors.
This feature is available in Postfix 2.2 and later.
+Optional lookup tables that map names received from remote SMTP +clients via the TLS Server Name Indication (SNI) extension to the +appropriate keys and certificate chains. This parameter is implemented +in the Postfix TLS library, and applies to both smtpd(8) and the SMTP +server mode of tlsproxy(8).
+ +The lookup key is either the verbatim SNI domain name or a an +ancestor domain prefixed with a leading dot. For internationalized +domains, the lookup key must be in IDNA 2008 A-label form (as +required in the TLS SNI extension).
+ +The mapping from an SNI domain name to a certificate chain is +typically indirect. In the input source files for "cdb", "hash", +"btree" or other tables that are converted to on-disk indexed files +via postmap(1), the value specified for each key is a list of +filenames. When postmap(1) is used with the -F option, the +generated table stores for each lookup key the base64-encoded +contents of the associated files. When querying tables via postmap +-Fq, the table value is decoded from base64, yielding the original +file content, plus a new line.
+ +With "regexp", "pcre", "inline", "texthash", "static" and similar +tables that are interpreted at run-time, and don't have a separate +source format, the table value is again a list files, that are read-in +when the table is opened.
+ +Thus, for example:
+ +++ ++$ postmap -Fq "" static:/etc/postfix/chain.pem | openssl dgst -sha1 +(stdin)= da39a3ee5e6b4b0d3255bfef95601890afd80709 ++
produces the same output as:
+ +++ ++$ (cat /etc/postfix/chain.pem; echo) | openssl dgst -sha1 +(stdin)= da39a3ee5e6b4b0d3255bfef95601890afd80709 ++
With tables whose content is managed outside of Postfix, such +as LDAP, MySQL, PostgreSQL, socketmap and tcp, the value must be a +concatenation of the desired PEM keys and certificate chains, that +is then further encoded to yield a single-line base64 string. +Creation of such tables and secure storage are outside the +responsibility of Postfix. With "socketmap" and "tcp" the data +would be transmitted in the clear. With LDAP and SQL, you should +generally use TLS to protect the sensitive data in transit.
+ +Typically there is only private key and its chain of certificates +starting with the "leaf" certificate corresponding to that key, and +continuing with the appropriate intermediate issuer CA certificates, +with each certificate ideally followed by its issuer. Servers +that have keys and certificates for more than one algorithm (e.g. +both an RSA key and an ECDSA key, or even RSA, ECDSA and Ed25519) +can use multiple chains concatenated together, with the key always +listed before the corresponding certificates.
+ +This feature is available in Postfix 3.4 and later.
+ +File with the Postfix tlsproxy(8) client RSA certificate in PEM -format. See smtp_tls_cert_file for further details.
+format. See smtp_tls_cert_file for further details. The preferred way +to configure tlsproxy client keys and certificates is via the +"tlsproxy_client_chain_files" parameter. + +This feature is available in Postfix 3.4 and later.
+ + +Files with the Postfix tlsproxy(8) client keys and certificate +chains in PEM format. See smtp_tls_chain_files for further details.
This feature is available in Postfix 3.4 and later.
@@ -18413,7 +18899,8 @@ format. See smtp_tls_cert_file (default: $smtp_tls_dcert_file)File with the Postfix tlsproxy(8) client DSA certificate in PEM -format. See smtp_tls_dcert_file for further details.
+format. See smtp_tls_dcert_file for further details. DSA is obsolete and +should not be used.This feature is available in Postfix 3.4 and later.
@@ -18424,7 +18911,8 @@ format. See smtp_tls_dcert_filesmtp_tls_dkey_file)File with the Postfix tlsproxy(8) client DSA private key in PEM -format. See smtp_tls_dkey_file for further details.
+format. See smtp_tls_dkey_file for further details. DSA is obsolete and +should not be used.This feature is available in Postfix 3.4 and later.
@@ -18434,8 +18922,10 @@ format. See smtp_tls_dkey_fileFile with the Postfix tlsproxy(8) client ECDSA certificate in -PEM format. See smtp_tls_eccert_file for further details.
+File with the Postfix tlsproxy(8) client ECDSA certificate in PEM +format. See smtp_tls_eccert_file for further details. The preferred way +to configure tlsproxy client keys and certificates is via the +"tlsproxy_client_chain_files" parameter.
This feature is available in Postfix 3.4 and later.
@@ -18445,8 +18935,10 @@ PEM format. See smtp_tls_eccert_fFile with the Postfix tlsproxy(8) client ECDSA private key in -PEM format. See smtp_tls_eckey_file for further details.
+File with the Postfix tlsproxy(8) client ECDSA private key in PEM +format. See smtp_tls_eckey_file for further details. The preferred way +to configure tlsproxy client keys and certificates is via the +"tlsproxy_client_chain_files" parameter.
This feature is available in Postfix 3.4 and later.
@@ -18480,7 +18972,9 @@ further details. (default: $smtp_tls_key_file)File with the Postfix tlsproxy(8) client RSA private key in PEM -format. See smtp_tls_key_file for further details.
+format. See smtp_tls_key_file for further details. The preferred way to +configure tlsproxy client keys and certificates is via the +"tlsproxy_client_chain_files" parameter.This feature is available in Postfix 3.4 and later.
@@ -18653,11 +19147,24 @@ file. See smtpd_tls_ccert_File with the Postfix tlsproxy(8) server RSA certificate in PEM format. This file may also contain the Postfix tlsproxy(8) server -private RSA key. See smtpd_tls_cert_file for further details.
+private RSA key. See smtpd_tls_cert_file for further details. With +Postfix ≥ 3.4 the preferred way to configure tlsproxy server keys and +certificates is via the "tlsproxy_tls_chain_files" parameter.This feature is available in Postfix 2.8 and later.
+Files with the Postfix tlsproxy(8) server keys and certificate +chains in PEM format. See smtpd_tls_chain_files for further details.
+ +This feature is available in Postfix 3.4 and later.
+ +File with the Postfix tlsproxy(8) server DSA certificate in PEM format. This file may also contain the Postfix tlsproxy(8) server -private DSA key. See smtpd_tls_dcert_file for further details. -
+private DSA key. DSA is obsolete and should not be used. See +smtpd_tls_dcert_file for further details.This feature is available in Postfix 2.8 and later.
@@ -18715,9 +19222,10 @@ result export-grade cipher suites are by default not used. (default: $smtpd_tls_dkey_file)File with the Postfix tlsproxy(8) server DSA private key in PEM -format. This file may be combined with the Postfix tlsproxy(8) -server DSA certificate file specified with $smtpd_tls_dcert_file. -See smtpd_tls_dkey_file for further details.
+format. This file may be combined with the Postfix tlsproxy(8) server +DSA certificate file specified with $smtpd_tls_dcert_file. DSA is +obsolete and should not be used. See smtpd_tls_dkey_file for further +details.This feature is available in Postfix 2.8 and later.
@@ -18727,10 +19235,11 @@ See smtpd_tls_dkey_file for fuFile with the Postfix tlsproxy(8) server ECDSA certificate in -PEM format. This file may also contain the Postfix tlsproxy(8) -server private ECDSA key. See smtpd_tls_eccert_file for further -details.
+File with the Postfix tlsproxy(8) server ECDSA certificate in PEM +format. This file may also contain the Postfix tlsproxy(8) server +private ECDSA key. See smtpd_tls_eccert_file for further details. With +Postfix ≥ 3.4 the preferred way to configure tlsproxy server keys and +certificates is via the "tlsproxy_tls_chain_files" parameter.
This feature is available in Postfix 2.8 and later.
@@ -18740,10 +19249,12 @@ details.File with the Postfix tlsproxy(8) server ECDSA private key in -PEM format. This file may be combined with the Postfix tlsproxy(8) -server ECDSA certificate file specified with $smtpd_tls_eccert_file. -See smtpd_tls_eckey_file for further details.
+File with the Postfix tlsproxy(8) server ECDSA private key in PEM +format. This file may be combined with the Postfix tlsproxy(8) server +ECDSA certificate file specified with $smtpd_tls_eccert_file. See +smtpd_tls_eckey_file for further details. With Postfix ≥ 3.4 the +preferred way to configure tlsproxy server keys and certificates is via +the "tlsproxy_tls_chain_files" parameter.
This feature is available in Postfix 2.8 and later.
@@ -18791,9 +19302,11 @@ fingerprints. See smtpd_t (default: $smtpd_tls_key_file)File with the Postfix tlsproxy(8) server RSA private key in PEM -format. This file may be combined with the Postfix tlsproxy(8) -server RSA certificate file specified with $smtpd_tls_cert_file. -See smtpd_tls_key_file for further details.
+format. This file may be combined with the Postfix tlsproxy(8) server +RSA certificate file specified with $smtpd_tls_cert_file. See +smtpd_tls_key_file for further details. With Postfix ≥ 3.4 the +preferred way to configure tlsproxy server keys and certificates is via +the "tlsproxy_tls_chain_files" parameter.This feature is available in Postfix 2.8 and later.
@@ -19381,7 +19894,7 @@ Do not change this unless you have a complete understanding of reject_tempfail_action) The Postfix SMTP server's action when reject_unknown_helo_hostname
-fails due to an temporary error condition. Specify "defer" to defer
+fails due to a temporary error condition. Specify "defer" to defer
the remote SMTP client request immediately. With the default
"defer_if_permit" action, the Postfix SMTP server continues to look
for opportunities to reject mail, and defers the client request
diff --git a/postfix/html/posttls-finger.1.html b/postfix/html/posttls-finger.1.html
index 780b5e267..4a47a4818 100644
--- a/postfix/html/posttls-finger.1.html
+++ b/postfix/html/posttls-finger.1.html
@@ -127,6 +127,17 @@ POSTTLS-FINGER(1) POSTTLS-FINGER(1)
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.
+ Each new key begins a new chain for the corresponding algorithm.
+ 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
defaults to keyfile if one is specified.
@@ -259,6 +270,13 @@ POSTTLS-FINGER(1) POSTTLS-FINGER(1)
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
+ 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
diff --git a/postfix/html/sendmail.1.html b/postfix/html/sendmail.1.html
index fa4e4828a..0d416c931 100644
--- a/postfix/html/sendmail.1.html
+++ b/postfix/html/sendmail.1.html
@@ -314,7 +314,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 trouble shoot a Postfix
+ The DEBUG_README file gives examples of how to troubleshoot a Postfix
system.
debugger_command (empty)
diff --git a/postfix/html/smtp.8.html b/postfix/html/smtp.8.html
index 2ac36e297..4bba215ad 100644
--- a/postfix/html/smtp.8.html
+++ b/postfix/html/smtp.8.html
@@ -578,6 +578,14 @@ SMTP(8) SMTP(8)
smtp_tls_connection_reuse (no)
Try to make multiple deliveries per TLS-encrypted connection.
+ smtp_tls_chain_files (empty)
+ List of one or more PEM files, each holding one or more private
+ keys directly followed by a corresponding certificate chain.
+
+ smtp_tls_servername (empty)
+ Optional name to send to the remote SMTP server in the TLS
+ Server Name Indication (SNI) extension.
+
OBSOLETE STARTTLS CONTROLS
The following configuration parameters exist for compatibility with
Postfix versions before 2.3. Support for these will be removed in a
diff --git a/postfix/html/smtpd.8.html b/postfix/html/smtpd.8.html
index a4f48c464..367e73472 100644
--- a/postfix/html/smtpd.8.html
+++ b/postfix/html/smtpd.8.html
@@ -578,13 +578,24 @@ SMTPD(8) SMTPD(8)
The prioritized list of elliptic curves supported by the Postfix
SMTP client and server.
+ Available in Postfix version 3.4 and later:
+
+ smtpd_tls_chain_files (empty)
+ List of one or more PEM files, each holding one or more private
+ keys directly followed by a corresponding certificate chain.
+
+ tls_server_sni_maps (empty)
+ Optional lookup tables that map names received from remote SMTP
+ clients via the TLS Server Name Indication (SNI) extension to
+ the appropriate keys and certificate chains.
+
OBSOLETE STARTTLS CONTROLS
- The following configuration parameters exist for compatibility with
- Postfix versions before 2.3. Support for these will be removed in a
+ The following configuration parameters exist for compatibility with
+ Postfix versions before 2.3. Support for these will be removed in a
future release.
smtpd_use_tls (no)
- Opportunistic TLS: announce STARTTLS support to remote SMTP
+ Opportunistic TLS: announce STARTTLS support to remote SMTP
clients, but do not require that clients use TLS encryption.
smtpd_enforce_tls (no)
@@ -592,92 +603,92 @@ SMTPD(8) SMTPD(8)
and require that clients use TLS encryption.
smtpd_tls_cipherlist (empty)
- Obsolete Postfix < 2.3 control for the Postfix SMTP server TLS
+ Obsolete Postfix < 2.3 control for the Postfix SMTP server TLS
cipher list.
SMTPUTF8 CONTROLS
Preliminary SMTPUTF8 support is introduced with Postfix 3.0.
smtputf8_enable (yes)
- Enable preliminary SMTPUTF8 support for the protocols described
+ Enable preliminary SMTPUTF8 support for the protocols described
in RFC 6531..6533.
strict_smtputf8 (no)
Enable stricter enforcement of the SMTPUTF8 protocol.
smtputf8_autodetect_classes (sendmail, verify)
- Detect that a message requires SMTPUTF8 support for the speci-
+ Detect that a message requires SMTPUTF8 support for the speci-
fied mail origin classes.
Available in Postfix version 3.2 and later:
enable_idna2003_compatibility (no)
- Enable 'transitional' compatibility between IDNA2003 and
- IDNA2008, when converting UTF-8 domain names to/from the ASCII
+ Enable 'transitional' compatibility between IDNA2003 and
+ IDNA2008, when converting UTF-8 domain names to/from the ASCII
form that is used for DNS lookups.
VERP SUPPORT CONTROLS
- With VERP style delivery, each recipient of a message receives a cus-
- tomized copy of the message with his/her own recipient address encoded
+ With VERP style delivery, each recipient of a message receives a cus-
+ tomized copy of the message with his/her own recipient address encoded
in the envelope sender address. The VERP_README file describes config-
- uration and operation details of Postfix support for variable envelope
- return path addresses. VERP style delivery is requested with the SMTP
- XVERP command or with the "sendmail -V" command-line option and is
+ uration and operation details of Postfix support for variable envelope
+ return path addresses. VERP style delivery is requested with the SMTP
+ XVERP command or with the "sendmail -V" command-line option and is
available in Postfix version 1.1 and later.
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.
Available in Postfix version 1.1 and 2.0:
authorized_verp_clients ($mynetworks)
- What remote SMTP clients are allowed to specify the XVERP com-
+ What remote SMTP clients are allowed to specify the XVERP com-
mand.
Available in Postfix version 2.1 and later:
smtpd_authorized_verp_clients ($authorized_verp_clients)
- What remote SMTP clients are allowed to specify the XVERP com-
+ What remote SMTP clients are allowed to specify the XVERP com-
mand.
TROUBLE SHOOTING CONTROLS
- The DEBUG_README document describes how to debug parts of the Postfix
- mail system. The methods vary from making the software log a lot of
+ The DEBUG_README document describes how to debug parts of the 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.
debug_peer_level (2)
- The increment in verbose logging level when a remote client or
+ The increment in verbose logging level when a remote client or
server matches a pattern in the debug_peer_list parameter.
debug_peer_list (empty)
- Optional list of remote client or server hostname or network
+ 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.
error_notice_recipient (postmaster)
- The recipient of postmaster notifications about mail delivery
+ The recipient of postmaster notifications about mail delivery
problems that are caused by policy, resource, software or proto-
col errors.
internal_mail_filter_classes (empty)
- What categories of Postfix-generated mail are subject to
- before-queue content inspection by non_smtpd_milters,
+ What categories of Postfix-generated mail are subject to
+ before-queue content inspection by non_smtpd_milters,
header_checks and body_checks.
notify_classes (resource, software)
The list of error classes that are reported to the postmaster.
smtpd_reject_footer (empty)
- Optional information that is appended after each Postfix SMTP
+ Optional information that is appended after each Postfix SMTP
server 4XX or 5XX response.
soft_bounce (no)
- Safety net to keep mail queued that would otherwise be returned
+ Safety net to keep mail queued that would otherwise be returned
to the sender.
Available in Postfix version 2.1 and later:
@@ -688,109 +699,109 @@ SMTPD(8) SMTPD(8)
Available in Postfix version 2.10 and later:
smtpd_log_access_permit_actions (empty)
- Enable logging of the named "permit" actions in SMTP server
- access lists (by default, the SMTP server logs "reject" actions
+ Enable logging of the named "permit" actions in SMTP server
+ access lists (by default, the SMTP server logs "reject" actions
but not "permit" actions).
KNOWN VERSUS UNKNOWN RECIPIENT CONTROLS
- As of Postfix version 2.0, the SMTP server rejects mail for unknown
+ As of Postfix version 2.0, the SMTP server rejects mail for unknown
recipients. This prevents the mail queue from clogging up with undeliv-
- erable MAILER-DAEMON messages. Additional information on this topic is
+ erable MAILER-DAEMON messages. Additional information on this topic is
in the LOCAL_RECIPIENT_README and ADDRESS_CLASS_README documents.
show_user_unknown_table_name (yes)
- Display the name of the recipient table in the "User unknown"
+ Display the name of the recipient table in the "User unknown"
responses.
canonical_maps (empty)
- Optional address mapping lookup tables for message headers and
+ Optional address mapping lookup tables for message headers and
envelopes.
recipient_canonical_maps (empty)
- Optional address mapping lookup tables for envelope and header
+ Optional address mapping lookup tables for envelope and header
recipient addresses.
sender_canonical_maps (empty)
- Optional address mapping lookup tables for envelope and header
+ Optional address mapping lookup tables for envelope and header
sender addresses.
Parameters concerning known/unknown local recipients:
mydestination ($myhostname, localhost.$mydomain, localhost)
- The list of domains that are delivered via the $local_transport
+ The list of domains that are delivered via the $local_transport
mail delivery transport.
inet_interfaces (all)
- The network interface addresses that this mail system receives
+ The network interface addresses that this mail system receives
mail on.
proxy_interfaces (empty)
- The network interface addresses that this mail system receives
+ The network interface addresses that this mail system receives
mail on by way of a proxy or network address translation unit.
inet_protocols (all)
- The Internet protocols Postfix will attempt to use when making
+ The Internet protocols Postfix will attempt to use when making
or accepting connections.
local_recipient_maps (proxy:unix:passwd.byname $alias_maps)
Lookup tables with all names or addresses of local recipients: a
- recipient address is local when its domain matches $mydestina-
+ recipient address is local when its domain matches $mydestina-
tion, $inet_interfaces or $proxy_interfaces.
unknown_local_recipient_reject_code (550)
The numerical Postfix SMTP server response code when a recipient
- address is local, and $local_recipient_maps specifies a list of
+ address is local, and $local_recipient_maps specifies a list of
lookup tables that does not match the recipient.
Parameters concerning known/unknown recipients of relay destinations:
relay_domains (Postfix >= 3.0: empty, Postfix < 3.0: $mydestination)
- What destination domains (and subdomains thereof) this system
+ What destination domains (and subdomains thereof) this system
will relay mail to.
relay_recipient_maps (empty)
- Optional lookup tables with all valid addresses in the domains
+ Optional lookup tables with all valid addresses in the domains
that match $relay_domains.
unknown_relay_recipient_reject_code (550)
- The numerical Postfix SMTP server reply code when a recipient
- address matches $relay_domains, and relay_recipient_maps speci-
- fies a list of lookup tables that does not match the recipient
+ The numerical Postfix SMTP server reply code when a recipient
+ address matches $relay_domains, and relay_recipient_maps speci-
+ fies a list of lookup tables that does not match the recipient
address.
- Parameters concerning known/unknown recipients in virtual alias
+ Parameters concerning known/unknown recipients in virtual alias
domains:
virtual_alias_domains ($virtual_alias_maps)
- Postfix is final destination for the specified list of virtual
- alias domains, that is, domains for which all addresses are
+ Postfix is final destination for the specified list of virtual
+ alias domains, that is, domains for which all addresses are
aliased to addresses in other local or remote domains.
virtual_alias_maps ($virtual_maps)
- Optional lookup tables that alias specific mail addresses or
+ Optional lookup tables that alias specific mail addresses or
domains to other local or remote address.
unknown_virtual_alias_reject_code (550)
- The Postfix SMTP server reply code when a recipient address
- matches $virtual_alias_domains, and $virtual_alias_maps speci-
- fies a list of lookup tables that does not match the recipient
+ The Postfix SMTP server reply code when a recipient address
+ matches $virtual_alias_domains, and $virtual_alias_maps speci-
+ fies a list of lookup tables that does not match the recipient
address.
Parameters concerning known/unknown recipients in virtual mailbox
domains:
virtual_mailbox_domains ($virtual_mailbox_maps)
- Postfix is final destination for the specified list of domains;
- mail is delivered via the $virtual_transport mail delivery
+ Postfix is final destination for the specified list of domains;
+ mail is delivered via the $virtual_transport mail delivery
transport.
virtual_mailbox_maps (empty)
- Optional lookup tables with all valid addresses in the domains
+ Optional lookup tables with all valid addresses in the domains
that match $virtual_mailbox_domains.
unknown_virtual_mailbox_reject_code (550)
- The Postfix SMTP server reply code when a recipient address
- matches $virtual_mailbox_domains, and $virtual_mailbox_maps
+ The Postfix SMTP server reply code when a recipient address
+ matches $virtual_mailbox_domains, and $virtual_mailbox_maps
specifies a list of lookup tables that does not match the recip-
ient address.
@@ -799,7 +810,7 @@ SMTPD(8) SMTPD(8)
control client request rates.
line_length_limit (2048)
- Upon input, long lines are chopped up into pieces of at most
+ Upon input, long lines are chopped up into pieces of at most
this length; upon delivery, long lines are reconstructed.
queue_minfree (0)
@@ -807,58 +818,58 @@ SMTPD(8) SMTPD(8)
tem that is needed to receive mail.
message_size_limit (10240000)
- The maximal size in bytes of a message, including envelope
+ The maximal size in bytes of a message, including envelope
information.
smtpd_recipient_limit (1000)
- The maximal number of recipients that the Postfix SMTP server
+ The maximal number of recipients that the Postfix SMTP server
accepts per message delivery request.
smtpd_timeout (normal: 300s, overload: 10s)
- The time limit for sending a Postfix SMTP server response and
+ The time limit for sending a Postfix SMTP server response and
for receiving a remote SMTP client request.
smtpd_history_flush_threshold (100)
- The maximal number of lines in the Postfix SMTP server command
- history before it is flushed upon receipt of EHLO, RSET, or end
+ The maximal number of lines in the Postfix SMTP server command
+ history before it is flushed upon receipt of EHLO, RSET, or end
of DATA.
Available in Postfix version 2.3 and later:
smtpd_peername_lookup (yes)
- Attempt to look up the remote SMTP client hostname, and verify
+ Attempt to look up the remote SMTP client hostname, and verify
that the name matches the client IP address.
The per SMTP client connection count and request rate limits are imple-
- mented in co-operation with the anvil(8) service, and are available in
+ mented in co-operation with the anvil(8) service, and are available in
Postfix version 2.2 and later.
smtpd_client_connection_count_limit (50)
- How many simultaneous connections any client is allowed to make
+ How many simultaneous connections any client is allowed to make
to this service.
smtpd_client_connection_rate_limit (0)
- The maximal number of connection attempts any client is allowed
+ The maximal number of connection attempts any client is allowed
to make to this service per time unit.
smtpd_client_message_rate_limit (0)
- The maximal number of message delivery requests that any client
- is allowed to make to this service per time unit, regardless of
+ The maximal number of message delivery requests that any client
+ is allowed to make to this service per time unit, regardless of
whether or not Postfix actually accepts those messages.
smtpd_client_recipient_rate_limit (0)
- The maximal number of recipient addresses that any client is
- allowed to send to this service per time unit, regardless of
+ The maximal number of recipient addresses that any client is
+ allowed to send to this service per time unit, regardless of
whether or not Postfix actually accepts those recipients.
smtpd_client_event_limit_exceptions ($mynetworks)
- Clients that are excluded from smtpd_client_*_count/rate_limit
+ Clients that are excluded from smtpd_client_*_count/rate_limit
restrictions.
Available in Postfix version 2.3 and later:
smtpd_client_new_tls_session_rate_limit (0)
- The maximal number of new (i.e., uncached) TLS sessions that a
+ The maximal number of new (i.e., uncached) TLS sessions that a
remote SMTP client is allowed to negotiate with this service per
time unit.
@@ -866,68 +877,68 @@ SMTPD(8) SMTPD(8)
smtpd_per_record_deadline (normal: no, overload: yes)
Change the behavior of the smtpd_timeout and smtpd_start-
- tls_timeout time limits, from a time limit per read or write
- system call, to a time limit to send or receive a complete
- record (an SMTP command line, SMTP response line, SMTP message
+ tls_timeout time limits, from a time limit per read or write
+ system call, to a time limit to send or receive a complete
+ record (an SMTP command line, SMTP response line, SMTP message
content line, or TLS protocol message).
Available in Postfix version 3.1 and later:
smtpd_client_auth_rate_limit (0)
- The maximal number of AUTH commands that any client is allowed
- to send to this service per time unit, regardless of whether or
+ The maximal number of AUTH commands that any client is allowed
+ to send to this service per time unit, regardless of whether or
not Postfix actually accepts those commands.
TARPIT CONTROLS
- When a remote SMTP client makes errors, the Postfix SMTP server can
- insert delays before responding. This can help to slow down run-away
- software. The behavior is controlled by an error counter that counts
+ When a remote SMTP client makes errors, the Postfix SMTP server can
+ insert delays before responding. This can help to slow down run-away
+ software. The behavior is controlled by an error counter that counts
the number of errors within an SMTP session that a client makes without
delivering mail.
smtpd_error_sleep_time (1s)
- With Postfix version 2.1 and later: the SMTP server response
- delay after a client has made more than $smtpd_soft_error_limit
- errors, and fewer than $smtpd_hard_error_limit errors, without
+ With Postfix version 2.1 and later: the SMTP server response
+ delay after a client has made more than $smtpd_soft_error_limit
+ errors, and fewer than $smtpd_hard_error_limit errors, without
delivering mail.
smtpd_soft_error_limit (10)
- The number of errors a remote SMTP client is allowed to make
- without delivering mail before the Postfix SMTP server slows
+ The number of errors a remote SMTP client is allowed to make
+ without delivering mail before the Postfix SMTP server slows
down all its responses.
smtpd_hard_error_limit (normal: 20, overload: 1)
- The maximal number of errors a remote SMTP client is allowed to
+ The maximal number of errors a remote SMTP client is allowed to
make without delivering mail.
smtpd_junk_command_limit (normal: 100, overload: 1)
- The number of junk commands (NOOP, VRFY, ETRN or RSET) that a
- remote SMTP client can send before the Postfix SMTP server
+ The number of junk commands (NOOP, VRFY, ETRN or RSET) that a
+ remote SMTP client can send before the Postfix SMTP server
starts to increment the error counter with each junk command.
Available in Postfix version 2.1 and later:
smtpd_recipient_overshoot_limit (1000)
- The number of recipients that a remote SMTP client can send in
+ The number of recipients that a remote SMTP client can send in
excess of the limit specified with $smtpd_recipient_limit,
- before the Postfix SMTP server increments the per-session error
+ before the Postfix SMTP server increments the per-session error
count for each excess recipient.
ACCESS POLICY DELEGATION CONTROLS
- As of version 2.1, Postfix can be configured to delegate access policy
- decisions to an external server that runs outside Postfix. See the
+ As of version 2.1, Postfix can be configured to delegate access policy
+ decisions to an external server that runs outside Postfix. See the
file SMTPD_POLICY_README for more information.
smtpd_policy_service_max_idle (300s)
- The time after which an idle SMTPD policy service connection is
+ The time after which an idle SMTPD policy service connection is
closed.
smtpd_policy_service_max_ttl (1000s)
- The time after which an active SMTPD policy service connection
+ The time after which an active SMTPD policy service connection
is closed.
smtpd_policy_service_timeout (100s)
- The time limit for connecting to, writing to, or receiving from
+ The time limit for connecting to, writing to, or receiving from
a delegated SMTPD policy server.
Available in Postfix version 3.0 and later:
@@ -937,81 +948,81 @@ SMTPD(8) SMTPD(8)
The default action when an SMTPD policy service request fails.
smtpd_policy_service_request_limit (0)
- The maximal number of requests per SMTPD policy service connec-
+ The maximal number of requests per SMTPD policy service connec-
tion, or zero (no limit).
smtpd_policy_service_try_limit (2)
- The maximal number of attempts to send an SMTPD policy service
+ The maximal number of attempts to send an SMTPD policy service
request before giving up.
smtpd_policy_service_retry_delay (1s)
- The delay between attempts to resend a failed SMTPD policy ser-
+ The delay between attempts to resend a failed SMTPD policy ser-
vice request.
Available in Postfix version 3.1 and later:
smtpd_policy_service_policy_context (empty)
- Optional information that the Postfix SMTP server specifies in
- the "policy_context" attribute of a policy service request
- (originally, to share the same service endpoint among multiple
+ Optional information that the Postfix SMTP server specifies in
+ the "policy_context" attribute of a policy service request
+ (originally, to share the same service endpoint among multiple
check_policy_service clients).
ACCESS CONTROLS
- The SMTPD_ACCESS_README document gives an introduction to all the SMTP
+ The SMTPD_ACCESS_README document gives an introduction to all the SMTP
server access control features.
smtpd_delay_reject (yes)
- Wait until the RCPT TO command before evaluating
+ Wait until the RCPT TO command before evaluating
$smtpd_client_restrictions, $smtpd_helo_restrictions and
$smtpd_sender_restrictions, or wait until the ETRN command
- before evaluating $smtpd_client_restrictions and
+ before evaluating $smtpd_client_restrictions and
$smtpd_helo_restrictions.
parent_domain_matches_subdomains (see 'postconf -d' output)
- A list of Postfix features where the pattern "example.com" also
- matches subdomains of example.com, instead of requiring an
+ A list of Postfix features where the pattern "example.com" also
+ matches subdomains of example.com, instead of requiring an
explicit ".example.com" pattern.
smtpd_client_restrictions (empty)
- Optional restrictions that the Postfix SMTP server applies in
+ Optional restrictions that the Postfix SMTP server applies in
the context of a client connection request.
smtpd_helo_required (no)
- Require that a remote SMTP client introduces itself with the
- HELO or EHLO command before sending the MAIL command or other
+ Require that a remote SMTP client introduces itself with the
+ HELO or EHLO command before sending the MAIL command or other
commands that require EHLO negotiation.
smtpd_helo_restrictions (empty)
- Optional restrictions that the Postfix SMTP server applies in
+ Optional restrictions that the Postfix SMTP server applies in
the context of a client HELO command.
smtpd_sender_restrictions (empty)
- Optional restrictions that the Postfix SMTP server applies in
+ Optional restrictions that the Postfix SMTP server applies in
the context of a client MAIL FROM command.
smtpd_recipient_restrictions (see 'postconf -d' output)
- Optional restrictions that the Postfix SMTP server applies in
- the context of a client RCPT TO command, after
+ Optional restrictions that the Postfix SMTP server applies in
+ the context of a client RCPT TO command, after
smtpd_relay_restrictions.
smtpd_etrn_restrictions (empty)
- Optional restrictions that the Postfix SMTP server applies in
+ Optional restrictions that the Postfix SMTP server applies in
the context of a client ETRN command.
allow_untrusted_routing (no)
- Forward mail with sender-specified routing
- (user[@%!]remote[@%!]site) from untrusted clients to destina-
+ Forward mail with sender-specified routing
+ (user[@%!]remote[@%!]site) from untrusted clients to destina-
tions matching $relay_domains.
smtpd_restriction_classes (empty)
User-defined aliases for groups of access restrictions.
smtpd_null_access_lookup_key (<>)
- The lookup key to be used in SMTP access(5) tables instead of
+ The lookup key to be used in SMTP access(5) tables instead of
the null sender address.
permit_mx_backup_networks (empty)
- Restrict the use of the permit_mx_backup SMTP access feature to
+ Restrict the use of the permit_mx_backup SMTP access feature to
only domains whose primary MX hosts match the listed networks.
Available in Postfix version 2.0 and later:
@@ -1021,19 +1032,19 @@ SMTPD(8) SMTPD(8)
applies in the context of the SMTP DATA command.
smtpd_expansion_filter (see 'postconf -d' output)
- What characters are allowed in $name expansions of RBL reply
+ What characters are allowed in $name expansions of RBL reply
templates.
Available in Postfix version 2.1 and later:
smtpd_reject_unlisted_sender (no)
- Request that the Postfix SMTP server rejects mail from unknown
- sender addresses, even when no explicit reject_unlisted_sender
+ Request that the Postfix SMTP server rejects mail from unknown
+ sender addresses, even when no explicit reject_unlisted_sender
access restriction is specified.
smtpd_reject_unlisted_recipient (yes)
- Request that the Postfix SMTP server rejects mail for unknown
- recipient addresses, even when no explicit
+ Request that the Postfix SMTP server rejects mail for unknown
+ recipient addresses, even when no explicit
reject_unlisted_recipient access restriction is specified.
Available in Postfix version 2.2 and later:
@@ -1047,17 +1058,17 @@ SMTPD(8) SMTPD(8)
smtpd_relay_restrictions (permit_mynetworks, permit_sasl_authenticated,
defer_unauth_destination)
Access restrictions for mail relay control that the Postfix SMTP
- server applies in the context of the RCPT TO command, before
+ server applies in the context of the RCPT TO command, before
smtpd_recipient_restrictions.
SENDER AND RECIPIENT ADDRESS VERIFICATION CONTROLS
- Postfix version 2.1 introduces sender and recipient address verifica-
+ Postfix version 2.1 introduces sender and recipient address verifica-
tion. This feature is implemented by sending probe email messages that
are not actually delivered. This feature is requested via the
- reject_unverified_sender and reject_unverified_recipient access
- restrictions. The status of verification probes is maintained by the
- verify(8) server. See the file ADDRESS_VERIFICATION_README for infor-
- mation about how to configure and operate the Postfix sender/recipient
+ reject_unverified_sender and reject_unverified_recipient access
+ restrictions. The status of verification probes is maintained by the
+ verify(8) server. See the file ADDRESS_VERIFICATION_README for infor-
+ mation about how to configure and operate the Postfix sender/recipient
address verification service.
address_verify_poll_count (normal: 3, overload: 1)
@@ -1069,7 +1080,7 @@ SMTPD(8) SMTPD(8)
fication request in progress.
address_verify_sender ($double_bounce_sender)
- The sender address to use in address verification probes; prior
+ The sender address to use in address verification probes; prior
to Postfix 2.5 the default was "postmaster".
unverified_sender_reject_code (450)
@@ -1077,18 +1088,18 @@ SMTPD(8) SMTPD(8)
address is rejected by the reject_unverified_sender restriction.
unverified_recipient_reject_code (450)
- The numerical Postfix SMTP server response when a recipient
- address is rejected by the reject_unverified_recipient restric-
+ The numerical Postfix SMTP server response when a recipient
+ address is rejected by the reject_unverified_recipient restric-
tion.
Available in Postfix version 2.6 and later:
unverified_sender_defer_code (450)
- The numerical Postfix SMTP server response code when a sender
+ The numerical Postfix SMTP server response code when a sender
address probe fails due to a temporary error condition.
unverified_recipient_defer_code (450)
- The numerical Postfix SMTP server response when a recipient
+ The numerical Postfix SMTP server response when a recipient
address probe fails due to a temporary error condition.
unverified_sender_reject_reason (empty)
@@ -1100,17 +1111,17 @@ SMTPD(8) SMTPD(8)
reject_unverified_recipient.
unverified_sender_tempfail_action ($reject_tempfail_action)
- The Postfix SMTP server's action when reject_unverified_sender
+ The Postfix SMTP server's action when reject_unverified_sender
fails due to a temporary error condition.
unverified_recipient_tempfail_action ($reject_tempfail_action)
- The Postfix SMTP server's action when reject_unverified_recipi-
+ The Postfix SMTP server's action when reject_unverified_recipi-
ent fails due to a temporary error condition.
Available with Postfix 2.9 and later:
address_verify_sender_ttl (0s)
- The time between changes in the time-dependent portion of
+ The time between changes in the time-dependent portion of
address verification probe sender addresses.
ACCESS CONTROL RESPONSES
@@ -1122,36 +1133,36 @@ SMTPD(8) SMTPD(8)
map "reject" action.
defer_code (450)
- The numerical Postfix SMTP server response code when a remote
+ The numerical Postfix SMTP server response code when a remote
SMTP client request is rejected by the "defer" restriction.
invalid_hostname_reject_code (501)
- The numerical Postfix SMTP server response code when the client
- HELO or EHLO command parameter is rejected by the
+ The numerical Postfix SMTP server response code when the client
+ HELO or EHLO command parameter is rejected by the
reject_invalid_helo_hostname restriction.
maps_rbl_reject_code (554)
- The numerical Postfix SMTP server response code when a remote
- SMTP client request is blocked by the reject_rbl_client,
+ The numerical Postfix SMTP server response code when a remote
+ SMTP client request is blocked by the reject_rbl_client,
reject_rhsbl_client, reject_rhsbl_reverse_client,
reject_rhsbl_sender or reject_rhsbl_recipient restriction.
non_fqdn_reject_code (504)
- The numerical Postfix SMTP server reply code when a client
- request is rejected by the reject_non_fqdn_helo_hostname,
+ The numerical Postfix SMTP server reply code when a client
+ request is rejected by the reject_non_fqdn_helo_hostname,
reject_non_fqdn_sender or reject_non_fqdn_recipient restriction.
plaintext_reject_code (450)
- The numerical Postfix SMTP server response code when a request
+ The numerical Postfix SMTP server response code when a request
is rejected by the reject_plaintext_session restriction.
reject_code (554)
- The numerical Postfix SMTP server response code when a remote
+ The numerical Postfix SMTP server response code when a remote
SMTP client request is rejected by the "reject" restriction.
relay_domains_reject_code (554)
- The numerical Postfix SMTP server response code when a client
- request is rejected by the reject_unauth_destination recipient
+ The numerical Postfix SMTP server response code when a client
+ request is rejected by the reject_unauth_destination recipient
restriction.
unknown_address_reject_code (450)
@@ -1159,24 +1170,24 @@ SMTPD(8) SMTPD(8)
a sender or recipient address because its domain is unknown.
unknown_client_reject_code (450)
- The numerical Postfix SMTP server response code when a client
- without valid address <=> name mapping is rejected by the
+ The numerical Postfix SMTP server response code when a client
+ without valid address <=> name mapping is rejected by the
reject_unknown_client_hostname restriction.
unknown_hostname_reject_code (450)
- The numerical Postfix SMTP server response code when the host-
- name specified with the HELO or EHLO command is rejected by the
+ The numerical Postfix SMTP server response code when the host-
+ name specified with the HELO or EHLO command is rejected by the
reject_unknown_helo_hostname restriction.
Available in Postfix version 2.0 and later:
default_rbl_reply (see 'postconf -d' output)
- The default Postfix SMTP server response template for a request
+ The default Postfix SMTP server response template for a request
that is rejected by an RBL-based restriction.
multi_recipient_bounce_reject_code (550)
- The numerical Postfix SMTP server response code when a remote
- SMTP client request is blocked by the reject_multi_recipi-
+ The numerical Postfix SMTP server response code when a remote
+ SMTP client request is blocked by the reject_multi_recipi-
ent_bounce restriction.
rbl_reply_maps (empty)
@@ -1186,52 +1197,52 @@ SMTPD(8) SMTPD(8)
access_map_defer_code (450)
The numerical Postfix SMTP server response code for an access(5)
- map "defer" action, including "defer_if_permit" or
+ map "defer" action, including "defer_if_permit" or
"defer_if_reject".
reject_tempfail_action (defer_if_permit)
- The Postfix SMTP server's action when a reject-type restriction
+ The Postfix SMTP server's action when a reject-type restriction
fails due to a temporary error condition.
unknown_helo_hostname_tempfail_action ($reject_tempfail_action)
- The Postfix SMTP server's action when reject_unknown_helo_host-
- name fails due to an temporary error condition.
+ The Postfix SMTP server's action when reject_unknown_helo_host-
+ name fails due to a temporary error condition.
unknown_address_tempfail_action ($reject_tempfail_action)
- The Postfix SMTP server's action when
- reject_unknown_sender_domain or reject_unknown_recipient_domain
+ The Postfix SMTP server's action when
+ reject_unknown_sender_domain or reject_unknown_recipient_domain
fail due to a temporary error condition.
MISCELLANEOUS CONTROLS
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_timeout (18000s)
- How much time a Postfix daemon process may take to handle a
+ How much time a Postfix daemon process may take to handle a
request before it is terminated by a built-in watchdog timer.
command_directory (see 'postconf -d' output)
The location of all postfix administrative commands.
double_bounce_sender (double-bounce)
- The sender address of postmaster notifications that are gener-
+ The sender address of postmaster notifications that are gener-
ated by the mail system.
ipc_timeout (3600s)
- The time limit for sending or receiving information over an
+ The time limit for sending or receiving information over an
internal communication channel.
mail_name (Postfix)
- The mail system name that is displayed in Received: headers, in
+ The mail system name that is displayed in Received: headers, in
the SMTP greeting banner, and in bounced mail.
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.
max_idle (100s)
- The maximum amount of time that an idle Postfix daemon process
+ The maximum amount of time that an idle Postfix daemon process
waits for an incoming connection before terminating voluntarily.
max_use (100)
@@ -1242,11 +1253,11 @@ SMTPD(8) SMTPD(8)
The internet hostname of this mail system.
mynetworks (see 'postconf -d' output)
- The list of "trusted" remote SMTP clients that have more privi-
+ The list of "trusted" remote SMTP clients that have more privi-
leges than "strangers".
myorigin ($myhostname)
- The domain name that locally-posted mail appears to come from,
+ The domain name that locally-posted mail appears to come from,
and that locally posted mail is delivered to.
process_id (read-only)
@@ -1259,25 +1270,25 @@ SMTPD(8) SMTPD(8)
The location of the Postfix top-level queue directory.
recipient_delimiter (empty)
- The set of characters that can separate a user name from its
- extension (example: user+foo), or a .forward file name from its
+ The set of characters that can separate a user name from its
+ extension (example: user+foo), or a .forward file name from its
extension (example: .forward+foo).
smtpd_banner ($myhostname ESMTP $mail_name)
- The text that follows the 220 status code in the SMTP greeting
+ The text that follows the 220 status code in the SMTP greeting
banner.
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".
Available in Postfix version 2.2 and later:
smtpd_forbidden_commands (CONNECT, GET, POST)
- List of commands that cause the Postfix SMTP server to immedi-
+ List of commands that cause the Postfix SMTP server to immedi-
ately terminate the session with a 221 code.
Available in Postfix version 2.5 and later:
@@ -1294,7 +1305,7 @@ SMTPD(8) SMTPD(8)
Available in Postfix 3.4 and later:
smtpd_reject_footer_maps (empty)
- Lookup tables, indexed by the complete Postfix SMTP server 4xx
+ Lookup tables, indexed by the complete Postfix SMTP server 4xx
or 5xx response, with reject footer templates.
SEE ALSO
diff --git a/postfix/html/tlsproxy.8.html b/postfix/html/tlsproxy.8.html
index 809706801..38067f993 100644
--- a/postfix/html/tlsproxy.8.html
+++ b/postfix/html/tlsproxy.8.html
@@ -160,24 +160,39 @@ TLSPROXY(8) TLSPROXY(8)
tlsmgr_service_name (tlsmgr)
The name of the tlsmgr(8) service entry in master.cf.
+ Available in Postfix version 3.4 and later:
+
+ tlsproxy_tls_chain_files ($smtpd_tls_chain_files)
+ Files with the Postfix tlsproxy(8) server keys and certificate
+ chains in PEM format.
+
+ tls_server_sni_maps (empty)
+ Optional lookup tables that map names received from remote SMTP
+ clients via the TLS Server Name Indication (SNI) extension to
+ the appropriate keys and certificate chains.
+
TLS CLIENT CONTROLS
- These parameters are clones of SMTP client settings. They allow
+ These parameters are clones of SMTP client settings. They allow
tlsproxy(8) to load the same certificate and private key information as
- the SMTP client, before dropping privileges, so that the key files can
+ the SMTP client, before dropping privileges, so that the key files can
be kept read-only for root.
Available in Postfix version 3.4 and later:
tlsproxy_client_CAfile ($smtp_tls_CAfile)
- A file containing CA certificates of root CAs trusted to sign
- either remote TLS server certificates or intermediate CA cer-
+ A file containing CA certificates of root CAs trusted to sign
+ either remote TLS server certificates or intermediate CA cer-
tificates.
tlsproxy_client_CApath ($smtp_tls_CApath)
- Directory with PEM format Certification Authority certificates
- that the Postfix tlsproxy(8) client uses to verify a remote TLS
+ Directory with PEM format Certification Authority certificates
+ that the Postfix tlsproxy(8) client uses to verify a remote TLS
server certificate.
+ tlsproxy_client_chain_files ($smtp_tls_chain_files)
+ Files with the Postfix tlsproxy(8) client keys and certificate
+ chains in PEM format.
+
tlsproxy_client_cert_file ($smtp_tls_cert_file)
File with the Postfix tlsproxy(8) client RSA certificate in PEM
format.
diff --git a/postfix/makedefs b/postfix/makedefs
index 5b16e1fb3..e276a11ba 100644
--- a/postfix/makedefs
+++ b/postfix/makedefs
@@ -882,7 +882,7 @@ CCARGS="$CCARGS -DSNAPSHOT"
# Non-production: needs thorough testing, or major changes are still
# needed before the code stabilizes.
-#CCARGS="$CCARGS -DNONPROD"
+CCARGS="$CCARGS -DNONPROD"
# Workaround: prepend Postfix include files before other include files.
CCARGS="-I. -I../../include $CCARGS"
diff --git a/postfix/man/man1/posttls-finger.1 b/postfix/man/man1/posttls-finger.1
index 1ba35da25..9529c20c1 100644
--- a/postfix/man/man1/posttls-finger.1
+++ b/postfix/man/man1/posttls-finger.1
@@ -121,6 +121,16 @@ smtp_tls_mandatory_ciphers for details.
.IP "\fB\-h \fIhost_lookup\fR (default: \fBdns\fR)"
The hostname lookup methods used for the connection. See the
documentation of smtp_host_lookup for syntax and semantics.
+.IP "\fB\-H \fIchainfiles\fR (default: \fInone\fR)\fR"
+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
+whitespace 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 \fB\-k\fR and \fB\-K\fR options.
.IP "\fB\-k \fIcertfile\fR (default: \fIkeyfile\fR)\fR"
File with PEM\-encoded TLS client certificate chain. This
defaults to \fIkeyfile\fR if one is specified.
@@ -232,6 +242,12 @@ seconds. Report whether the session is re\-used. Retry if a new server
is encountered, up to 5 times or as specified with the \fB\-m\fR option.
By default reconnection is disabled, specify a positive delay to
enable this behavior.
+.IP "\fB\-s \fIservername\fR"
+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.
.IP "\fB\-S\fR"
Disable SMTP; that is, connect to an LMTP server. The default port for
LMTP over TCP is 24. Alternative ports can specified by appending
diff --git a/postfix/man/man1/sendmail.1 b/postfix/man/man1/sendmail.1
index e51ed4c2f..3d5d984cc 100644
--- a/postfix/man/man1/sendmail.1
+++ b/postfix/man/man1/sendmail.1
@@ -306,7 +306,7 @@ line endings from
For servers that are not public Internet MX hosts, Postfix -supports configurations with no certificates. This entails the -use of just the anonymous TLS ciphers, which are not supported by -typical SMTP clients. Since such clients will not, as a rule, fall -back to plain text after a TLS handshake failure, a certificate-less -Postfix SMTP server will -be unable to receive email from most TLS enabled clients. To avoid -accidental configurations with no certificates, Postfix enables -certificate-less operation only when the administrator explicitly sets -"smtpd_tls_cert_file = none". This ensures that new Postfix -SMTP server configurations will not accidentally run with no -certificates.
+supports configurations with no certificates. This entails the use of +just the anonymous TLS ciphers, which are not supported by typical SMTP +clients. Since some clients may not fall back to plain text after a TLS +handshake failure, a certificate-less Postfix SMTP server will be unable +to receive email from some TLS-enabled clients. To avoid accidental +configurations with no certificates, Postfix enables certificate-less +operation only when the administrator explicitly sets +"smtpd_tls_cert_file = none". This ensures that new Postfix SMTP server +configurations will not accidentally enable TLS without certificates. + +Note that server certificates are not optional in TLS 1.3. To +run without certificates you'd have to disable the TLS 1.3 protocol by +including '!TLSv1.3' in "smtpd_tls_protocols" and perhaps also +"smtpd_tls_mandatory_protocols". It is simpler instead to just +configure a certificate chain. Certificate-less operation is not +recommended.
RSA, DSA and ECDSA (Postfix ≥ 2.6) certificates are supported. Most sites only have RSA certificates. You can configure all three @@ -239,11 +244,10 @@ applies to "2 0 2" and "2 1 2" TLSA records or any other digest of a CA certificate, but it is expected that SHA256 will be by far the most common digest for TLSA.
-As a best practice, publish either "3 0 1" or "3 1 1" TLSA -associations that specify the SHA256 digest of the server certificate -public key with the alias-expanded hostname of each STARTTLS capable -SMTP server. These continue to work when a certificate is renewed -with the same public/private key pair.
+As a best practice, publish "3 1 1" TLSA associations that specify +the SHA256 digest of the server's public key. These continue to work +unmodified when a certificate is renewed with the same public/private +key pair.
@@ -269,6 +273,58 @@ directory.Example: Postfix ≥ 3.4 all-in-one chain file(s). One or more +chain files that start with a key that is immediately followed by the +corresponding certificate and any additional issuer certificates. A +single file can hold multiple (key, cert, [chain]) sequences, one +per algorithm. It is typically simpler to keep the chain for each +algorithm in its own file. Most users are likely to deploy just a +single RSA chain, but with OpenSSL 1.1.1, it is possible to deploy up to +five chains, one each for RSA, ECDSA, ED25519, ED448 and even the +obsolete DSA.
+ +++ ++ # Postfix ≥ 3.4. Preferred configuration interface. Each file + # starts with the private key, followed by the corresponding + # certificate, and any intermediate issuer certificates. The root CA + # cert may also be needed when published as a DANE trust anchor. + # + smtpd_tls_chain_files = + /etc/postfix/rsa.pem, + /etc/postfix/ecdsa.pem, + /etc/postfix/ed25519.pem, + /etc/postfix/ed448.pem ++
You can also store the keys separately from their certificates, again +provided each is listed before the corresponding certificate chain. Storing a +key and its associated certificate chain in separate files is not recommended, +because this is prone to race conditions during key rollover, as there is no +way to update multiple files atomically.
+ +++ ++ # Postfix ≥ 3.4. + # Storing keys separately from the associated certificates is not + # recommended. + smtpd_tls_chain_files = + /etc/postfix/rsakey.pem, + /etc/postfix/rsacerts.pem, + /etc/postfix/ecdsakey.pem, + /etc/postfix/ecdsacerts.pem ++
The below examples show the legacy algorithm-specific configurations +for Postfix 3.3 and older. With Postfix ≤ 3.3, even if the key is +stored in the same file as the certificate, the file is read twice and a +(brief) race condition still exists during key rollover. While Postfix +≥ 3.4 avoids the race when the key and certificate are in the same +file, you should use the new "smtpd_tls_chain_files" interface shown +above.
+
RSA key and certificate examples:
@@ -294,8 +350,8 @@ directory.+/etc/postfix/main.cf: - # Most clients will not be ECDSA capable, so you will likely also need - # an RSA or DSA certificate and private key. + # Some clients will not be ECDSA capable, so you will likely still need + # an RSA certificate and private key. # smtpd_tls_eccert_file = /etc/postfix/server-ecdsa.pem smtpd_tls_eckey_file = $smtpd_tls_eccert_file @@ -308,6 +364,8 @@ anonymous-cipher capable clients:@@ -854,7 +912,11 @@ without corresponding changes to the Postfix source code. supports configurations with no server certificates that use only the anonymous ciphers. This is enabled by explicitly setting "smtpd_tls_cert_file = none" -and not specifying an smtpd_tls_dcert_file or smtpd_tls_eccert_file. +and not specifying an smtpd_tls_dcert_file or smtpd_tls_eccert_file. +Such configurations may not interoperate with some clients, and require +that TLSv1.3 be explicitly disabled. Therefore, they are not +recommended, it is better and simpler to just configure a suitable +certificate./etc/postfix/main.cf: + # Not recommended: breaks TLS 1.3 and clients that don't support + # anonymous cipher suites. smtpd_tls_cert_file = noneExample, MSA that requires TLSv1 or higher, not SSLv2 or SSLv3, with high grade ciphers:
@@ -874,6 +936,21 @@ with high grade ciphers:With Postfix ≥ 3.4, specify instead a single file that holds the +key followed by the corresponding certificate and any associated issuing +certificates, leaving the "smtpd_tls_cert_file" and "smtpd_tls_key_file" +and related DSA and ECDSA parameters empty.
+ ++++/etc/postfix/main.cf: + smtpd_tls_chain_files = /etc/postfix/rsachain.pem + smtpd_tls_cert_file = + smtpd_tls_key_file = + ... ++If you want to take maximal advantage of ciphers that offer forward secrecy see the Getting @@ -1140,7 +1217,7 @@ parameters includes useful interoperability and security guidelines.
Despite the potential for eliminating passive eavesdropping attacks, mandatory TLS encryption is not viable as a default security level for -mail delivery to the public Internet. Most MX hosts do not support TLS at +mail delivery to the public Internet. Some MX hosts do not support TLS at all, and some of those that do have broken implementations. On a host that delivers mail to the Internet, you should not configure mandatory TLS encryption as the default security level.
@@ -1540,8 +1617,8 @@ parent certificates will be ignored.Despite the potential for eliminating "man-in-the-middle" and other attacks, mandatory certificate trust chain and subject name verification -is not viable as a default Internet mail delivery policy. Most MX hosts -do not support TLS at all, and a significant portion of TLS enabled +is not viable as a default Internet mail delivery policy. Some MX hosts +do not support TLS at all, and a significant portion of TLS-enabled MTAs use self-signed certificates, or certificates that are signed by a private Certification Authority. On a machine that delivers mail to the Internet, you should not configure mandatory server certificate @@ -1614,8 +1691,8 @@ parent certificates will be ignored.
Despite the potential for eliminating "man-in-the-middle" and other attacks, mandatory secure server certificate verification is not -viable as a default Internet mail delivery policy. Most MX hosts -do not support TLS at all, and a significant portion of TLS enabled +viable as a default Internet mail delivery policy. Some MX hosts +do not support TLS at all, and a significant portion of TLS-enabled MTAs use self-signed certificates, or certificates that are signed by a private Certification Authority. On a machine that delivers mail to the Internet, you should not configure secure TLS verification @@ -1776,24 +1853,24 @@ well without them. The recommended setting is to let the defaults stand:
# Postfix ≥ 2.6 smtp_tls_eccert_file = smtp_tls_eckey_file = + # Postfix ≥ 3.4 + smtp_tls_chain_files =
The best way to use the default settings is to comment out the above parameters in main.cf if present.
-During TLS startup negotiation the Postfix SMTP client may present -a certificate to the remote SMTP server. The Netscape client is -rather clever here and lets the user select between only those -certificates that match CA certificates offered by the remote SMTP -server. As the Postfix SMTP client uses the "SSL_connect()" function -from the OpenSSL package, this is not possible and we have to choose -just one certificate. So for now the default is to use _no_ -certificate and key unless one is explicitly specified here.
+During TLS startup negotiation the Postfix SMTP client may present a +certificate to the remote SMTP server. Browsers typically let the user +select among the certificates that match the CA names indicated by the +remote SMTP server. The Postfix SMTP client does not yet have a mechanism +to select from multiple candidate certificates on the fly, and supports a +single set of certificates (at most one per public key algorithm).
RSA, DSA and ECDSA (Postfix ≥ 2.6) certificates are supported. You can configure all three at the same time, in which case the -cipher used determines which certificate is presented.
+cipher used determines which certificate is presented.It is possible for the Postfix SMTP client to use the same key/certificate pair as the Postfix SMTP server. If a certificate @@ -1802,6 +1879,14 @@ must not be encrypted, meaning: it must be accessible without password. Both parts (certificate and private key) may be in the same file.
+With OpenSSL 1.1.1 and Postfix ≥ 3.4 it is also possible to +configure Ed25519 and Ed448 certificates. Rather than add two more +pairs of key and certificate parameters, Postfix 3.4 introduces a new +"smtp_tls_chain_files" parameter which specifies all the configured +certificates at once, and handles files that hold both the key and the +associated certificates in one pass, thereby avoiding potential race +conditions during key rollover.
+To enable remote SMTP servers to verify the Postfix SMTP client certificate, the issuing CA certificates must be made available to the server. You should include the required certificates in the client @@ -1810,11 +1895,12 @@ CA(s) (bottom-up order).
Example: the certificate for "client.example.com" was issued by "intermediate CA" which itself has a certificate issued by "root CA". -Create the client.pem file with:
+As the "root" super-user create the client.pem file with:@@ -1824,13 +1910,64 @@ sslclient ..." test.-% cat client_cert.pem intermediate_CA.pem > client.pem +# umask 077 +# cat client_key.pem client_cert.pem intermediate_CA.pem > chain.pem
A server that trusts the root CA has a local copy of the root CA certificate, so it is not necessary to include the root CA -certificate here. Leaving it out of the "client.pem" file reduces +certificate here. Leaving it out of the "chain.pem" file reduces the overhead of the TLS exchange.
If you want the Postfix SMTP client to accept remote SMTP server certificates issued by these CAs, append the root certificate to $smtp_tls_CAfile or install it in the $smtp_tls_CApath directory.
+Example: Postfix ≥ 3.4 all-in-one chain file(s). One or more +chain files that start with a key that is immediately followed by the +corresponding certificate and any additional issuer certificates. A +single file can hold multiple (key, cert, [chain]) sequences, one +per algorithm. It is typically simpler to keep the chain for each +algorithm in its own file. Most users are likely to deploy at most a +single RSA chain, but with OpenSSL 1.1.1, it is possible to deploy up +five chains, one each for RSA, ECDSA, ED25519, ED448 and even the +obsolete DSA.
+ +++ ++ # Postfix ≥ 3.4. Preferred configuration interface. Each file + # starts with the private key, followed by the corresponding + # certificate, and any intermediate issuer certificates. + # + smtp_tls_chain_files = + /etc/postfix/rsa.pem, + /etc/postfix/ecdsa.pem, + /etc/postfix/ed25519.pem, + /etc/postfix/ed448.pem ++
You can also store the keys separately from their certificates, again +provided each is listed before the corresponding certificate chain. Storing a +key and its associated certificate chain in separate files is not recommended, +because this is prone to race conditions during key rollover, as there is no +way to update multiple files atomically.
+ +++ ++ # Postfix ≥ 3.4. + # Storing keys separately from the associated certificates is not + # recommended. + smtp_tls_chain_files = + /etc/postfix/rsakey.pem, + /etc/postfix/rsacerts.pem, + /etc/postfix/ecdsakey.pem, + /etc/postfix/ecdsacerts.pem ++
The below examples show the legacy algorithm-specific configurations +for Postfix 3.3 and older. With Postfix ≤ 3.3, even if the key is +stored in the same file as the certificate, the file is read twice and a +(brief) race condition still exists during key rollover. While Postfix +≥ 3.4 avoids the race when the key and certificate are in the same +file, you should use the new "smtp_tls_chain_files" interface shown +above.
+
RSA key and certificate examples:
@@ -2144,7 +2281,10 @@ additional attributes are supported at this level.
The following commands (credits: Viktor Dukhovni) generate and install a 2048-bit RSA private key and 10-year self-signed certificate for the local Postfix system. This requires super-user privileges. +(By using date-specific filenames for the certificate and key files, +and updating main.cf with new filenames, a potential race condition +in which the key and certificate might not match is avoided).
diff --git a/postfix/proto/postconf.proto b/postfix/proto/postconf.proto index 7833e2a3a..83060a104 100644 --- a/postfix/proto/postconf.proto +++ b/postfix/proto/postconf.proto @@ -989,7 +989,7 @@ is no maximum, it doesn't make much sense to use values above say@@ -9813,13 +9830,19 @@ CA(s) (bottom-up order).The only reason why the value of 2 is not the default is the way this parameter affects the delivery of mailing-list mail. In the -worst case, their delivery can take somewhere between (cost+1/cost) +worst case, delivery can take somewhere between (cost+1/cost) and (cost/cost-1) times more than if the preemptive scheduler was disabled. The default value of 5 turns out to provide reasonable message response times while making sure the mailing-list deliveries @@ -2687,7 +2687,7 @@ it easier to specify shell syntax (see example below).
If you can, avoid shell meta characters because they will force Postfix to run an expensive shell process. If you're delivering -via Procmail then running a shell won't make a noticeable difference +via "procmail" then running a shell won't make a noticeable difference in the total cost.
@@ -2826,7 +2826,7 @@ masquerade_domains = $mydomainOptional list of user names that are not subjected to address -masquerading, even when their address matches $masquerade_domains. +masquerading, even when their addresses match $masquerade_domains.
@@ -8357,8 +8357,8 @@ earlier: "/etc/postfix/post-install set-permissions".
Display the name of the recipient table in the "User unknown" -responses. The extra detail makes trouble shooting easier but also -reveals information that is nobody elses business. +responses. The extra detail makes troubleshooting easier but also +reveals information that is nobody else's business.
@@ -9309,7 +9309,9 @@ local_header_rewrite_clients = permit_mynetworks, %PARAM smtpd_tls_cert_file
File with the Postfix SMTP server RSA certificate in PEM format. -This file may also contain the Postfix SMTP server private RSA key.
+This file may also contain the Postfix SMTP server private RSA key. +With Postfix ≥ 3.4 the preferred way to configure server keys and +certificates is via the "smtpd_tls_chain_files" parameter.Public Internet MX hosts without certificates signed by a "reputable" CA must generate, and be prepared to present to most clients, a @@ -9318,15 +9320,22 @@ able to authenticate the server, but unless it is running Postfix 2.3 or similar software, it will still insist on a server certificate.
For servers that are not public Internet MX hosts, Postfix -2.3 supports configurations with no certificates. This entails the -use of just the anonymous TLS ciphers, which are not supported by -typical SMTP clients. Since such clients will not, as a rule, fall -back to plain text after a TLS handshake failure, the server will -be unable to receive email from TLS enabled clients. To avoid -accidental configurations with no certificates, Postfix 2.3 enables -certificate-less operation only when the administrator explicitly -sets "smtpd_tls_cert_file = none". This ensures that new Postfix -configurations will not accidentally run with no certificates.
+supports configurations with no certificates. This entails the use of +just the anonymous TLS ciphers, which are not supported by typical SMTP +clients. Since some clients may not fall back to plain text after a TLS +handshake failure, a certificate-less Postfix SMTP server will be unable +to receive email from some TLS-enabled clients. To avoid accidental +configurations with no certificates, Postfix enables certificate-less +operation only when the administrator explicitly sets +"smtpd_tls_cert_file = none". This ensures that new Postfix SMTP server +configurations will not accidentally enable TLS without certificates. + +Note that server certificates are not optional in TLS 1.3. To run +without certificates you'd have to disable the TLS 1.3 protocol by +including '!TLSv1.3' in "smtpd_tls_protocols" and perhaps also +"smtpd_tls_mandatory_protocols". It is simpler instead to just +configure a certificate chain. Certificate-less operation is not +recommended.
Both RSA and DSA certificates are supported. When both types are present, the cipher used determines which certificate will be @@ -9346,8 +9355,8 @@ root_CA.pem > server.pem".
If you also want to verify client certificates issued by these CAs, you can add the CA certificates to the smtpd_tls_CAfile, in which -case it is not necessary to have them in the smtpd_tls_cert_file or -smtpd_tls_dcert_file.
+case it is not necessary to have them in the smtpd_tls_cert_file, +smtpd_tls_dcert_file (obsolete) or smtpd_tls_eccert_file.A certificate supplied here must be usable as an SSL server certificate and hence pass the "openssl verify -purpose sslserver ..." test.
@@ -9364,7 +9373,9 @@ smtpd_tls_cert_file = /etc/postfix/server.pemFile with the Postfix SMTP server RSA private key in PEM format. This file may be combined with the Postfix SMTP server RSA certificate -file specified with $smtpd_tls_cert_file.
+file specified with $smtpd_tls_cert_file. With Postfix ≥ 3.4 the +preferred way to configure server keys and certificates is via the +"smtpd_tls_chain_files" parameter.The private key must be accessible without a pass-phrase, i.e. it must not be encrypted. File permissions should grant read-only @@ -9374,7 +9385,8 @@ to anyone else.
%PARAM smtpd_tls_dcert_fileFile with the Postfix SMTP server DSA certificate in PEM format. -This file may also contain the Postfix SMTP server private DSA key.
+This file may also contain the Postfix SMTP server private DSA key. +The DSA algorithm is obsolete and should not be used.See the discussion under smtpd_tls_cert_file for more details.
@@ -9391,7 +9403,8 @@ smtpd_tls_dcert_file = /etc/postfix/server-dsa.pemFile with the Postfix SMTP server DSA private key in PEM format. This file may be combined with the Postfix SMTP server DSA certificate -file specified with $smtpd_tls_dcert_file.
+file specified with $smtpd_tls_dcert_file. The DSA algorithm is obsolete +and should not be used.The private key must be accessible without a pass-phrase, i.e. it must not be encrypted. File permissions should grant read-only @@ -9782,9 +9795,10 @@ was fixed at 300s.
%PARAM smtp_tls_cert_fileFile with the Postfix SMTP client RSA certificate in PEM format. -This file may also contain the Postfix SMTP client private RSA key, -and these may be the same as the Postfix SMTP server RSA certificate and key -file.
+This file may also contain the Postfix SMTP client private RSA key, and +these may be the same as the Postfix SMTP server RSA certificate and key +file. With Postfix ≥ 3.4 the preferred way to configure client keys +and certificates is via the "smtp_tls_chain_files" parameter.Do not configure client certificates unless you must present client TLS certificates to one or more servers. Client certificates are @@ -9795,10 +9809,13 @@ well without them. The recommended setting is to let the defaults stand:
smtp_tls_cert_file = smtp_tls_key_file = -smtp_tls_dcert_file = -smtp_tls_dkey_file = smtp_tls_eccert_file = smtp_tls_eckey_file = +# Obsolete DSA parameters +smtp_tls_dcert_file = +smtp_tls_dkey_file = +# Postfix ≥ 3.4 interface +smtp_tls_chain_files =
Example: the certificate for "client.example.com" was issued by "intermediate CA" which itself has a certificate issued by "root CA". -Create the client.pem file with "cat client_cert.pem intermediate_CA.pem -root_CA.pem > client.pem".
+As the "root" super-user create the client.pem file with: + +++# umask 077 +# cat client_key.pem client_cert.pem intermediate_CA.pem > chain.pem ++
If you also want to verify remote SMTP server certificates issued by these CAs, you can add the CA certificates to the smtp_tls_CAfile, in which case it is not necessary to have them in the smtp_tls_cert_file, -smtp_tls_dcert_file or smtp_tls_eccert_file.
+smtp_tls_dcert_file (obsolete) or smtp_tls_eccert_file.A certificate supplied here must be usable as an SSL client certificate and hence pass the "openssl verify -purpose sslclient ..." test.
@@ -9827,7 +9850,7 @@ and hence pass the "openssl verify -purpose sslclient ..." test.Example:
-smtp_tls_cert_file = /etc/postfix/client.pem +smtp_tls_cert_file = /etc/postfix/chain.pem
This feature is available in Postfix 2.2 and later.
@@ -9836,7 +9859,9 @@ smtp_tls_cert_file = /etc/postfix/client.pemFile with the Postfix SMTP client RSA private key in PEM format. This file may be combined with the Postfix SMTP client RSA certificate -file specified with $smtp_tls_cert_file.
+file specified with $smtp_tls_cert_file. With Postfix ≥ 3.4 the +preferred way to configure client keys and certificates is via the +"smtp_tls_chain_files" parameter.The private key must be accessible without a pass-phrase, i.e. it must not be encrypted. File permissions should grant read-only @@ -9861,7 +9886,7 @@ smtp_tls_CApath instead, but note that the latter directory must be present in the chroot jail if the smtp(8) client is chrooted. This file may also be used to augment the client certificate trust chain, but it is best to include all the required certificates directly in -$smtp_tls_cert_file.
+$smtp_tls_cert_file (or, Postfix ≥ 3.4 $smtp_tls_chain_files).Specify "smtp_tls_CAfile = /path/to/system_CA_file" to use ONLY the system-supplied default Certification Authority certificates. @@ -10170,7 +10195,8 @@ during TLS startup and shutdown handshake procedures.
File with the Postfix SMTP client DSA private key in PEM format. This file may be combined with the Postfix SMTP client DSA certificate -file specified with $smtp_tls_dcert_file.
+file specified with $smtp_tls_dcert_file. The DSA algorithm is obsolete +and should not be used.The private key must be accessible without a pass-phrase, i.e. it must not be encrypted. File permissions should grant read-only @@ -10182,7 +10208,8 @@ to anyone else.
%PARAM smtp_tls_dcert_fileFile with the Postfix SMTP client DSA certificate in PEM format. -This file may also contain the Postfix SMTP client private DSA key.
+This file may also contain the Postfix SMTP client private DSA key. +The DSA algorithm is obsolete and should not be used.See the discussion under smtp_tls_cert_file for more details.
@@ -12849,7 +12876,9 @@ where EC algorithms have not been disabled by the vendor. %PARAM smtpd_tls_eccert_fileFile with the Postfix SMTP server ECDSA certificate in PEM format. -This file may also contain the Postfix SMTP server private ECDSA key.
+This file may also contain the Postfix SMTP server private ECDSA key. +With Postfix ≥ 3.4 the preferred way to configure server keys and +certificates is via the "smtpd_tls_chain_files" parameter.See the discussion under smtpd_tls_cert_file for more details.
@@ -12866,7 +12895,9 @@ compiled and linked with OpenSSL 1.0.0 or later.File with the Postfix SMTP server ECDSA private key in PEM format. This file may be combined with the Postfix SMTP server ECDSA certificate -file specified with $smtpd_tls_eccert_file.
+file specified with $smtpd_tls_eccert_file. With Postfix ≥ 3.4 the +preferred way to configure server keys and certificates is via the +"smtpd_tls_chain_files" parameter.The private key must be accessible without a pass-phrase, i.e. it must not be encrypted. File permissions should grant read-only @@ -12879,7 +12910,9 @@ compiled and linked with OpenSSL 1.0.0 or later.
%PARAM smtp_tls_eccert_fileFile with the Postfix SMTP client ECDSA certificate in PEM format. -This file may also contain the Postfix SMTP client ECDSA private key.
+This file may also contain the Postfix SMTP client ECDSA private key. +With Postfix ≥ 3.4 the preferred way to configure client keys and +certificates is via the "smtp_tls_chain_files" parameter.See the discussion under smtp_tls_cert_file for more details.
@@ -12896,8 +12929,10 @@ compiled and linked with OpenSSL 1.0.0 or later. %PARAM smtp_tls_eckey_file $smtp_tls_eccert_fileFile with the Postfix SMTP client ECDSA private key in PEM format. -This file may be combined with the Postfix SMTP client ECDSA -certificate file specified with $smtp_tls_eccert_file.
+This file may be combined with the Postfix SMTP client ECDSA certificate +file specified with $smtp_tls_eccert_file. With Postfix ≥ 3.4 the +preferred way to configure client keys and certificates is via the +"smtp_tls_chain_files" parameter.The private key must be accessible without a pass-phrase, i.e. it must not be encrypted. File permissions should grant read-only @@ -13739,7 +13774,7 @@ defers the client request only if it would otherwise be accepted. %PARAM unknown_helo_hostname_tempfail_action $reject_tempfail_action
The Postfix SMTP server's action when reject_unknown_helo_hostname -fails due to an temporary error condition. Specify "defer" to defer +fails due to a temporary error condition. Specify "defer" to defer the remote SMTP client request immediately. With the default "defer_if_permit" action, the Postfix SMTP server continues to look for opportunities to reject mail, and defers the client request @@ -14135,7 +14170,7 @@ to the configured before/after 220 greeting tests.
/etc/postfix/main.cf:
postscreen_access_list = permit_mynetworks,
- cidr:/etc/postfix/postscreen_access.cidr
+ cidr:/etc/postfix/postscreen_access.cidr
postscreen_blacklist_action = enforce
@@ -15104,7 +15139,9 @@ file. See smtpd_tls_ccert_verifydepth for further details.
File with the Postfix tlsproxy(8) server RSA certificate in PEM format. This file may also contain the Postfix tlsproxy(8) server -private RSA key. See smtpd_tls_cert_file for further details.
+private RSA key. See smtpd_tls_cert_file for further details. With +Postfix ≥ 3.4 the preferred way to configure tlsproxy server keys and +certificates is via the "tlsproxy_tls_chain_files" parameter.This feature is available in Postfix 2.8 and later.
@@ -15120,8 +15157,8 @@ for further details.File with the Postfix tlsproxy(8) server DSA certificate in PEM format. This file may also contain the Postfix tlsproxy(8) server -private DSA key. See smtpd_tls_dcert_file for further details. -
+private DSA key. DSA is obsolete and should not be used. See +smtpd_tls_dcert_file for further details.This feature is available in Postfix 2.8 and later.
@@ -15146,27 +15183,31 @@ result export-grade cipher suites are by default not used. %PARAM tlsproxy_tls_dkey_file $smtpd_tls_dkey_fileFile with the Postfix tlsproxy(8) server DSA private key in PEM -format. This file may be combined with the Postfix tlsproxy(8) -server DSA certificate file specified with $smtpd_tls_dcert_file. -See smtpd_tls_dkey_file for further details.
+format. This file may be combined with the Postfix tlsproxy(8) server +DSA certificate file specified with $smtpd_tls_dcert_file. DSA is +obsolete and should not be used. See smtpd_tls_dkey_file for further +details.This feature is available in Postfix 2.8 and later.
%PARAM tlsproxy_tls_eccert_file $smtpd_tls_eccert_file -File with the Postfix tlsproxy(8) server ECDSA certificate in -PEM format. This file may also contain the Postfix tlsproxy(8) -server private ECDSA key. See smtpd_tls_eccert_file for further -details.
+File with the Postfix tlsproxy(8) server ECDSA certificate in PEM +format. This file may also contain the Postfix tlsproxy(8) server +private ECDSA key. See smtpd_tls_eccert_file for further details. With +Postfix ≥ 3.4 the preferred way to configure tlsproxy server keys and +certificates is via the "tlsproxy_tls_chain_files" parameter.
This feature is available in Postfix 2.8 and later.
%PARAM tlsproxy_tls_eckey_file $smtpd_tls_eckey_file -File with the Postfix tlsproxy(8) server ECDSA private key in -PEM format. This file may be combined with the Postfix tlsproxy(8) -server ECDSA certificate file specified with $smtpd_tls_eccert_file. -See smtpd_tls_eckey_file for further details.
+File with the Postfix tlsproxy(8) server ECDSA private key in PEM +format. This file may be combined with the Postfix tlsproxy(8) server +ECDSA certificate file specified with $smtpd_tls_eccert_file. See +smtpd_tls_eckey_file for further details. With Postfix ≥ 3.4 the +preferred way to configure tlsproxy server keys and certificates is via +the "tlsproxy_tls_chain_files" parameter.
This feature is available in Postfix 2.8 and later.
@@ -15198,9 +15239,11 @@ fingerprints. See smtpd_tls_fingerprint_digest for further details. %PARAM tlsproxy_tls_key_file $smtpd_tls_key_fileFile with the Postfix tlsproxy(8) server RSA private key in PEM -format. This file may be combined with the Postfix tlsproxy(8) -server RSA certificate file specified with $smtpd_tls_cert_file. -See smtpd_tls_key_file for further details.
+format. This file may be combined with the Postfix tlsproxy(8) server +RSA certificate file specified with $smtpd_tls_cert_file. See +smtpd_tls_key_file for further details. With Postfix ≥ 3.4 the +preferred way to configure tlsproxy server keys and certificates is via +the "tlsproxy_tls_chain_files" parameter.This feature is available in Postfix 2.8 and later.
@@ -16941,42 +16984,52 @@ server certificate. See smtp_tls_CApath for further details. %PARAM tlsproxy_client_cert_file $smtp_tls_cert_fileFile with the Postfix tlsproxy(8) client RSA certificate in PEM -format. See smtp_tls_cert_file for further details.
+format. See smtp_tls_cert_file for further details. The preferred way +to configure tlsproxy client keys and certificates is via the +"tlsproxy_client_chain_files" parameter.This feature is available in Postfix 3.4 and later.
%PARAM tlsproxy_client_key_file $smtp_tls_key_fileFile with the Postfix tlsproxy(8) client RSA private key in PEM -format. See smtp_tls_key_file for further details.
+format. See smtp_tls_key_file for further details. The preferred way to +configure tlsproxy client keys and certificates is via the +"tlsproxy_client_chain_files" parameter.This feature is available in Postfix 3.4 and later.
%PARAM tlsproxy_client_dcert_file $smtp_tls_dcert_fileFile with the Postfix tlsproxy(8) client DSA certificate in PEM -format. See smtp_tls_dcert_file for further details.
+format. See smtp_tls_dcert_file for further details. DSA is obsolete and +should not be used.This feature is available in Postfix 3.4 and later.
%PARAM tlsproxy_client_dkey_file $smtp_tls_dkey_fileFile with the Postfix tlsproxy(8) client DSA private key in PEM -format. See smtp_tls_dkey_file for further details.
+format. See smtp_tls_dkey_file for further details. DSA is obsolete and +should not be used.This feature is available in Postfix 3.4 and later.
%PARAM tlsproxy_client_eccert_file $smtp_tls_eccert_file -File with the Postfix tlsproxy(8) client ECDSA certificate in -PEM format. See smtp_tls_eccert_file for further details.
+File with the Postfix tlsproxy(8) client ECDSA certificate in PEM +format. See smtp_tls_eccert_file for further details. The preferred way +to configure tlsproxy client keys and certificates is via the +"tlsproxy_client_chain_files" parameter.
This feature is available in Postfix 3.4 and later.
%PARAM tlsproxy_client_eckey_file $smtp_tls_eckey_file -File with the Postfix tlsproxy(8) client ECDSA private key in -PEM format. See smtp_tls_eckey_file for further details.
+File with the Postfix tlsproxy(8) client ECDSA private key in PEM +format. See smtp_tls_eckey_file for further details. The preferred way +to configure tlsproxy client keys and certificates is via the +"tlsproxy_client_chain_files" parameter.
This feature is available in Postfix 3.4 and later.
@@ -17045,3 +17098,431 @@ support. See smtp_use_tls for further details. See smtp_enforce_tls for further details.This feature is available in Postfix 3.4 and later.
+ +%PARAM smtpd_tls_chain_files + +List of one or more PEM files, each holding one or more private keys +directly followed by a corresponding certificate chain. The file names +are separated by commas and/or whitespace. This parameter obsoletes the +legacy algorithm-specific key and certificate file settings. When this +parameter is non-empty, the legacy parameters are ignored, and a warning +is logged if any are also non-empty.
+ +With the proliferation of multiple private key algorithms—which, +as of OpenSSL 1.1.1, include DSA (obsolete), RSA, ECDSA, Ed25519 +and Ed448—it is increasingly impractical to use separate +parameters to configure the key and certificate chain for each +algorithm. Therefore, Postfix now supports storing multiple keys and +corresponding certificate chains in a single file or in a set of files. + +
Each key must appear immediately before the corresponding +certificate, optionally followed by additional issuer certificates that +complete the certificate chain for that key. When multiple files are +specified, they are equivalent to a single file that is concatenated +from those files in the given order. Thus, while a key must always +precede its certificate and issuer chain, it can be in a separate file, +so long as that file is listed immediately before the file that holds +the corresponding certificate chain. Once all the files are +concatenated, the sequence of PEM objects must be: key1, cert1, +[chain1], key2, cert2, [chain2], ..., keyN, certN, [chainN].
+ +Storing the private key in the same file as the corresponding +certificate is more reliable. With the key and certificate in separate +files, there is a chance that during key rollover a Postfix process +might load a private key and certificate from separate files that don't +match. Various operational errors may even result in a persistent +broken configuration in which the certificate does not match the private +key.
+ +The file or files must contain at most one key of each type. If, +for example, two or more RSA keys and corresponding chains are listed, +depending on the version of OpenSSL either only the last one will be +used or an configuration error may be detected. Note that while +"Ed25519" and "Ed448" are considered separate algorithms, the various +ECDSA curves (typically one of prime256v1, secp384r1 or secp521r1) are +considered as different parameters of a single "ECDSA" algorithm, so it +is not presently possible to configure keys for more than one ECDSA +curve.
+ +RSA is still the most widely supported algorithm. Presently (late +2018), ECDSA support is common, but not yet universal, and Ed25519 and +Ed448 support is mostly absent. Therefore, an RSA key should generally +be configured, along with any additional keys for the other algorithms +when desired.
+ ++Example (separate files for each key and corresponding certificate chain): +
+
+
+/etc/postfix/main.cf:
+ smtpd_tls_chain_files =
+ ${config_directory}/ed25519.pem,
+ ${config_directory}/ed448.pem,
+ ${config_directory}/rsa.pem
+
+
+
+++ ++/etc/postfix/ed25519.pem: + -----BEGIN PRIVATE KEY----- + MC4CAQAwBQYDK2VwBCIEIEJfbbO4BgBQGBg9NAbIJaDBqZb4bC4cOkjtAH+Efbz3 + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIBKzCB3qADAgECAhQaw+rflRreYuUZBp0HuNn/e5rMZDAFBgMrZXAwFDESMBAG + ... + nC0egv51YPDWxEHom4QA + -----END CERTIFICATE----- ++
++ ++/etc/postfix/ed448.pem: + -----BEGIN PRIVATE KEY----- + MEcCAQAwBQYDK2VxBDsEOQf+m0P+G0qi+NZ0RolyeiE5zdlPQR8h8y4jByBifpIe + LNler7nzHQJ1SLcOiXFHXlxp/84VZuh32A== + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIBdjCB96ADAgECAhQSv4oP972KypOZPNPF4fmsiQoRHzAFBgMrZXEwFDESMBAG + ... + pQcWsx+4J29e6YWH3Cy/CdUaexKP4RPCZDrPX7bk5C2BQ+eeYOxyThMA + -----END CERTIFICATE----- ++
++ ++/etc/postfix/rsa.pem: + -----BEGIN PRIVATE KEY----- + MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDc4QusgkahH9rL + ... + ahQkZ3+krcaJvDSMgvu0tDc= + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIC+DCCAeCgAwIBAgIUIUkrbk1GAemPCT8i9wKsTGDH7HswDQYJKoZIhvcNAQEL + ... + Rirz15HGVNTK8wzFd+nulPzwUo6dH2IU8KazmyRi7OGvpyrMlm15TRE2oyE= + -----END CERTIFICATE----- ++
+Example (all keys and certificates in a single file): +
+
+
+/etc/postfix/main.cf:
+ smtpd_tls_chain_files = ${config_directory}/chains.pem
+
+
+
+++ ++/etc/postfix/chains.pem: + -----BEGIN PRIVATE KEY----- + MC4CAQAwBQYDK2VwBCIEIEJfbbO4BgBQGBg9NAbIJaDBqZb4bC4cOkjtAH+Efbz3 + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIBKzCB3qADAgECAhQaw+rflRreYuUZBp0HuNn/e5rMZDAFBgMrZXAwFDESMBAG + ... + nC0egv51YPDWxEHom4QA + -----END CERTIFICATE----- + -----BEGIN PRIVATE KEY----- + MEcCAQAwBQYDK2VxBDsEOQf+m0P+G0qi+NZ0RolyeiE5zdlPQR8h8y4jByBifpIe + LNler7nzHQJ1SLcOiXFHXlxp/84VZuh32A== + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIBdjCB96ADAgECAhQSv4oP972KypOZPNPF4fmsiQoRHzAFBgMrZXEwFDESMBAG + ... + pQcWsx+4J29e6YWH3Cy/CdUaexKP4RPCZDrPX7bk5C2BQ+eeYOxyThMA + -----END CERTIFICATE----- + -----BEGIN PRIVATE KEY----- + MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDc4QusgkahH9rL + ... + ahQkZ3+krcaJvDSMgvu0tDc= + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIC+DCCAeCgAwIBAgIUIUkrbk1GAemPCT8i9wKsTGDH7HswDQYJKoZIhvcNAQEL + ... + Rirz15HGVNTK8wzFd+nulPzwUo6dH2IU8KazmyRi7OGvpyrMlm15TRE2oyE= + -----END CERTIFICATE----- ++
This feature is available in Postfix 3.4 and later.
+ +%PARAM smtp_tls_chain_files + +List of one or more PEM files, each holding one or more private keys +directly followed by a corresponding certificate chain. The file names +are separated by commas and/or whitespace. This parameter obsoletes the +legacy algorithm-specific key and certificate file settings. When this +parameter is non-empty, the legacy parameters are ignored, and a warning +is logged if any are also non-empty.
+ +With the proliferation of multiple private key algorithms—which, +as of OpenSSL 1.1.1, include DSA (obsolete), RSA, ECDSA, Ed25519 +and Ed448—it is increasingly impractical to use separate +parameters to configure the key and certificate chain for each +algorithm. Therefore, Postfix now supports storing multiple keys and +corresponding certificate chains in a single file or in a set of files. + +
Each key must appear immediately before the corresponding +certificate, optionally followed by additional issuer certificates that +complete the certificate chain for that key. When multiple files are +specified, they are equivalent to a single file that is concatenated +from those files in the given order. Thus, while a key must always +precede its certificate and issuer chain, it can be in a separate file, +so long as that file is listed immediately before the file that holds +the corresponding certificate chain. Once all the files are +concatenated, the sequence of PEM objects must be: key1, cert1, +[chain1], key2, cert2, [chain2], ..., keyN, certN, [chainN].
+ +Storing the private key in the same file as the corresponding +certificate is more reliable. With the key and certificate in separate +files, there is a chance that during key rollover a Postfix process +might load a private key and certificate from separate files that don't +match. Various operational errors may even result in a persistent +broken configuration in which the certificate does not match the private +key.
+ +The file or files must contain at most one key of each type. If, +for example, two or more RSA keys and corresponding chains are listed, +depending on the version of OpenSSL either only the last one will be +used or an configuration error may be detected. Note that while +"Ed25519" and "Ed448" are considered separate algorithms, the various +ECDSA curves (typically one of prime256v1, secp384r1 or secp521r1) are +considered as different parameters of a single "ECDSA" algorithm, so it +is not presently possible to configure keys for more than one ECDSA +curve.
+ ++Example (separate files for each key and corresponding certificate chain): +
+
+
+/etc/postfix/main.cf:
+ smtp_tls_chain_files =
+ ${config_directory}/ed25519.pem,
+ ${config_directory}/ed448.pem,
+ ${config_directory}/rsa.pem
+
+
+
+++ ++/etc/postfix/ed25519.pem: + -----BEGIN PRIVATE KEY----- + MC4CAQAwBQYDK2VwBCIEIEJfbbO4BgBQGBg9NAbIJaDBqZb4bC4cOkjtAH+Efbz3 + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIBKzCB3qADAgECAhQaw+rflRreYuUZBp0HuNn/e5rMZDAFBgMrZXAwFDESMBAG + ... + nC0egv51YPDWxEHom4QA + -----END CERTIFICATE----- ++
++ ++/etc/postfix/ed448.pem: + -----BEGIN PRIVATE KEY----- + MEcCAQAwBQYDK2VxBDsEOQf+m0P+G0qi+NZ0RolyeiE5zdlPQR8h8y4jByBifpIe + LNler7nzHQJ1SLcOiXFHXlxp/84VZuh32A== + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIBdjCB96ADAgECAhQSv4oP972KypOZPNPF4fmsiQoRHzAFBgMrZXEwFDESMBAG + ... + pQcWsx+4J29e6YWH3Cy/CdUaexKP4RPCZDrPX7bk5C2BQ+eeYOxyThMA + -----END CERTIFICATE----- ++
++ ++/etc/postfix/rsa.pem: + -----BEGIN PRIVATE KEY----- + MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDc4QusgkahH9rL + ... + ahQkZ3+krcaJvDSMgvu0tDc= + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIC+DCCAeCgAwIBAgIUIUkrbk1GAemPCT8i9wKsTGDH7HswDQYJKoZIhvcNAQEL + ... + Rirz15HGVNTK8wzFd+nulPzwUo6dH2IU8KazmyRi7OGvpyrMlm15TRE2oyE= + -----END CERTIFICATE----- ++
+Example (all keys and certificates in a single file): +
+
+
+/etc/postfix/main.cf:
+ smtp_tls_chain_files = ${config_directory}/chains.pem
+
+
+
+++ ++/etc/postfix/chains.pem: + -----BEGIN PRIVATE KEY----- + MC4CAQAwBQYDK2VwBCIEIEJfbbO4BgBQGBg9NAbIJaDBqZb4bC4cOkjtAH+Efbz3 + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIBKzCB3qADAgECAhQaw+rflRreYuUZBp0HuNn/e5rMZDAFBgMrZXAwFDESMBAG + ... + nC0egv51YPDWxEHom4QA + -----END CERTIFICATE----- + -----BEGIN PRIVATE KEY----- + MEcCAQAwBQYDK2VxBDsEOQf+m0P+G0qi+NZ0RolyeiE5zdlPQR8h8y4jByBifpIe + LNler7nzHQJ1SLcOiXFHXlxp/84VZuh32A== + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIBdjCB96ADAgECAhQSv4oP972KypOZPNPF4fmsiQoRHzAFBgMrZXEwFDESMBAG + ... + pQcWsx+4J29e6YWH3Cy/CdUaexKP4RPCZDrPX7bk5C2BQ+eeYOxyThMA + -----END CERTIFICATE----- + -----BEGIN PRIVATE KEY----- + MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDc4QusgkahH9rL + ... + ahQkZ3+krcaJvDSMgvu0tDc= + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIIC+DCCAeCgAwIBAgIUIUkrbk1GAemPCT8i9wKsTGDH7HswDQYJKoZIhvcNAQEL + ... + Rirz15HGVNTK8wzFd+nulPzwUo6dH2IU8KazmyRi7OGvpyrMlm15TRE2oyE= + -----END CERTIFICATE----- ++
This feature is available in Postfix 3.4 and later.
+ +%PARAM lmtp_tls_chain_files + +The LMTP-specific version of the smtp_tls_chain_files configuration +parameter. See there for details.
+ +This feature is available in Postfix 3.4 and later.
+ +%PARAM tlsproxy_client_chain_files $smtp_tls_chain_files + +Files with the Postfix tlsproxy(8) client keys and certificate +chains in PEM format. See smtp_tls_chain_files for further details.
+ +This feature is available in Postfix 3.4 and later.
+ +%PARAM tlsproxy_tls_chain_files $smtpd_tls_chain_files + +Files with the Postfix tlsproxy(8) server keys and certificate +chains in PEM format. See smtpd_tls_chain_files for further details.
+ +This feature is available in Postfix 3.4 and later.
+ +%PARAM tls_server_sni_maps + +Optional lookup tables that map names received from remote SMTP +clients via the TLS Server Name Indication (SNI) extension to the +appropriate keys and certificate chains. This parameter is implemented +in the Postfix TLS library, and applies to both smtpd(8) and the SMTP +server mode of tlsproxy(8).
+ +The lookup key is either the verbatim SNI domain name or a an +ancestor domain prefixed with a leading dot. For internationalized +domains, the lookup key must be in IDNA 2008 A-label form (as +required in the TLS SNI extension).
+ +The mapping from an SNI domain name to a certificate chain is +typically indirect. In the input source files for "cdb", "hash", +"btree" or other tables that are converted to on-disk indexed files +via postmap(1), the value specified for each key is a list of +filenames. When postmap(1) is used with the -F option, the +generated table stores for each lookup key the base64-encoded +contents of the associated files. When querying tables via postmap +-Fq, the table value is decoded from base64, yielding the original +file content, plus a new line.
+ +With "regexp", "pcre", "inline", "texthash", "static" and similar +tables that are interpreted at run-time, and don't have a separate +source format, the table value is again a list files, that are read-in +when the table is opened.
+ +Thus, for example:
+ +++ ++$ postmap -Fq "" static:/etc/postfix/chain.pem | openssl dgst -sha1 +(stdin)= da39a3ee5e6b4b0d3255bfef95601890afd80709 ++
produces the same output as:
+ +++ ++$ (cat /etc/postfix/chain.pem; echo) | openssl dgst -sha1 +(stdin)= da39a3ee5e6b4b0d3255bfef95601890afd80709 ++
With tables whose content is managed outside of Postfix, such +as LDAP, MySQL, PostgreSQL, socketmap and tcp, the value must be a +concatenation of the desired PEM keys and certificate chains, that +is then further encoded to yield a single-line base64 string. +Creation of such tables and secure storage are outside the +responsibility of Postfix. With "socketmap" and "tcp" the data +would be transmitted in the clear. With LDAP and SQL, you should +generally use TLS to protect the sensitive data in transit.
+ +Typically there is only private key and its chain of certificates +starting with the "leaf" certificate corresponding to that key, and +continuing with the appropriate intermediate issuer CA certificates, +with each certificate ideally followed by its issuer. Servers +that have keys and certificates for more than one algorithm (e.g. +both an RSA key and an ECDSA key, or even RSA, ECDSA and Ed25519) +can use multiple chains concatenated together, with the key always +listed before the corresponding certificates.
+ +This feature is available in Postfix 3.4 and later.
+ +%PARAM smtp_tls_servername + +Optional name to send to the remote SMTP server in the TLS Server +Name Indication (SNI) extension. The SNI extension is always on when +DANE is used to authenticate the server, and in that case the SNI name +sent is the one required by RFC7672 and this parameter is ignored.
+ +Some SMTP servers use the received SNI name to select an appropriate +certificate chain to present to the client. While this may improve +interoperability with such servers, it may reduce interoperability with +other servers that choose to abort the connection when they don't have a +certificate chain configured for the requested name. Such servers +should select a default certificate chain and continue the handshake, +but some may not. Therefore, absent DANE, no SNI name is sent by +default.
+ +The SNI name must be either a valid DNS hostname, or else one of the +special values hostname or nexthop, which select either the +remote hostname or the nexthop domain respectively. DNS names for SNI must be +in A-label (punycode) form. Invalid DNS names log a configuration error +warning and mail delivery is deferred.
+ +Except when using a relayhost to forward all email, the only +sensible non-empty main.cf setting for this parameter is +hostname. Other non-empty values are only practical on a +per-destination basis via the servername attribute of the Postfix +TLS policy table. When +in doubt, leave this parameter empty, and configure per-destination SNI +as needed.
+ +This feature is available in Postfix 3.4 and later.
+ +%PARAM lmtp_tls_servername + +The LMTP-specific version of the smtp_tls_servername configuration +parameter. See there for details.
+ +This feature is available in Postfix 3.4 and later.
diff --git a/postfix/src/global/mail_params.h b/postfix/src/global/mail_params.h index 7eafc76d1..2edec94fb 100644 --- a/postfix/src/global/mail_params.h +++ b/postfix/src/global/mail_params.h @@ -19,6 +19,9 @@ typedef int bool; #ifdef USE_TLS #include