From: Wietse Venema
Date: Thu, 9 Jan 2014 05:00:00 +0000 (-0500)
Subject: postfix-2.12-20140109
X-Git-Tag: v3.0.0-RC1~69
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14e328a286c3e50b2b2118d8ac3abcd3935c9ba2;p=thirdparty%2Fpostfix.git
postfix-2.12-20140109
---
diff --git a/postfix/.indent.pro b/postfix/.indent.pro
index 61ea04957..7c1140ce0 100644
--- a/postfix/.indent.pro
+++ b/postfix/.indent.pro
@@ -180,6 +180,7 @@
-TMATCH_OPS
-TMBLOCK
-TMBOX
+-TMDB_env
-TMDB_txn
-TMDB_val
-TMILTER
@@ -381,6 +382,7 @@
-Tssize_t
-Tssl_cipher_stack_t
-Tssl_comp_stack_t
+-Tstat
-Ttime_t
-Ttlsa_filter
-Tx509_extension_stack_t
diff --git a/postfix/HISTORY b/postfix/HISTORY
index 77a10aeff..c67bceb16 100644
--- a/postfix/HISTORY
+++ b/postfix/HISTORY
@@ -19466,9 +19466,6 @@ Apologies for any names omitted.
Shockingly, LMDB terminates the postscreen daemon without
logfile record. File: util/dict_cache.c.
- Because of the above behavior, LMDB cannot be supported in
- the stable Postfix 2.11 release.
-
20140102
Bugfix: close the LMDB database cursor's read transaction
@@ -19484,11 +19481,46 @@ Apologies for any names omitted.
smtp_rcpt.c, smtp_session.c, smtp_chat.c, smtp_proto.c,
smtp_connect.c.
-20130104
+20140104
Feature: support for optional configuration files
"$daemon-directory/postfix-files.d/*". These are processed
in sorted order after "$daemon-directory/postfix-files",
This avoids breaking "postfix set-permissions" etc. when a
- Postfix distributions comes in multiple packages. File:
+ Postfix distribution comes in multiple packages. File:
conf/post-install.
+
+20140107
+
+ Feature: LMDB 0.9.11 allows Postfix daemons to log an LMDB
+ error message, instead of falling out of the sky without
+ any notification. Files: util/slmdb.[hc], util/dict_lmdb.c.
+
+20140108
+
+ Bugfix: every Postfix LMDB transaction is now protected by
+ an external lock for its entire life time. File: util/slmdb.c.
+
+20140109
+
+ Cleanup: turn off DNSSEC lookup after CNAME redirection to
+ an insecure zone. This is an optimization for resolvers
+ that do not automatically resolve CNAME chains. Viktor
+ Dukhovni. File: dns/dns_lookup.c.
+
+ Cleanup: do not salt the SMTP TLS policy lookup cache key
+ with the DNSSEC status. The DNSSEC status will not change
+ when the same nexthop/host pair is looked up repeatedly.
+ Viktor Dukhovni. File: smtp/smtp_tls_policy.c.
+
+ Robustness: Suppress TLSA lookups only when the qname zone
+ is insecure, not just because the rname zone is insecure.
+ This requires an extra T_CNAME lookup for the qname, since
+ nameservers are often "too helpful" and report CNAME records
+ together with the CNAME targets. When the targets are
+ insecure the whole reply is marked as insecure. Viktor
+ Dukhovni. File: tls/tls_dane.c.
+
+ Cleanup: Unify/simplify reporting of configuration or other
+ conditions that prevent DANE security. Viktor Dukhovni.
+ Files: global/dsn_buf.[hc], tls/tls_dane.c, smtp/smtp_tls_policy.c.
diff --git a/postfix/README_FILES/FORWARD_SECRECY_README b/postfix/README_FILES/FORWARD_SECRECY_README
index d59c5a682..15751b71b 100644
--- a/postfix/README_FILES/FORWARD_SECRECY_README
+++ b/postfix/README_FILES/FORWARD_SECRECY_README
@@ -83,14 +83,13 @@ element of that group called a "generator". Presently, there are two flavors of
* PPrriimmee--ffiieelldd ggrroouuppss ((EEDDHH)):: The server needs to be configured with a
suitably-large prime and a corresponding "generator". The acronym for
forward secrecy over prime fields is EDH for Ephemeral Diffie-Hellman (also
- abbreviated as DHE for Diffie-Hellman Exchange).
+ abbreviated as DHE).
* EElllliippttiicc--ccuurrvvee ggrroouuppss ((EEEECCDDHH)):: The server needs to be configured with a
"named curve". These offer better security at lower computational cost than
prime field groups, but are not as widely implemented. The acronym for the
elliptic curve version is EECDH which is short for Ephemeral Elliptic Curve
- Diffie-Hellman (also abbreviated as ECDHE for Elliptic Curve Diffie-Hellman
- Exchange).
+ Diffie-Hellman (also abbreviated as ECDHE).
It is not essential to know what these are, but one does need to know that
OpenSSL supports EECDH with version 1.0.0 or later. Thus the configuration
@@ -201,7 +200,9 @@ GGeettttiinngg ssttaarrtteedd,, qquuiicckk aanndd ddiir
EEEECCDDHH CClliieenntt aanndd sseerrvveerr ssuuppppoorrtt ((PPoossttffiixx >>== 22..66 wwiitthh OOppeennSSSSLL >>== 11..00..00))
With Postfix 2.6 and 2.7, enable elliptic-curve support in the Postfix SMTP
-client and server. This is the default with Postfix >= 2.8.
+client and server. This is the default with Postfix >= 2.8. Note, however, that
+elliptic-curve support may be disabled by the vendor, as in some versions of
+RedHat Linux.
/etc/postfix/main.cf:
# Postfix 2.6 or 2.7 only. This is default with Postfix 2.8 and later.
@@ -209,7 +210,7 @@ client and server. This is the default with Postfix >= 2.8.
EEDDHH CClliieenntt ssuuppppoorrtt ((PPoossttffiixx >>== 22..22))
-This space intentionally left blank.
+This works "out of the box" without additional configuration.
EEDDHH SSeerrvveerr ssuuppppoorrtt ((PPoossttffiixx >>== 22..22))
diff --git a/postfix/README_FILES/LMDB_README b/postfix/README_FILES/LMDB_README
index 851621710..3fcfd9ab3 100644
--- a/postfix/README_FILES/LMDB_README
+++ b/postfix/README_FILES/LMDB_README
@@ -2,34 +2,26 @@ PPoossttffiixx OOppeennLLDDAAPP LLMMDDBB HHoowwttoo
-------------------------------------------------------------------------------
-NNoottee
-
-LMDB is not supported in the stable Postfix release. It will spontaneously
-terminate a Postfix daemon process without allowing Postfix to 1) report the
-problem to the maillog file, and to 2) provide reduced service where this is
-appropriate.
-
IInnttrroodduuccttiioonn
Postfix uses databases of various kinds to store and look up information.
-Postfix databases are specified as "type:name". OpenLDAP LMDB implements the
-Postfix database type "lmdb". The name of a Postfix OpenLDAP LMDB database is
-the name of the database file without the ".lmdb" suffix.
+Postfix databases are specified as "type:name". OpenLDAP LMDB (called "LMDB"
+from here on) implements the Postfix database type "lmdb". The name of a
+Postfix LMDB database is the name of the database file without the ".lmdb"
+suffix.
This document describes:
- 1. How to build Postfix with OpenLDAP LMDB support.
+ * Building Postfix with LMDB support.
- 2. How to configure LMDB settings.
+ * Configuring LMDB settings.
- 3. Missing pthread library trouble.
+ * Supported minimum LMDB patchlevel.
- 4. Unexpected failure modes that don't exist with other Postfix databases.
+BBuuiillddiinngg PPoossttffiixx wwiitthh LLMMDDBB ssuuppppoorrtt
-BBuuiillddiinngg PPoossttffiixx wwiitthh OOppeennLLDDAAPP LLMMDDBB ssuuppppoorrtt
-
-Postfix normally does not enable OpenLDAP LMDB support. To build Postfix with
-OpenLDAP LMDB support, use something like:
+Postfix normally does not enable LMDB support. To build Postfix with LMDB
+support, use something like:
% make makefiles CCARGS="-DHAS_LMDB -I/usr/local/include" \
AUXLIBS="-L/usr/local/lib -llmdb"
@@ -41,19 +33,7 @@ Solaris may need this:
AUXLIBS="-R/usr/local/lib -L/usr/local/lib -llmdb"
% make
-The exact pathnames depend on how OpenLDAP LMDB was installed.
-
-CCoonnffiigguurree LLMMDDBB sseettttiinnggss
-
-Postfix provides one configuration parameter that controls OpenLDAP LMDB
-database behavior.
-
- * lmdb_map_size (default: 16777216). This setting specifies the initial
- OpenLDAP LMDB database size limit in bytes. Each time a database becomes
- full, its size limit is doubled. The maximum size is the largest signed
- integer value of "long".
-
-MMiissssiinngg pptthhrreeaadd lliibbrraarryy ttrroouubbllee
+The exact pathnames depend on how LMDB was installed.
When building Postfix fails with:
@@ -65,46 +45,40 @@ Add the "-lpthread" library to the "make makefiles" command.
% make makefiles .... AUXLIBS="... -lpthread"
-Source code for OpenLDAP LMDB is available at http://www.openldap.org. More
-information is available at http://highlandsun.com/hyc/mdb/.
-
-UUnneexxppeecctteedd ffaaiilluurree mmooddeess ooff PPoossttffiixx LLMMDDBB ddaattaabbaasseess..
+CCoonnffiigguurriinngg LLMMDDBB sseettttiinnggss
-As documented below, conversion to LMDB introduces a number of failure modes
-that don't exist with other Postfix databases. Some failure modes have been
-eliminated in the course of time. The writeup below reflects the status as of
-LMDB 0.9.9.
+Postfix provides one configuration parameter that controls LMDB database
+behavior.
-NNoonn--oobbvviioouuss rreeccoovveerryy wwiitthh ppoossttmmaapp((11)),, ppoossttaalliiaass((11)),, oorr ttllssmmggrr((88)) ffrroomm aa
-ccoorrrruupptteedd ddaattaabbaassee..
+ * lmdb_map_size (default: 16777216). This setting specifies the initial LMDB
+ database size limit in bytes. Each time a database becomes full, its size
+ limit is doubled. The maximum size is the largest signed integer value of
+ "long".
-Problem:
- A corrupted LMDB database can't be rebuilt simply by re-running postmap(1)
- or postalias(1), or by waiting until a tlsmgr(8) daemon restarts. This
- problem does not exist with other Postfix databases.
+SSuuppppoorrtteedd mmiinniimmuumm LLMMDDBB ppaattcchhlleevveell
-Background:
- The Postfix LMDB database client does not truncate the database file.
- Instead it attempts to create a transaction for a "drop" request plus
- subsequent "store" requests. That is obviously not possible with a
- corrupted database file.
+Currently, Postfix supports LMDB 0.9.11 or later. The supported minimum LMDB
+patchlevel has evolved over time, as the result of deployment experience with
+Postfix.
-Impact:
- Postfix does not process mail until someone fixes the problem.
+ * LMDB 0.9.11 allows Postfix daemons to log an LMDB error message, instead of
+ falling out of the sky without any notification.
-Recovery:
- First delete the ".lmdb" file by hand. Then rebuild the file with the
- postmap(1) or postalias(1) command if the file was created with those
- commands, or restart postfix daemons if the file is maintained by tlsmgr
- (8).
+ * LMDB 0.9.10 closes an information leak where LMDB was writing up to 4kbyte-
+ chunks of uninitialized heap memory to the database, persisting information
+ that was not meant to be persisted, or sharing information that was not
+ meant to be shared.
-Prevention:
- Arrange your file systems such that they never run out of free space.
+ * LMDB 0.9.8 allows Postfix to use external (fcntl()-based) locks, instead of
+ having to use world-writable LMDB lock files.
- Use ECC memory to detect and correct silent corruption of in-memory file
- system data and metadata.
+ * LMDB 0.9.8 allows an application to recover from a "database full" error
+ without having to close the database, by adding support to update the
+ database size limit on-the-fly; and it adds support for an application to
+ adopt someone elses change to the database size limit, without having to
+ close the database.
- Use a file system such as ZFS to detect and correct silent corruption of
- on-disk file system data and metadata. DO NOT use ZFS on systems without
- ECC memory error correction.
+ * LMDB 0.9.7 allows the postmap and postalias commands to use a bulk-mode
+ transaction larger than the amount of physical memory. This is necessary
+ because LMDB supports databases larger than physical memory.
diff --git a/postfix/README_FILES/TLS_README b/postfix/README_FILES/TLS_README
index 552279f72..404bde7c5 100644
--- a/postfix/README_FILES/TLS_README
+++ b/postfix/README_FILES/TLS_README
@@ -622,33 +622,11 @@ ciphers:
# Legacy syntax:
smtpd_tls_mandatory_protocols = TLSv1
-If you want to take advantage of ciphers with ephemeral Diffie-Hellman (EDH)
-key exchange (this offers "forward-secrecy"), DH parameters are needed. Instead
-of using the built-in DH parameters for both 1024-bit (non-export ciphers) and
-512-bit (export ciphers), it is better to generate your own parameters, since
-otherwise it would "pay" for a possible attacker to start a brute force attack
-against parameters that are used by everybody. Postfix defaults to compiled-in
-parameters that are shared by all Postfix users who don't generate their own
-settings.
-
-To generate your own set of DH parameters, use:
-
- % ooppeennssssll ggeennddhh --oouutt //eettcc//ppoossttffiixx//ddhh__551122..ppeemm --22 551122
- % ooppeennssssll ggeennddhh --oouutt //eettcc//ppoossttffiixx//ddhh__11002244..ppeemm --22 11002244
-
-Support for elliptic curve cryptography is available with Postfix 2.6 and
-OpenSSL 1.0.0 or later. To enable ephemeral elliptic curve Diffie-Hellman
-(EECDH) key-exchange, set "smtpd_tls_eecdh_grade = strong" or
-"smtpd_tls_eecdh_grade = ultra". The "ultra" setting is substantially more CPU
-intensive, and "strong" is sufficiently secure for most situations.
-
-Examples:
-
- /etc/postfix/main.cf:
- smtpd_tls_dh1024_param_file = /etc/postfix/dh_1024.pem
- smtpd_tls_dh512_param_file = /etc/postfix/dh_512.pem
- # Postfix >= 2.6:
- smtpd_tls_eecdh_grade = strong
+If you want to take maximal advantage of ciphers that offer forward secrecy see
+the Getting started section of FORWARD_SECRECY_README. The full document
+conveniently presents all information about Postfix "perfect" forward secrecy
+support in one place: what forward secrecy is, how to tweak settings, and what
+you can expect to see when Postfix uses ciphers with forward secrecy.
Postfix 2.8 and later, in combination with OpenSSL 0.9.7 and later allows TLS
servers to preempt the TLS client's cipher-suite preference list. This is
@@ -1829,7 +1807,7 @@ Example:
smtp_tls_exclude_ciphers = aNULL
# Preferred form with Postfix >= 2.5:
smtp_tls_mandatory_protocols = !SSLv2
- # Legacy form for Postifx < 2.5:
+ # Legacy form for Postfix < 2.5:
smtp_tls_mandatory_protocols = SSLv3, TLSv1
# Also available with Postfix >= 2.6:
smtp_tls_ciphers = export
diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES
index a89e883f5..14b8ea23f 100644
--- a/postfix/RELEASE_NOTES
+++ b/postfix/RELEASE_NOTES
@@ -1,4 +1,4 @@
-This is the Postfix 2.12 (experimental) branch.
+This is the Postfix 2.12 (experimental) release.
The stable Postfix release is called postfix-2.11.x where 2=major
release number, 11=minor release number, x=patchlevel. The stable
diff --git a/postfix/RELEASE_NOTES-2.11 b/postfix/RELEASE_NOTES-2.11
index 4931a94e7..be893f3ec 100644
--- a/postfix/RELEASE_NOTES-2.11
+++ b/postfix/RELEASE_NOTES-2.11
@@ -45,6 +45,23 @@ Another concern is that a legitimate CA might be coerced to provide
a certificate that allows its government to play man-in-the-middle
on TLS traffic and observe the plaintext.
+Major changes - LMDB database support
+-------------------------------------
+
+LMDB is a memory-mapped database that was originally developed as
+part of OpenLDAP. The Postfix LMDB driver was originally written
+by Howard Chu, LMDB's creator. Support for LMDB has evolved throughout
+the Postfix 2.11 development cycle.
+
+LMDB can be used for all Postfix lookup table and cache storage.
+It is the first persistent Postfix database that can be shared among
+multiple writers such as postscreen daemons (Postfix already supported
+non-persistent memcached caches). See lmdb_table(5) and LMDB_README
+for further information.
+
+Postfix currently supports LMDB version 0.9.11 and later. The minimum
+version may change over time in the light of deployment experience.
+
Major changes - postscreen whitelisting
---------------------------------------
@@ -74,7 +91,7 @@ Major changes - smtpd access control
------------------------------------
[Feature 20131031] The check_sasl_access feature can be used to
-block hijacked logins. Like other check_mumble_acces features it
+block hijacked logins. Like other check_mumble_access features it
queries a lookup table (in this case with the SASL login name), and
it supports the same actions as any Postfix access(5) table.
diff --git a/postfix/html/FORWARD_SECRECY_README.html b/postfix/html/FORWARD_SECRECY_README.html
index 40613f1ff..7ce054d6d 100644
--- a/postfix/html/FORWARD_SECRECY_README.html
+++ b/postfix/html/FORWARD_SECRECY_README.html
@@ -38,7 +38,7 @@ will focus on TLS Forward Secrecy in the Postfix SMTP client and
server. See TLS_README for a general
description of Postfix TLS support.
- What is Forward Secrecy
+
The term "Forward Secrecy" (or sometimes "Perfect Forward Secrecy")
is used to describe security protocols in which the confidentiality
@@ -126,7 +126,7 @@ Presently, there are two flavors of "groups" that work with PFS:
Prime-field groups (EDH): The server needs to be
configured with a suitably-large prime and a corresponding "generator".
The acronym for forward secrecy over prime fields is EDH for Ephemeral
-Diffie-Hellman (also abbreviated as DHE for Diffie-Hellman Exchange).
+Diffie-Hellman (also abbreviated as DHE).
Elliptic-curve groups (EECDH): The server needs
@@ -134,8 +134,7 @@ to be configured with a "named curve". These offer better security
at lower computational cost than prime field groups, but are not
as widely implemented. The acronym for the elliptic curve version
is EECDH which is short for Ephemeral Elliptic Curve Diffie-Hellman
-(also abbreviated as ECDHE for Elliptic Curve Diffie-Hellman
-Exchange).
+(also abbreviated as ECDHE).
@@ -276,7 +275,8 @@ href="TLS_README.html#client_tls_policy">TLS policy table.
With Postfix 2.6 and 2.7, enable elliptic-curve support in the
Postfix SMTP client and server. This is the default with Postfix
-≥ 2.8.
+≥ 2.8. Note, however, that elliptic-curve support may be disabled
+by the vendor, as in some versions of RedHat Linux.
@@ -288,7 +288,7 @@ Postfix SMTP client and server. This is the default with Postfix
EDH Client support (Postfix ≥ 2.2)
- This space intentionally left blank.
+ This works "out of the box" without additional configuration.
EDH Server support (Postfix ≥ 2.2)
diff --git a/postfix/html/LMDB_README.html b/postfix/html/LMDB_README.html
index 56f468f2d..554320332 100644
--- a/postfix/html/LMDB_README.html
+++ b/postfix/html/LMDB_README.html
@@ -17,41 +17,31 @@
-Note
-
- LMDB is not supported in the stable Postfix release. It will
-spontaneously terminate a Postfix daemon process without allowing
-Postfix to 1) report the problem to the maillog file, and to 2)
-provide reduced service where this is appropriate.
-
Introduction
Postfix uses databases of various kinds to store and look up
-information. Postfix databases are specified as "type:name".
-OpenLDAP LMDB implements the Postfix database type "lmdb".
-The name of a Postfix OpenLDAP LMDB database is the name
-of the database file without the ".lmdb" suffix.
+information. Postfix databases are specified as "type:name". OpenLDAP
+LMDB (called "LMDB" from here on) implements the Postfix database
+type "lmdb". The name of a Postfix LMDB database is the name of
+the database file without the ".lmdb" suffix.
This document describes:
-
-
--
How to build Postfix with OpenLDAP
-LMDB support.
+
+
-
+
- Postfix normally does not enable OpenLDAP LMDB support. To
-build Postfix with OpenLDAP LMDB support, use something like:
+ Postfix normally does not enable LMDB support. To
+build Postfix with LMDB support, use something like:
@@ -71,23 +61,7 @@ build Postfix with OpenLDAP LMDB support, use something like:
- The exact pathnames depend on how OpenLDAP LMDB was installed.
-
-
-
- Postfix provides one configuration parameter that controls
-OpenLDAP LMDB database behavior.
-
-
-
-
+ The exact pathnames depend on how LMDB was installed.
When building Postfix fails with:
@@ -107,10 +81,55 @@ undefined reference to `pthread_mutex_lock'
- Source code for OpenLDAP LMDB is available at
-http://www.openldap.org.
-More information is available at
-http://highlandsun.com/hyc/mdb/.
+
+
+ Postfix provides one configuration parameter that controls
+LMDB database behavior.
+
+
+
+
+
+ Currently, Postfix supports LMDB 0.9.11 or later. The supported
+minimum LMDB patchlevel has evolved over time, as the result of
+deployment experience with Postfix.
+
+
+
+-
LMDB 0.9.11 allows Postfix daemons to log an LMDB error
+message, instead of falling out of the sky without any notification.
+
+
+ -
LMDB 0.9.10 closes an information leak where LMDB was
+writing up to 4kbyte-chunks of uninitialized heap memory to the
+database, persisting information that was not meant to be persisted,
+or sharing information that was not meant to be shared.
+
+ -
LMDB 0.9.8 allows Postfix to use external (fcntl()-based)
+locks, instead of having to use world-writable LMDB lock files.
+
+
+ -
LMDB 0.9.8 allows an application to recover from a "database
+full" error without having to close the database, by adding support
+to update the database size limit on-the-fly; and it adds support
+for an application to adopt someone elses change to the database
+size limit, without having to close the database.
+
+ -
LMDB 0.9.7 allows the postmap and postalias commands to
+use a bulk-mode transaction larger than the amount of physical
+memory. This is necessary because LMDB supports databases larger
+than physical memory.
+
+
+
+
+
+
+
+