This patch is a back-port of fixes from Postfix 2.3. The main changes are: - The PostgreSQL client was updated after major database API changes in response to PostgreSQL security issues. This breaks support for PGSQL versions prior to 8.1.4, 8.0.8, 7.4.13, and 7.3.15. Support for these older releases requires major code changes that will have to wait until Postfix 2.4. - The Postfix SMTP client enforced Mandatory TLS only when talking to an ESMTP server; enforcement did not happen if Postfix could somehow be forced to send HELO instead of EHLO. This is minor compared to the DNS spoofing issues that were fixed with Postfix 2.2.10. Prereq: "2.2.10" diff -cr /var/tmp/postfix-2.2.10/src/global/mail_version.h ./src/global/mail_version.h *** /var/tmp/postfix-2.2.10/src/global/mail_version.h Wed Apr 5 16:40:28 2006 --- ./src/global/mail_version.h Mon Jul 24 16:17:03 2006 *************** *** 20,27 **** * Patches change the patchlevel and the release date. Snapshots change the * release date only. */ ! #define MAIL_RELEASE_DATE "20060405" ! #define MAIL_VERSION_NUMBER "2.2.10" #define VAR_MAIL_VERSION "mail_version" #ifdef SNAPSHOT --- 20,27 ---- * Patches change the patchlevel and the release date. Snapshots change the * release date only. */ ! #define MAIL_RELEASE_DATE "20060724" ! #define MAIL_VERSION_NUMBER "2.2.11" #define VAR_MAIL_VERSION "mail_version" #ifdef SNAPSHOT diff -cr /var/tmp/postfix-2.2.10/HISTORY ./HISTORY *** /var/tmp/postfix-2.2.10/HISTORY Wed Apr 5 15:15:03 2006 --- ./HISTORY Mon Jul 24 16:20:23 2006 *************** *** 10920,10922 **** --- 10920,11014 ---- sick that you would have more serious problems than a file descriptor leak. Found by Coverity. Files: local/maildir.c, virtual/maildir.c. + + 20060411 + + Bugfix: the SMTP server logged no warning when for some + reason the TLS engine was unavailable in wrappermode. Victor + Duchovni. File: smtpd/smtpd.c. + + 20060430 + + Bugfix: dangling pointer in a function that has no caller. + Found by Coverity. File: tls/tls_prng_exch.c. + + Bugfix: the workaround for CA-2003-07 (Sendmail) did not + null terminate the address before logging a warning. Reported + by Kris Kennaway. File: global/tok822_parse.c. + + 20060516 + + Portability: __float80 alignment, by Albert Chin. File: + util/sys_defs.h. + + 20060524 + + Cleanup: send ETRN command parameter when using check_policy + in the context of an ETRN command. Joshua Goodall. File: + smtpd/smtpd_check.c. + + 20060604 + + Bugfix: the HOLD feature in access or header/body_checks + tables didn't properly report subdirectory create errors + (which don't happen because the hold queue isn't hashed by + default). Found with the BEAM code scanner. File: + global/hold_message.c. + + Cleanup: minor fluff found with the BEAM source code analyzer. + File: util/safe_open.c. + + 20060611 + + Security: the PostgreSQL client was updated after major + database API changes in response to PostgreSQL security + issues. This breaks support for PGSQL versions prior to + 8.1.4, 8.0.8, 7.4.13, and 7.3.15. Support for these requires + major code changes which are not possible in the time that + is left for the Postfix 2.3 stable release. + + Specific PostgreSQL client changes: use connection-aware + quoting, and more robust PQexec() result handling. Previous + versions of the dict_pgsql driver didn't check the status + of the result pointer, and certain exceptional events can + be mis-interpreted as an empty result set. Fixes by Leandro + Santi. File: global/dict_pgsql.c. + + 20060626 + + Workaround: disable SMTP connection cache lookup by server + IP address when the tls_per_site policy table is enabled. + Different server names may resolve to the same IP address, + and we don't want to use the wrong TLS policy. File: + smtp/smtp_reuse.c. + + 20060706 + + Workaround: disable SMTP connection cache lookup by server + IP address when the smtp_sasl_password_maps password feature + is enabled. Different server names may resolve to the same + IP address, and we don't want to use the wrong SASL + credentials. File: smtp/smtp_reuse.c. + + Bugfix: don't reuse a plaintext connection when the TLS + policy requires encryption. This can happen because we have + to search the connection cache before we know the + server-dependent TLS policy. It does not eliminate the + problem that we may still be using the wrong policy because + the cached server name was obtained in an insecure manner. + + 20060707 + + Robustness: the SMTPD policy client now encodes the + ccert_subject and ccert_issuer attributes as xtext. Some + characters are replaced by +XX, where XX is the two-digit + hexadecimal code for the character value. File: + smtpd/smtpd_check.c. + + 20060716 + + Bugfix: the Postfix SMTP client enforced Mandatory TLS only + when talking to an ESMTP server; enforcement did not happen + if Postfix could somehow be forced to send HELO instead of + EHLO. Victor Duchovni. File: src/smtp/smtp_proto.c. + diff -cr /var/tmp/postfix-2.2.10/README_FILES/PGSQL_README ./README_FILES/PGSQL_README *** /var/tmp/postfix-2.2.10/README_FILES/PGSQL_README Tue Mar 8 14:01:13 2005 --- ./README_FILES/PGSQL_README Sun Jun 11 12:12:02 2006 *************** *** 102,105 **** --- 102,108 ---- * Liviu Daia with further refinements from Jose Luis Tallon and Victor Duchovni developed the common query, result_format, domain and expansion_limit interface for LDAP, MySQL and PosgreSQL. + * Leandro Santi updated the PostgreSQL client to reflect PostgreSQL security + issues with respect to quoting which resulted in major database API + changes, and made PQexec() handling more robust. diff -cr /var/tmp/postfix-2.2.10/README_FILES/SMTPD_POLICY_README ./README_FILES/SMTPD_POLICY_README *** /var/tmp/postfix-2.2.10/README_FILES/SMTPD_POLICY_README Tue Jul 5 20:08:40 2005 --- ./README_FILES/SMTPD_POLICY_README Sat Jul 22 20:15:24 2006 *************** *** 53,61 **** sasl_username=you sasl_sender= ccert_subject=solaris9.porcupine.org ! ccert_issuer=Wietse Venema ccert_fingerprint=C2:9D:F4:87:71:73:73:D9:18:E7:C2:F3:C1:DA:6E:04 size=12345 [empty line] Notes: --- 53,62 ---- sasl_username=you sasl_sender= ccert_subject=solaris9.porcupine.org ! ccert_issuer=Wietse+20Venema ccert_fingerprint=C2:9D:F4:87:71:73:73:D9:18:E7:C2:F3:C1:DA:6E:04 size=12345 + etrn_domain= [empty line] Notes: *************** *** 90,96 **** how the client was authenticated via SASL. * The "ccert_*" attributes (Postfix 2.2 and later) specify information about ! how the client was authenticated via TLS. The following is specific to SMTPD delegated policy requests: --- 91,103 ---- how the client was authenticated via SASL. * The "ccert_*" attributes (Postfix 2.2 and later) specify information about ! how the client was authenticated via TLS. As of Postfix 2.2.11 these ! attribute values are encoded as xtext: some characters are represented by ! +XX, where XX is the two-digit hecadecimal representation of the character ! value. ! ! * The "etrn_domain" attribute is defined only in the context of the ETRN ! command, and specifies the ETRN command parameter. The following is specific to SMTPD delegated policy requests: diff -cr /var/tmp/postfix-2.2.10/RELEASE_NOTES ./RELEASE_NOTES *** /var/tmp/postfix-2.2.10/RELEASE_NOTES Wed Mar 9 14:00:39 2005 --- ./RELEASE_NOTES Fri Jul 7 15:38:07 2006 *************** *** 11,16 **** --- 11,30 ---- The mail_release_date configuration parameter (format: yyyymmdd) specifies the release date of a stable release or snapshot release. + Incompatible changes with Postfix version 2.2.11 + ------------------------------------------------ + + The SMTPD policy client now encodes the ccert_subject and ccert_issuer + attributes as xtext. Some characters are represented by +XX, where + XX is the two-digit hecadecimal representation of the character + value. + + The PostgreSQL client was updated after major database API changes + in response to PostgreSQL security issues. This breaks support for + PGSQL versions prior to 8.1.4, 8.0.8, 7.4.13, and 7.3.15. Support + for these requires major code changes which are not possible in a + stable release. + Main changes with Postfix version 2.2 ------------------------------------- diff -cr /var/tmp/postfix-2.2.10/html/PGSQL_README.html ./html/PGSQL_README.html *** /var/tmp/postfix-2.2.10/html/PGSQL_README.html Tue Mar 8 14:01:12 2005 --- ./html/PGSQL_README.html Sun Jun 11 12:12:02 2006 *************** *** 139,144 **** --- 139,148 ---- Victor Duchovni developed the common query, result_format, domain and expansion_limit interface for LDAP, MySQL and PosgreSQL. +