From 99a79e64b21c60365375d74054eb34b8c54c49c6 Mon Sep 17 00:00:00 2001
From: Wietse Venema Tinycdb is preferred, since it is a bit faster, has additional
useful functionality and is much simpler to use. To build Postfix after you have installed CDB, use something
+ To build Postfix after you have installed tinycdb, use something
like:
@@ -65,7 +65,11 @@ like:
Alternatively, for the D.J.B. version of CDB:
+ +
% make tidy % CDB=../../../cdb-0.75 diff --git a/postfix/html/OVERVIEW.html b/postfix/html/OVERVIEW.html index 84cbd7f21..9bdf973e6 100644 --- a/postfix/html/OVERVIEW.html +++ b/postfix/html/OVERVIEW.html @@ -411,7 +411,7 @@ responsible for starting Postfix server processes to receive and deliver mail, and for restarting servers that terminate prematurely because of some problem. The master(8) server is also responsible for enforcing the server process count limits as specified in the -master.cf configuration file. The picture below gives the +master.cf configuration file. The picture below gives the program hierarchy when Postfix is started up. Only some of the mail handling daemon processes are shown. @@ -687,7 +687,7 @@ queue files. This is a limited, preliminary utility. This program is likely to be superseded by something more powerful that can also edit Postfix queue files. -The postconf(1) command displays or updates Postfix main.cf +
The postconf(1) command displays or updates Postfix main.cf parameters and displays system dependent information about the supported file locking methods, and the supported types of lookup tables.
diff --git a/postfix/html/SMTPD_POLICY_README.html b/postfix/html/SMTPD_POLICY_README.html index 869861c9b..179b22fc2 100644 --- a/postfix/html/SMTPD_POLICY_README.html +++ b/postfix/html/SMTPD_POLICY_README.html @@ -79,6 +79,7 @@ helo_name=some.domain.tld queue_id=8045F2AB23 sender=foo@bar.tld recipient=bar@foo.tld +recipient_count=0 client_address=1.2.3.4 client_name=another.domain.tld reverse_client_name=another.domain.tld @@ -115,8 +116,19 @@ encryption_keysize=256When an attribute value is unavailable, the client - either does not send the attribute, or sends the attribute with - an empty value ("name=").
+ either does not send the attribute, sends the attribute with + an empty value ("name="), or sends a zero value ("name=0") in + the case of a numerical attribute. + +The "recipient" attribute is available only in the + "RCPT TO" stage, and in the "DATA" and "END-OF-MESSAGE" stages + when Postfix accepted only one recipient for the current message. +
+ +The "recipient_count" attribute (Postfix 2.3 and later) + is non-zero only in the "DATA" and "END-OF-MESSAGE" stages. It + specifies the number of recipients that Postfix accepted for + the current message.
The client address is an IPv4 dotted quad in the form 1.2.3.4 or it is an IPv6 address in the form 1:2:3::4:5:6. @@ -217,11 +229,11 @@ daemon, you would use something like this:
- 1 /etc/postfix/master.cf: + 1 /etc/postfix/master.cf: 2 policy unix - n n - - spawn 3 user=nobody argv=/some/where/policy-server 4 - 5 /etc/postfix/main.cf: + 5 /etc/postfix/main.cf: 6 smtpd_recipient_restrictions = 7 ... 8 reject_unauth_destination @@ -239,8 +251,8 @@ daemon, you would use something like this: its child process after 1000 seconds. This is too short for a policy daemon that may run for as long as an SMTP client is connected to an SMTP server process. The default time limit is overruled in -main.cf with an explicit "policy_time_limit" setting. The name of -the parameter is the name of the master.cf entry ("policy") +main.cf with an explicit "policy_time_limit" setting. The name of +the parameter is the name of the master.cf entry ("policy") concatenated with the "_time_limit" suffix.Lines 8, 9: always specify "check_policy_service" AFTER @@ -254,11 +266,11 @@ TCP sockets instead:
- 1 /etc/postfix/master.cf: + 1 /etc/postfix/master.cf: 2 127.0.0.1:9998 inet n n n - - spawn 3 user=nobody argv=/some/where/policy-server 4 - 5 /etc/postfix/main.cf: + 5 /etc/postfix/main.cf: 6 smtpd_recipient_restrictions = 7 ... 8 reject_unauth_destination @@ -320,7 +332,7 @@ $greylist_delay=60;The /var/mta directory (or whatever you choose) should be writable by "nobody", or by whatever username you configure below -in master.cf for the policy service.
+in master.cf for the policy service.Example:
@@ -346,11 +358,11 @@ processes only:@@ -366,8 +378,8 @@ each request and reply. its child process after 1000 seconds. This is too short for a policy daemon that may run for as long as an SMTP client is connected to an SMTP server process. The default time limit is overruled in -main.cf with an explicit "policy_time_limit" setting. The name of -the parameter is the name of the master.cf entry ("policy") +main.cf with an explicit "policy_time_limit" setting. The name of +the parameter is the name of the master.cf entry ("policy") concatenated with the "_time_limit" suffix. @@ -378,11 +390,11 @@ client/server configuration" section above.-1 /etc/postfix/master.cf: +1 /etc/postfix/master.cf: 2 policy unix - n n - - spawn 3 user=nobody argv=/usr/bin/perl /usr/libexec/postfix/greylist.pl 4 -5 /etc/postfix/main.cf: +5 /etc/postfix/main.cf: 6 policy_time_limit = 3600@@ -400,7 +412,7 @@ forged MAIL FROM domains could be found at-1 /etc/postfix/master.cf: +1 /etc/postfix/master.cf: 2 127.0.0.1:9998 inet n n n - - spawn 3 user=nobody argv=/usr/bin/perl /usr/libexec/postfix/greylist.pl 4 -5 /etc/postfix/main.cf: +5 /etc/postfix/main.cf: 6 127.0.0.1:9998_time_limit = 3600- 1 /etc/postfix/main.cf: + 1 /etc/postfix/main.cf: 2 smtpd_recipient_restrictions = 3 reject_unlisted_recipient 4 ... @@ -450,7 +462,7 @@ database relatively quickly.- 1 /etc/postfix/main.cf: + 1 /etc/postfix/main.cf: 2 smtpd_recipient_restrictions = 3 reject_unlisted_recipient 4 ... diff --git a/postfix/html/TLS_README.html b/postfix/html/TLS_README.html index 0ff0d03f2..29d77edff 100644 --- a/postfix/html/TLS_README.html +++ b/postfix/html/TLS_README.html @@ -129,6 +129,11 @@ the make(1) files with the necessary definitions. This is done by invoking the command "make makefiles" in the Postfix top-level directory and with arguments as shown next. +NOTE: Do not use Gnu TLS. It will spontaneously terminate +a process with exit status code 2, instead of properly reporting +problems to Postfix, so that it can log them to the maillog file. +
+
If the OpenSSL include files (such as ssl.h) are @@ -274,7 +279,7 @@ is correctly configured to supply its intermediate CA certificate).
-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtpd_tls_cert_file = /etc/postfix/server.pem smtpd_tls_key_file = $smtpd_tls_cert_file@@ -284,7 +289,7 @@ is correctly configured to supply its intermediate CA certificate).-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtpd_tls_dcert_file = /etc/postfix/server-dsa.pem smtpd_tls_dkey_file = $smtpd_tls_dcert_file@@ -334,7 +339,7 @@ the TLS handshake when client certificates are requested.Example:
-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtpd_tls_CAfile = /etc/postfix/CAcert.pem smtpd_tls_CApath = /etc/postfix/certs@@ -376,7 +381,7 @@ strongly discouraged.@@ -392,7 +397,7 @@ since the headers may be changed by intermediate servers.-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtpd_tls_loglevel = 0@@ -407,7 +412,7 @@ using "smtpd_use_tls = yes".-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtpd_tls_received_header = yes@@ -430,7 +435,7 @@ This option is off by default and should only seldom be used.-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtpd_use_tls = yes@@ -442,8 +447,8 @@ Outlook [Express] prefer the "wrapper" mode. This is true for OE (Win32 < 5.0 and Win32 >=5.0 when run on a port<>25 and OE (5.01 Mac on all ports). --/etc/postfix/main.cf: +/etc/postfix/main.cf: smtpd_enforce_tls = yesIt is strictly discouraged to use this mode from main.cf. If -you want to support this service, enable a special port in master.cf +
It is strictly discouraged to use this mode from main.cf. If +you want to support this service, enable a special port in master.cf and specify "-o smtpd_tls_wrappermode = yes" as an smtpd(8) command line option. Port 465 (smtps) was once chosen for this feature.
@@ -452,7 +457,7 @@ line option. Port 465 (smtps) was once chosen for this feature.-/etc/postfix/master.cf: +/etc/postfix/master.cf: smtps inet n - n - - smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes@@ -477,7 +482,7 @@ feature.@@ -500,7 +505,7 @@ logged.-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtpd_tls_ask_ccert = no@@ -515,7 +520,7 @@ CA issues special CA which then issues the actual certificate...)-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtpd_tls_req_ccert = no@@ -536,7 +541,7 @@ set "smtpd_tls_auth_only = yes-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtpd_tls_ccert_verifydepth = 5@@ -560,7 +565,7 @@ the cost of repeatedly negotiating TLS session keys is high.-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtpd_tls_auth_only = no@@ -574,7 +579,7 @@ recommends a maximum of 24 hours.-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtpd_tls_session_cache_database = btree:/etc/postfix/smtpd_scache@@ -622,7 +627,7 @@ certificate must no longer be used (e.g. an employee leaving).-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtpd_tls_session_cache_timeout = 3600s-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtpd_recipient_restrictions = ... permit_tls_clientcerts @@ -643,7 +648,7 @@ the user or host.-/etc/postfix/main.cf: +/etc/postfix/main.cf: relay_clientcerts = hash:/etc/postfix/relay_clientcerts /etc/postfix/relay_clientcerts: @@ -665,7 +670,7 @@ don't know what to do with it, simply don't touch it and leave the@@ -691,7 +696,7 @@ those distributed with other TLS packages.-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtpd_tls_cipherlist = DEFAULT-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtpd_tls_dh1024_param_file = /etc/postfix/dh_1024.pem smtpd_tls_dh512_param_file = /etc/postfix/dh_512.pem@@ -707,7 +712,7 @@ handshake procedures.@@ -726,9 +731,23 @@ key configuration-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtpd_starttls_timeout = 300s- Client-side TLS session cache -
- Enabling TLS in the Postfix SMTP client +
- Enabling TLS in the Postfix SMTP client -
- Server certificate verification +
- Requiring TLS encryption + +
- Disabling server certificate verification + +
- Per-site TLS policies + + + +
- Closing a DNS loophole with per-site TLS policies + +
- Discovering servers that support TLS + +
- Server certificate verification depth
- Client-side cipher controls @@ -788,7 +807,7 @@ the overhead of the TLS exchange. certificates issued by these CAs, append the root certificate to $smtp_tls_CAfile or install it in the $smtp_tls_CApath directory. When you configure trust in a root CA, it is not necessary to explicitly trust -intermediary CAs signed by the root CA, unless $smtp_tls_verify_depth +intermediary CAs signed by the root CA, unless $smtp_tls_scert_verifydepth is less than the number of CAs in the certificate chain for the servers of interest. With a verify depth of 1 you can only verify certificates directly signed by a trusted CA, and all trusted intermediary CAs need to @@ -800,7 +819,7 @@ is correctly configured to supply its intermediate CA certificate).
-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtp_tls_cert_file = /etc/postfix/client.pem smtp_tls_key_file = $smtp_tls_cert_file@@ -810,7 +829,7 @@ is correctly configured to supply its intermediate CA certificate).-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtp_tls_dcert_file = /etc/postfix/client-dsa.pem smtp_tls_dkey_file = $smtpd_tls_cert_file@@ -849,7 +868,7 @@ when the certificate is needed.-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtp_tls_CAfile = /etc/postfix/CAcert.pem smtp_tls_CApath = /etc/postfix/certs@@ -888,7 +907,7 @@ transmission after STARTTLS@@ -915,7 +934,7 @@ is allowed to negotiate per unit time.-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtp_tls_loglevel = 0@@ -929,39 +948,37 @@ recommends a maximum of 24 hours.-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtp_tls_session_cache_database = btree:/etc/postfix/smtp_scache--/etc/postfix/main.cf: +/etc/postfix/main.cf: smtp_tls_session_cache_timeout = 3600sEnabling TLS in the Postfix SMTP client -
+Enabling TLS in the Postfix SMTP +client
By default, TLS is disabled in the Postfix SMTP client, so no difference to plain Postfix is visible. If you enable TLS, the Postfix SMTP client will send STARTTLS when TLS support is announced by the remote SMTP server.
-WARNING: MS Exchange servers will announce STARTTLS support -even when the service is not configured, so that the TLS handshake -will fail. It may be wise to not use this option on your central -mail hub, as you don't know in advance whether you are going to -connect to such a host. Instead, use the smtp_tls_per_site -recipient/site specific options that are described below.
- -When the TLS handshake fails and no other server is available, -the Postfix SMTP client defers the delivery attempt, and the mail -stays in the queue.
+When the server accepts the STARTTLS command, but the subsequent +TLS handshake fails, and no other server is available, the Postfix SMTP +client defers the delivery attempt, and the mail stays in the queue. After +a handshake failure, the communications channel is in an indeterminate +state and cannot be used for non-TLS deliveries.
Example:
+-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtp_use_tls = yesRequiring TLS encryption +
+You can ENFORCE the use of TLS, so that the Postfix SMTP client will not deliver mail over unencrypted connections. In this mode, the remote SMTP server hostname must match the information in the @@ -971,14 +988,14 @@ server certificate doesn't verify or the remote SMTP server hostname doesn't match, and no other server is available, the delivery attempt is deferred and the mail stays in the queue.
-The remote SMTP server hostname used in the check is beyond -question, as it must be the principal hostname (no CNAME allowed -here). Checks are performed against all names provided as dNSNames +
The remote SMTP server hostname is verified against all names +provided as dNSNames in the SubjectAlternativeName. If no dNSNames are specified, the -CommonName is checked. The behavior may be changed with the +CommonName is checked. Verification may be turned off with the smtp_tls_enforce_peername option which is discussed below.
-This option is useful only if you know that you will only +
Enforcing the use of TLS is useful if you know that you will +only connect to servers that support RFC 2487 _and_ that present server certificates that meet the above requirements. An example would be a client only sends email to one specific mailhub that offers @@ -988,11 +1005,14 @@ the necessary STARTTLS support.
+-/etc/postfix/main.cf: - smtp_enforce_tls = no +/etc/postfix/main.cf: + smtp_enforce_tls = yesDisabling server certificate +verification
+As of RFC 2487 the requirements for hostname checking for MTA clients are not set. When TLS is required (smtp_enforce_tls = yes), the option smtp_tls_enforce_peername can be set to "no" to disable @@ -1000,106 +1020,198 @@ strict remote SMTP server hostname checking. In this case, the mail delivery will proceed regardless of the CommonName etc. listed in the certificate.
-Note: the smtp_tls_enforce_peername setting has no effect on -sessions that are controlled via the smtp_tls_per_site table.
- -Disabling the remote SMTP server hostname verification can -make sense in closed environment where special CAs are created. -If not used carefully, this option opens the danger of a -"man-in-the-middle" attack (the CommonName of this possible attacker -is logged).
+Despite the potential for eliminating "man-in-the-middle" and +other attacks, mandatory certificate/peername verification is not +viable as a default Internet mail delivery policy at this time. A +significant fraction of TLS enabled MTAs uses self-signed certificates, +or certificates that are signed by a private certificate authority. +On a machine that delivers mail to the Internet, if you set +smtp_enforce_tls = yes, you should probably also set +smtp_tls_enforce_peername = no. You can use the per-site TLS +policies (see below) to enable full peer verification for specific +destinations that are known to have verifiable TLS server certificates. +
Example:
--/etc/postfix/main.cf: - smtp_tls_enforce_peername = yes +/etc/postfix/main.cf: + smtp_enforce_tls = yes + smtp_tls_enforce_peername = noGenerally, trying TLS can be a bad idea, as some servers offer -STARTTLS but the negotiation will fail leading to unexplainable -failures. Instead, it may be a good idea to choose the TLS usage -policy based on the recipient or the mailhub to which you are -connecting.
+Per-site TLS policies
-Deciding the TLS usage policy per recipient may be difficult, -since a single email delivery attempt can involve several recipients. -Instead, use of TLS is controlled by the Postfix next-hop destination -domain name and by the remote SMTP server hostname. If either of these -matches an entry in the smtp_tls_per_site table, appropriate action -is taken.
+A small fraction of servers offer STARTTLS but the negotiation +consistently fails, leading to mail aging out of the queue and +bouncing back to the sender. In such cases, you can use the per-site +policies to disable TLS for the problem sites. Alternatively, you +can enable TLS for just a few specific sites and not enable it for +all sites.
-The remote SMTP server hostname is simply the DNS name of the -server that the Postfix SMTP client connects to. The next-hop -destination is Postfix specific. By default, this is the domain -name in the recipient address, but this information can be overruled -by the transport(5) table or by the relayhost parameter setting. -In these cases the relayhost etc. must be listed in the smtp_tls_per_site -table, instead of the recipient domain name.
+ + +The smtp_tls_per_site table is searched for a policy that matches +the following information:
--
- NONE
- Don't use TLS at all.
+- remote SMTP server hostname
- This is simply the DNS +name of the server that the Postfix SMTP client connects to; this +name may be obtained from other DNS lookups, such as MX lookups or +CNAME lookups.
-- MAY
- Try to use STARTTLS if offered, otherwise use -the unencrypted connection.
- -- MUST
- Require usage of STARTTLS, require that the -remote SMTP server hostname matches the information in the remote -SMTP server certificate, and require that the remote SMTP server -certificate was issued by a trusted CA.
- -- MUST_NOPEERMATCH
- Require usage of STARTTLS, but do -not require that the remote SMTP server hostname matches the -information in the remote SMTP server certificate, or that the -server certificate was issued by a trusted CA.
+- next-hop destination
- This is normally the domain +portion of the recipient address, but it may be overruled by +information from the transport(5) table, from the relayhost parameter +setting, or from the relay_transport setting. When it's not the +recipient domain, the next-hop destination can have the Postfix-specific +form "[name]", [name]:port", "name" or +"name:port".
The actual TLS usage policy depends not only on whether the -next-hop destination or remote SMTP server hostname are found in -the smtp_tls_per_site table, but also on the smtp_enforce_tls -setting:
+When both the hostname lookup and the next-hop lookup succeed, +the host policy does not automatically override the next-hop policy. +Instead, precedence is given to either the more specific or the +more secure per-site policy as described below.
+ +The smtp_tls_per_site table uses a simple "name whitespace +value" format. Specify host names or next-hop destinations on +the left-hand side; no wildcards are allowed. On the right hand +side specify one of the following keywords:
+ ++ ++ ++ +
+ +- NONE
- Don't use TLS at all. This overrides a less +specific MAY lookup result from the alternate host or next-hop +lookup key, and overrides the global smtp_use_tls, smtp_enforce_tls, +and smtp_tls_enforce_peername settings.
+ +- MAY
- Try to use TLS if the server announces support, +otherwise use the unencrypted connection. This has less precedence +than a more specific result (including NONE) from the alternate +host or next-hop lookup key, and has less precedence than the more +specific global "smtp_enforce_tls = yes" or "smtp_tls_enforce_peername += yes".
+ +- MUST_NOPEERMATCH
- Require TLS encryption, but do not +require that the remote SMTP server hostname matches the information +in the remote SMTP server certificate, or that the server certificate +was issued by a trusted CA. This overrides a less secure NONE +or a less specific MAY lookup result from the alternate host +or next-hop lookup key, and overrides the global smtp_use_tls, +smtp_enforce_tls and smtp_tls_enforce_peername settings.
+ +- MUST
- Require TLS encryption, require that the remote +SMTP server hostname matches the information in the remote SMTP +server certificate, and require that the remote SMTP server certificate +was issued by a trusted CA. This overrides a less secure NONE +and MUST_NOPEERMATCH or a less specific MAY lookup +result from the alternate host or next-hop lookup key, and overrides +the global smtp_use_tls, smtp_enforce_tls and smtp_tls_enforce_peername +settings.
+ +The precedences between global (main.cf) and per-site TLS +policies can be summarized as follows:
-
-If no match was found, the policy is applied as specified -with smtp_enforce_tls.
+When neither the remote SMTP server hostname nor the +next-hop destination are found in the smtp_tls_per_site table, the +policy is based on smtp_use_tls, smtp_enforce_tls and +smtp_tls_enforce_peername. Note: "smtp_enforce_tls = yes" and +"smtp_tls_enforce_peername = yes" imply "smtp_use_tls = yes".
-If a match was found, and the smtp_enforce_tls policy is -"enforce", NONE explicitly switches it off; otherwise the "enforce" -mode is used even for entries that specify MAY.
+When both hostname and next-hop destination lookups produce +a result, the more specific per-site policy (NONE, MUST, etc) +overrides the less specific one (MAY), and the more secure per-site +policy (MUST, etc) overrides the less secure one (NONE).
+ +After the per-site policy lookups are combined, the result +generally overrides the global policy. The exception is the less +specific MAY per-site policy, which is overruled by the more +specific global "smtp_enforce_tls = yes" with server certificate +verification as specified with the smtp_tls_enforce_peername +parameter.
Special hint for TLS enforcement mode: since no secure DNS -lookup mechanism is available, mail can be delivered to the wrong -remote SMTP server. This is not prevented by specifying MUST for -the next-hop domain name. The recommended setup is: specify local -transport(5) table entries for sensitive domains with explicit -smtp:[mailhost] destinations (since you can assure security of this -table unlike DNS), then specify MUST for these mail hosts in the -smtp_tls_per_site table.
+Closing a DNS loophole with + per-site TLS policies
+ +As long as no secure DNS lookup mechanism is available, false +hostnames may appear in MX or CNAME responses. Even with a perfect +match between the server hostname and the server certificate, there +is no guarantee that Postfix is connected to the right server. To +avoid this loophole take the following steps:
+ ++ +
Eliminate MX lookups. Specify local transport(5) table +entries for sensitive domains with explicit smtp:[mailhost] +or smtp:[mailhost]:port destinations (you can assure +security of this table unlike DNS); in the smtp_tls_per_site table +specify the value MUST for the key [mailhost] or +smtp:[mailhost]:port. This prevents false hostname +information in DNS MX records from changing the server hostname +that Postfix uses for TLS policy lookup and server certificate +verification.
+ +Disallow CNAME hostname overrides. In main.cf specify +"smtp_cname_overrides_servername = no". This prevents false hostname +information in DNS CNAME records from changing the server hostname +that Postfix uses for TLS policy lookup and server certificate +verification. This feature requires Postfix 2.2.9 or later.
+ +Example:
- ---/etc/postfix/main.cf: + +++/etc/postfix/main.cf: smtp_tls_per_site = hash:/etc/postfix/tls_per_site + relayhost = [msa.example.net]:587 + +/etc/postfix/tls_per_site: + # relayhost exact nexthop match + [msa.example.net]:587 MUST + + # example.org (as nexthop) has MX hosts with broken TLS. + example.org NONE + + # Except for (as host) mx1.example.org which works. + mx1.example.org MAYDiscovering servers that support +TLS
+As we decide on a "per site" basis whether or not to use TLS, it would be good to have a list of sites that offered "STARTTLS". We can collect it ourselves with this option.
@@ -1118,12 +1230,12 @@ postfix/smtp[pid]: Host offered STARTTLS: [hostname.example.com]--/etc/postfix/main.cf: +/etc/postfix/main.cf: smtp_tls_note_starttls_offer = yesServer certificate verification
+Server certificate verification depth
When verifying a remote SMTP server certificate, a verification depth of 1 is sufficient if the certificate is directly issued by @@ -1135,7 +1247,7 @@ special CA which then issues the actual certificate...)
@@ -1154,7 +1266,7 @@ don't know what to do with it, simply don't touch it and leave the-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtp_tls_scert_verifydepth = 5@@ -1171,7 +1283,7 @@ defers delivery if no alternative server is available.-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtp_tls_cipherlist = DEFAULT@@ -1191,7 +1303,7 @@ session key.-/etc/postfix/main.cf: +/etc/postfix/main.cf: smtp_starttls_timeout = 300s@@ -1206,11 +1318,11 @@ regular file, you must prepend the source type to the source name: "dev:" for a device special file, or "egd:" for a source with EGD compatible socket interface. --/etc/postfix/main.cf: +/etc/postfix/main.cf: tls_daemon_random_bytes = 32Examples (specify only one in main.cf):
+Examples (specify only one in main.cf):
-/etc/postfix/main.cf: +/etc/postfix/main.cf: tls_random_source = dev:/dev/urandom tls_random_source = egd:/var/run/egd-pool@@ -1227,7 +1339,7 @@ entropy source, a larger amount of data can be read.@@ -1242,7 +1354,7 @@ The default maximal time interval is 1 hour.-/etc/postfix/main.cf: +/etc/postfix/main.cf: tls_random_bytes = 32@@ -1260,7 +1372,7 @@ the file location should probably be on the /var partition (but-/etc/postfix/main.cf: +/etc/postfix/main.cf: tls_random_reseed_period = 3600s-/etc/postfix/main.cf: +/etc/postfix/main.cf: tls_random_exchange_name = /etc/postfix/prng_exch tls_random_prng_update_period = 3600s@@ -1380,7 +1492,7 @@ super-user privileges.Configure Postfix, by adding the following to -/etc/postfix/main.cf.
+/etc/postfix/main.cf .@@ -1424,7 +1536,7 @@ patch by Lutz Jänicke, but differs in a few minor ways.-
+main.cf: Specify "btree" instead of "sdbm" for TLS +
main.cf: Specify "btree" instead of "sdbm" for TLS session cache databases.
TLS session cache databases are now accessed only by the @@ -1439,7 +1551,7 @@ In most cases, btree databases should be adequate.
NOTE: You cannot use dbm databases. TLS session objects are too large.
-master.cf: Specify "unix" instead of "fifo" as +
master.cf: Specify "unix" instead of "fifo" as the tlsmgr service type.
The smtp(8) and smtpd(8) processes now use a client-server @@ -1447,8 +1559,22 @@ protocol in order to access the tlsmgr(8) pseudo-ran generation (PRNG) pool, and in order to access the TLS session cache databases. Such a protocol cannot be run across fifos.
+smtp_tls_per_site: the MUST_NOPEERMATCH per-site policy +cannot override the global "smtp_tls_enforce_peername = yes" setting. +
+ +smtp_tls_per_site: a combined (NONE + MAY) lookup result +for (hostname and next-hop destination) produces counter-intuitive +results for different main.cf settings. TLS is enabled with +"smtp_tls_enforce_peername = no", but it is disabled when both +"smtp_enforce_tls = yes" and "smtp_tls_enforce_peername = yes". +
+The smtp_tls_per_site limitations were removed by the end of +the Postfix 2.2 support cycle.
+Credits
@@ -1459,6 +1585,10 @@ Jänicke at Cottbus Technical University.
- Wietse Venema adopted the code, did some restructuring, and compiled this part of the documentation from Lutz's documents. +
- Victor Duchovni was instrumental with the re-implementation +of the smtp_tls_per_site code in terms of enforcement levels, which +simplified the implementation greatly. +