From dec262c51fd4b4604eeef7211e5eb0b02da88e57 Mon Sep 17 00:00:00 2001 From: Wietse Venema Date: Wed, 1 Oct 2014 00:00:00 -0500 Subject: [PATCH] postfix-2.12-20141001 --- postfix/HISTORY | 27 ++++- postfix/README_FILES/MILTER_README | 4 +- postfix/README_FILES/SMTPD_ACCESS_README | 2 +- postfix/README_FILES/SMTPD_POLICY_README | 7 +- postfix/README_FILES/SMTPUTF8_README | 16 ++- postfix/RELEASE_NOTES | 110 +++++++++++++++--- postfix/WISHLIST | 7 ++ postfix/conf/main.cf | 19 +++ postfix/conf/master.cf | 2 +- postfix/html/MILTER_README.html | 4 +- postfix/html/SMTPD_ACCESS_README.html | 2 +- postfix/html/SMTPD_POLICY_README.html | 7 +- postfix/html/SMTPUTF8_README.html | 13 ++- postfix/html/lmtp.8.html | 2 +- postfix/html/master.5.html | 2 +- postfix/html/postconf.5.html | 31 ++++- postfix/html/smtp.8.html | 2 +- postfix/html/smtpd.8.html | 2 +- postfix/html/trivial-rewrite.8.html | 2 +- postfix/man/man5/master.5 | 2 +- postfix/man/man5/postconf.5 | 24 +++- postfix/man/man8/smtp.8 | 2 +- postfix/man/man8/smtpd.8 | 2 +- postfix/man/man8/trivial-rewrite.8 | 2 +- postfix/mantools/postlink | 4 + postfix/proto/MILTER_README.html | 4 +- postfix/proto/SMTPD_ACCESS_README.html | 2 +- postfix/proto/SMTPD_POLICY_README.html | 7 +- postfix/proto/SMTPUTF8_README.html | 13 ++- postfix/proto/master | 2 +- postfix/proto/postconf.proto | 27 ++++- postfix/src/global/mail_params.c | 68 ++++++++++- postfix/src/global/mail_params.h | 16 ++- postfix/src/global/mail_version.h | 2 +- postfix/src/master/master_ent.c | 6 +- postfix/src/postfix/postfix.c | 14 +++ postfix/src/smtp/smtp.c | 2 +- postfix/src/smtpd/smtpd.c | 32 +++-- postfix/src/trivial-rewrite/rewrite.c | 7 ++ postfix/src/trivial-rewrite/trivial-rewrite.c | 8 +- postfix/src/util/dict_union.c | 1 - postfix/src/util/mac_expand.c | 73 +++++++++--- postfix/src/util/mac_expand.in | 22 ++++ postfix/src/util/mac_expand.ref | 53 ++++++++- 44 files changed, 552 insertions(+), 104 deletions(-) diff --git a/postfix/HISTORY b/postfix/HISTORY index 92770b137..95b6d9fda 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -10766,7 +10766,7 @@ Apologies for any names omitted. As of 20050525, DSN support does not involve new queue file record types, so you can switch back to older Postfix versions. Older non-production releases did introduce queue - file incompatibilty. + file incompatibility. DSN support is selected via the SMTP port by extra parameters to the MAIL FROM and RCPT TO commands, and with the Postfix @@ -20521,3 +20521,28 @@ Apologies for any names omitted. MTA" with "preferred MTA". The SMTP client was changed years ago to try alternate MXes after a 4XX SMTP server response. File: proto/ADDRES_VERIFY_README.html. + +20141001 + + Safety: backwards-compatibility safety net that forces Postfix + to run with backwards-compatible default settings after an + upgrade to a newer Postfix version. Postfix logs all uses + of those backwards-compatible default settings so that the + system administator can determine whether or not some + backwards-compatible default settings need to be made + permanent in main.cf or master.cf. All this is controlled + with a new compatibility_level parameter, default value 0. + Files: global/mail_params.[hc], trivial-rewrite/rewrite.c, + master/master_ent.c, smtpd/smtpd.c, postfix/postfix.c. + + New defaults for master.cf chroot (n), append_dot_mydomain + (no) and smtputf8_enable (yes). File: global/mail_params.h, + global/mail_params.c, smtp/smtp.c (manpage), smtpd/smtpd.c + (manpage), trivial-rewrite/trivial-rewrite.c. + + Simple relational expression evaluator so that main.cf + defaults can be made dependent on comparisons with the + compatibility_level parameter value. File: util/mac_expand.c. + + Bugfix: do not reset the mail transaction after receiving + a non-ASCII recipient. File: smtpd/smtpd.c. diff --git a/postfix/README_FILES/MILTER_README b/postfix/README_FILES/MILTER_README index b1fda465d..1e2216af2 100644 --- a/postfix/README_FILES/MILTER_README +++ b/postfix/README_FILES/MILTER_README @@ -354,8 +354,8 @@ Instead of a server endpoint, we now have a list enclosed in {}. Inside the list, syntax is similar to what we already know from main.cf: items separated by space or comma. There is one difference: yyoouu mmuusstt eenncclloossee aa -sseettttiinngg iinn ppaarreenntthheesseess,, aass iinn ""{{ nnaammee == vvaalluuee }}"",, iiff yyoouu wwaanntt ttoo hhaavvee ssppaaccee -wwiitthhiinn aa vvaalluuee oorr aarroouunndd ""=="". +sseettttiinngg iinn ppaarreenntthheesseess,, aass iinn ""{{ nnaammee == vvaalluuee }}"",, iiff yyoouu wwaanntt ttoo hhaavvee ssppaaccee oorr +ccoommmmaa wwiitthhiinn aa vvaalluuee oorr aarroouunndd ""=="". SSeennddmmaaiill mmaaccrroo eemmuullaattiioonn diff --git a/postfix/README_FILES/SMTPD_ACCESS_README b/postfix/README_FILES/SMTPD_ACCESS_README index 4a93df7e1..2e7a92d34 100644 --- a/postfix/README_FILES/SMTPD_ACCESS_README +++ b/postfix/README_FILES/SMTPD_ACCESS_README @@ -157,7 +157,7 @@ Examples of simple restriction lists are: smtpd_end_of_data_restrictions = check_policy_service unix:private/policy Each restriction list is evaluated from left to right until some restriction -produces a result of PERMIT, REJECT or DEFER (try again later). The end of the +produces a result of PERMIT, REJECT or DEFER (try again later). The end of each list is equivalent to a PERMIT result. By placing a PERMIT restriction before a REJECT restriction you can make exceptions for specific clients or users. This is called whitelisting; the fourth example above allows mail from local diff --git a/postfix/README_FILES/SMTPD_POLICY_README b/postfix/README_FILES/SMTPD_POLICY_README index 4b0e238ec..d2b02e016 100644 --- a/postfix/README_FILES/SMTPD_POLICY_README +++ b/postfix/README_FILES/SMTPD_POLICY_README @@ -315,9 +315,10 @@ Instead of a server endpoint, we now have a list enclosed in {}. Inside the list, syntax is similar to what we already know from main.cf: items separated by space or comma. There is one difference: yyoouu mmuusstt eenncclloossee aa -sseettttiinngg iinn ppaarreenntthheesseess,, aass iinn ""{{ nnaammee == vvaalluuee }}"",, iiff yyoouu wwaanntt ttoo hhaavvee ssppaaccee -wwiitthhiinn aa vvaalluuee oorr aarroouunndd ""=="". This comes in handy when different policy servers -require different default actions with different SMTP status codes or text: +sseettttiinngg iinn ppaarreenntthheesseess,, aass iinn ""{{ nnaammee == vvaalluuee }}"",, iiff yyoouu wwaanntt ttoo hhaavvee ssppaaccee oorr +ccoommmmaa wwiitthhiinn aa vvaalluuee oorr aarroouunndd ""=="". This comes in handy when different policy +servers require different default actions with different SMTP status codes or +text: 1 /etc/postfix/main.cf: 2 smtpd_recipient_restrictions = diff --git a/postfix/README_FILES/SMTPUTF8_README b/postfix/README_FILES/SMTPUTF8_README index 26d4d3f73..3d0d745a0 100644 --- a/postfix/README_FILES/SMTPUTF8_README +++ b/postfix/README_FILES/SMTPUTF8_README @@ -22,10 +22,15 @@ Topics covered in this document: EEnnaabblliinngg PPoossttffiixx SSMMTTPPUUTTFF88 ssuuppppoorrtt -Before turning on SMTPUTF8 support in Postfix, you need to verify that the rest -of your email infrastructure can handle UTF-8 email addresses and message -header values, including SMTPUTF8 protocol support in SMTP-based content -filters (Amavisd), LMTP servers (Dovecot), and down-stream SMTP servers. +There is more to SMTPUTF8 than just Postfix itself. The rest of your email +infrastructure also needs to be able to handle UTF-8 email addresses and +message header values. This includes SMTPUTF8 protocol support in SMTP-based +content filters (Amavisd), LMTP servers (Dovecot), and down-stream SMTP +servers. + +Postfix SMTPUTF8 support is enabled by default, but it may be disabled as part +of a backwards-compatibility safety net (see the Postfix 2.12 RELEASE_NOTES +file). SMTPUTF8 support is enabled by setting the smtputf8_enable parameter in main.cf: @@ -33,7 +38,8 @@ main.cf: # ppoossttccoonnff ""ssmmttppuuttff88__eennaabbllee == yyeess"" # ppoossttffiixx rreellooaadd -With SMTPUTF8 support enabled, Postfix changes behavior as follows: +With SMTPUTF8 support enabled, Postfix changes behavior with respect to earlier +Postfix releases: * UTF-8 is permitted in the myorigin parameter value. However, the myhostname and mydomain parameters must specify ASCII-only domain names. This diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index bd1814121..8392b4ff6 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -19,6 +19,23 @@ before proceeding. Notes for distribution maintainers ---------------------------------- +* New backwards-compatibility safety net. + +Several Postfix default settings have changed with Postfix 2.12. +To avoid massive breakage, Postfix comes with a safety net that +forces Postfix to keep running with backwards-compatible main.cf +and master.cf default settings. + +With NEW Postfix installs, you should install a main.cf file with +the setting "compatibility_level = 1". See the stock main.cf file +in the conf subdirectory. + +With existing Postfix UPGRADES, the main.cf compatibility_level +setting (if any) MUST be left alone, to enable the backwards-compatibility +safety net as discussed below. + +* New Postfix build system. + The Postfix build/install procedure has changed to support Postfix shared libraries and database plugins. @@ -41,6 +58,69 @@ Maintainers may also benefit from the makedefs documentation (mantools/srctoman - makedefs | nroff -man | less) with information about build options that are not described in the INSTALL instructions. +Major changes with snapshot 20141001 +==================================== + +A new backwards-compatibility safety net forces Postfix to keep +running with backwards-compatible main.cf and master.cf default +settings after an upgrade to a newer Postfix version. + +The following presents the messages that the backwards-compatibility +safety net will log, what the messages mean, and what action the +system adminstrator is expected to take. + +1) postfix/master[27664]: /etc/postfix/master.cf: line 72: using + legacy default setting chroot=y + + chroot=n is the new default, but that may not always be disirable. + Postfix continues to use the backwards-compatible default, + chroot=y, until the system administrator has determined whether + or not the backwards-compatible chroot=y setting needs to be + made permanent in master.cf. + +2) postfix/trivial-rewrite[25835]: using legacy default setting + append_dot_mydomain=yes to rewrite "foo" to "foo.example.com" + + append_dot_mydomain=no is the new default, but that change may + affect email from ancient clients that cannot be updated. Postfix + continues to use the backwards-compatible default, + append_dot_mydomain=yes, until the system administrator has + determined whether or not the backwards-compatible + append_dot_mydomain=yes setting needs to be made permanent in + main.cf. + +3) postfix/smtpd[27560]: using legacy default setting smtputf8_enable=no + to accept non-ASCII sender address "??@example.org" from + localhost[127.0.0.1] + +4) postfix/smtpd[27560]: using legacy default setting smtputf8_enable=no + to accept non-ASCII recipient address "??@example.com" from + localhost[127.0.0.1] + + smtputf8_enable=yes is the new default, but that would break + existing email streams with non-ASCII localparts. Postfix continues + to use the backwards-compatible default, smtputf8_enable=no, + until the system administrator has determined whether or not the + backwards-compatible smtputf8_enable=no setting needs to be made + permanent in main.cf. + +It may take several weeks until all dependencies on backwards-compatible +default settings are identified. After the review is complete, and +no more backwards-compatible settings need to be made permanent. +the administrator should accept the remaining Postfix built-in +default settings by updating the compatibility_level setting in +main.cf. + +For the changes discussed above, the administrator should set: + +/etc/postfix/main.cf: + compatibility_level = 1 + +This will stop all the warning messages shown above. + +Future incompatible changes will require setting "compatibility_level += 2", and so on. + Major changes with snapshot 20140928 ==================================== @@ -53,7 +133,7 @@ in the SMTPD_POLICY_README document. Here is an example that uses both old and new syntax: smtpd_milters = { inet:127.0.0.1:port1, default_action=accept, ... }, - inet:127.0.0.1:port2, ... + inet:127.0.0.1:port2, ... The per-milter settings are specified as attribute=value pairs separated by comma or space; specify { name = value } to allow @@ -143,22 +223,22 @@ This logging will often be enough to diagnose a problem without verbose logging or network sniffer. Normal session, no TLS: - disconnect from name[addr] ehlo=1 mail=1 rcpt=1 data=1 quit=1 + disconnect from name[addr] ehlo=1 mail=1 rcpt=1 data=1 quit=1 Normal session. with TLS: - disconnect from name[addr] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 + disconnect from name[addr] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 All recipients rejected, no ESMTP command pipelining: - disconnect from name[addr] ehlo=1 mail=1 rcpt=0/1 quit=1 + disconnect from name[addr] ehlo=1 mail=1 rcpt=0/1 quit=1 All recipients rejected, with ESMTP command pipelining: - disconnect from name[addr] ehlo=1 mail=1 rcpt=0/1 data=0/1 rset=1 quit=1 + disconnect from name[addr] ehlo=1 mail=1 rcpt=0/1 data=0/1 rset=1 quit=1 Password guessing bot, hangs up without QUIT: - disconnect from name[addr] ehlo=1 auth=0/1 + disconnect from name[addr] ehlo=1 auth=0/1 Mis-configured client trying to use TLS wrappermode on port 587: - disconnect from name[addr] unknown=0/1 + disconnect from name[addr] unknown=0/1 Logfile analyzers can trigger on the presence of "/". It indicates that Postfix rejected at least one command. @@ -252,10 +332,10 @@ used to implement load balancing, for example: /etc/postfix/main.cf: transport_maps = - # Deliver my own domain as usual. - hash:/etc/postfix/transport - # Deliver other domains via randomly-selected relayhosts - randmap:!smtp:smtp0.example.com!smtp:smtp1.example.com + # Deliver my own domain as usual. + hash:/etc/postfix/transport + # Deliver other domains via randomly-selected relayhosts + randmap:!smtp:smtp0.example.com!smtp:smtp1.example.com A variant of this can randomly select SMTP clients with different smtp_bind_address settings. @@ -280,12 +360,12 @@ a sequence of tables. For example, the following prevents SMTP mail to system accounts that have "nologin" as their login shell: /etc/postfix/main.cf: - local_recipient_maps = - pipemap:!unix:passwd.byname!pcre:/etc/postfix/no-nologin.pcre - alias_maps + local_recipient_maps = + pipemap:!unix:passwd.byname!pcre:/etc/postfix/no-nologin.pcre + alias_maps /etc/postfix/no-nologin.pcre: - !/nologin/ whatever + !/nologin/ whatever The first ASCII character after "pipemap:" will be used as the separator between the lookup tables that follow (do not use space, diff --git a/postfix/WISHLIST b/postfix/WISHLIST index 87fbb5992..80637fd4b 100644 --- a/postfix/WISHLIST +++ b/postfix/WISHLIST @@ -6,8 +6,15 @@ Wish list: Remove this file from the stable release. + Consolidate import_env and export_env parsing code and + add support for { name = value with whitespace }. + Things to do after the stable release: + use "static const char myname[] ..." + + Add milter_mumble_macros to the list of per-macro features. + The pickup daemon logs warnings only when the cleanup daemon dit not provide a "reason" attribute. Is this logic right? diff --git a/postfix/conf/main.cf b/postfix/conf/main.cf index dc58a1d85..82cb1b6a4 100644 --- a/postfix/conf/main.cf +++ b/postfix/conf/main.cf @@ -10,6 +10,25 @@ # For best results, change no more than 2-3 parameters at a time, # and test if Postfix still works after every change. +# COMPATIBILITY +# +# The compatibility_level determines what default settings Postfix +# will use for main.cf and master.cf settings. These defaults will +# change over time. +# +# To avoid breaking things, Postfix will use backwards-compatible +# default settings and log where it uses those old backwards-compatible +# default settings, until the system administrator has determined +# if any backwards-compatible default settings need to be made +# permanent in main.cf or master.cf. +# +# When this review is complete, update the compatibility_level setting +# below as recommended in the RELEASE_NOTES file. +# +# The level below is what should be used with new (not upgrade) installs. +# +compatibility_level = 1 + # SOFT BOUNCE # # The soft_bounce parameter provides a limited safety net for diff --git a/postfix/conf/master.cf b/postfix/conf/master.cf index 51a339834..1eda7b501 100644 --- a/postfix/conf/master.cf +++ b/postfix/conf/master.cf @@ -7,7 +7,7 @@ # # ========================================================================== # service type private unpriv chroot wakeup maxproc command + args -# (yes) (yes) (yes) (never) (100) +# (yes) (yes) (no) (never) (100) # ========================================================================== smtp inet n - n - - smtpd #smtp inet n - n - 1 postscreen diff --git a/postfix/html/MILTER_README.html b/postfix/html/MILTER_README.html index f424f13e4..dcb5defeb 100644 --- a/postfix/html/MILTER_README.html +++ b/postfix/html/MILTER_README.html @@ -583,8 +583,8 @@ have the same name as those parameters, without the "milter_" prefix.

Inside the list, syntax is similar to what we already know from main.cf: items separated by space or comma. There is one difference: you must enclose a setting in parentheses, as in "{ name = value -}", if you want to have space within a value or around "=". -

+}", if you want to have space or comma within a value or around +"=".

Sendmail macro emulation

diff --git a/postfix/html/SMTPD_ACCESS_README.html b/postfix/html/SMTPD_ACCESS_README.html index 660060900..411440c7a 100644 --- a/postfix/html/SMTPD_ACCESS_README.html +++ b/postfix/html/SMTPD_ACCESS_README.html @@ -215,7 +215,7 @@ described in the postconf(5) manual page.

Each restriction list is evaluated from left to right until some restriction produces a result of PERMIT, REJECT or DEFER (try -again later). The end of the list is equivalent to a PERMIT result. +again later). The end of each list is equivalent to a PERMIT result. By placing a PERMIT restriction before a REJECT restriction you can make exceptions for specific clients or users. This is called whitelisting; the fourth example above allows mail from local diff --git a/postfix/html/SMTPD_POLICY_README.html b/postfix/html/SMTPD_POLICY_README.html index a783310f6..14f9fa030 100644 --- a/postfix/html/SMTPD_POLICY_README.html +++ b/postfix/html/SMTPD_POLICY_README.html @@ -425,9 +425,10 @@ and have the same name as those parameters, without the

Inside the list, syntax is similar to what we already know from main.cf: items separated by space or comma. There is one difference: you must enclose a setting in parentheses, as in "{ name = value -}", if you want to have space within a value or around "=". -This comes in handy when different policy servers require different -default actions with different SMTP status codes or text:

+}", if you want to have space or comma within a value or around +"=". This comes in handy when different policy servers require +different default actions with different SMTP status codes or text: +

diff --git a/postfix/html/SMTPUTF8_README.html b/postfix/html/SMTPUTF8_README.html
index 9d26c6c72..c2f7d67b9 100644
--- a/postfix/html/SMTPUTF8_README.html
+++ b/postfix/html/SMTPUTF8_README.html
@@ -50,12 +50,16 @@ header values. 

Enabling Postfix SMTPUTF8 support

-

Before turning on SMTPUTF8 support in Postfix, you need to -verify that the rest of your email infrastructure can handle UTF-8 -email addresses and message header values, including SMTPUTF8 +

There is more to SMTPUTF8 than just Postfix itself. The rest +of your email infrastructure also needs to be able to handle UTF-8 +email addresses and message header values. This includes SMTPUTF8 protocol support in SMTP-based content filters (Amavisd), LMTP servers (Dovecot), and down-stream SMTP servers.

+

Postfix SMTPUTF8 support is enabled by default, but it may be +disabled as part of a backwards-compatibility safety net (see the +Postfix 2.12 RELEASE_NOTES file).

+

SMTPUTF8 support is enabled by setting the smtputf8_enable parameter in main.cf:

@@ -66,7 +70,8 @@ parameter in main.cf:

-

With SMTPUTF8 support enabled, Postfix changes behavior as follows:

+

With SMTPUTF8 support enabled, Postfix changes behavior with +respect to earlier Postfix releases: