diff -Nru postfix-3.2.5/conf/aliases postfix-3.3.0/conf/aliases --- postfix-3.2.5/conf/aliases 2016-02-14 01:39:26.000000000 +0000 +++ postfix-3.3.0/conf/aliases 2017-12-10 01:07:47.000000000 +0000 @@ -91,13 +91,15 @@ # lowercase, in order to make database lookups case insensi- # tive. # -# In addition, when an alias exists for owner-name, delivery -# diagnostics are directed to that address, instead of to -# the originator of the message. This is typically used to -# direct delivery errors to the maintainer of a mailing -# list, who is in a better position to deal with mailing -# list delivery problems than the originator of the undeliv- -# ered mail. +# In addition, when an alias exists for owner-name, this +# will override the envelope sender address, so that deliv- +# ery diagnostics are directed to owner-name, instead of the +# originator of the message (for details, see +# owner_request_special, expand_owner_alias and +# reset_owner_alias). This is typically used to direct +# delivery errors to the maintainer of a mailing list, who +# is in a better position to deal with mailing list delivery +# problems than the originator of the undelivered mail. # # The value contains one or more of the following: # @@ -184,51 +186,51 @@ # The text below provides only a parameter summary. See # postconf(5) for more details including examples. # -# alias_database -# List of alias databases that are updated by the -# newaliases(1) command. -# -# alias_maps -# List of alias databases queried by the local(8) -# delivery agent. -# -# allow_mail_to_commands -# Restrict the usage of mail delivery to external -# command. -# -# allow_mail_to_files -# Restrict the usage of mail delivery to external -# file. -# -# expand_owner_alias -# When delivering to an alias that has an owner- com- -# panion alias, set the envelope sender address to -# the right-hand side of the owner alias, instead -# using of the left-hand side address. -# -# propagate_unmatched_extensions -# A list of address rewriting or forwarding mecha- -# nisms that propagate an address extension from the -# original address to the result. Specify zero or -# more of canonical, virtual, alias, forward, -# include, or generic. -# -# owner_request_special -# Give special treatment to owner-listname and list- -# name-request addresses. -# -# recipient_delimiter -# Delimiter that separates recipients from address -# extensions. +# alias_database (see 'postconf -d' output) +# The alias databases for local(8) delivery that are +# updated with "newaliases" or with "sendmail -bi". +# +# alias_maps (see 'postconf -d' output) +# The alias databases that are used for local(8) +# delivery. +# +# allow_mail_to_commands (alias, forward) +# Restrict local(8) mail delivery to external com- +# mands. +# +# allow_mail_to_files (alias, forward) +# Restrict local(8) mail delivery to external files. +# +# expand_owner_alias (no) +# When delivering to an alias "aliasname" that has an +# "owner-aliasname" companion alias, set the envelope +# sender address to the expansion of the +# "owner-aliasname" alias. +# +# propagate_unmatched_extensions (canonical, virtual) +# What address lookup tables copy an address exten- +# sion from the lookup key to the lookup result. +# +# owner_request_special (yes) +# Enable special treatment for owner-listname entries +# in the aliases(5) file, and don't split owner-list- +# name and listname-request address localparts when +# the recipient_delimiter is set to "-". +# +# recipient_delimiter (empty) +# The set of characters that can separate a user name +# from its extension (example: user+foo), or a .for- +# ward file name from its extension (example: .for- +# ward+foo). # # Available in Postfix version 2.3 and later: # -# frozen_delivered_to -# Update the local(8) delivery agent's Delivered-To: -# address (see prepend_delivered_header) only once, -# at the start of a delivery; do not update the -# Delivered-To: address while expanding aliases or -# .forward files. +# frozen_delivered_to (yes) +# Update the local(8) delivery agent's idea of the +# Delivered-To: address (see prepend_deliv- +# ered_header) only once, at the start of a delivery +# attempt; do not update the Delivered-To: address +# while expanding aliases or .forward files. # # STANDARDS # RFC 822 (ARPA Internet Text Messages) @@ -240,12 +242,12 @@ # postconf(5), configuration parameters # # README FILES -# Use "postconf readme_directory" or "postconf html_direc- +# Use "postconf readme_directory" or "postconf html_direc- # tory" to locate this information. # DATABASE_README, Postfix lookup table overview # # LICENSE -# The Secure Mailer license must be distributed with this +# The Secure Mailer license must be distributed with this # software. # # AUTHOR(S) diff -Nru postfix-3.2.5/conf/master.cf postfix-3.3.0/conf/master.cf --- postfix-3.2.5/conf/master.cf 2016-12-03 15:49:54.000000000 +0000 +++ postfix-3.3.0/conf/master.cf 2018-01-14 17:09:26.000000000 +0000 @@ -53,6 +53,7 @@ proxywrite unix - - n - 1 proxymap smtp unix - - n - - smtp relay unix - - n - - smtp + -o syslog_name=postfix/$service_name # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 showq unix n - n - - showq error unix - - n - - error diff -Nru postfix-3.2.5/conf/postfix-script postfix-3.3.0/conf/postfix-script --- postfix-3.2.5/conf/postfix-script 2016-01-31 21:05:46.000000000 +0000 +++ postfix-3.3.0/conf/postfix-script 2017-12-27 22:30:27.000000000 +0000 @@ -23,6 +23,11 @@ # IBM T.J. Watson Research # P.O. Box 704 # Yorktown Heights, NY 10598, USA +# +# Wietse Venema +# Google, Inc. +# 111 8th Avenue +# New York, NY 10011, USA #-- # Avoid POSIX death due to SIGHUP when some parent process exits. @@ -117,7 +122,7 @@ echo "Stop postfix" ;; -start) +start|start-fg) $daemon_directory/master -t 2>/dev/null || { $FATAL the Postfix mail system is already running @@ -135,11 +140,28 @@ $daemon_directory/postfix-script check-warn fi $INFO starting the Postfix mail system - # NOTE: wait in foreground process to get the initialization status. - $daemon_directory/master -w || { - $FATAL "mail system startup failed" - exit 1 - } + case $1 in + start) + # NOTE: wait in foreground process to get the initialization status. + $daemon_directory/master -w || { + $FATAL "mail system startup failed" + exit 1 + } + ;; + start-fg) + # Foreground start-up is incompatible with multi-instance mode. + # We can't use "exec $daemon_directory/master" here: that would + # break process group management, and "postfix stop" would kill + # too many processes. + case $instances in + "") $daemon_directory/master + ;; + *) $FATAL "start-fg does not support multi_instance_directories" + exit 1 + ;; + esac + ;; + esac ;; drain) @@ -367,8 +389,7 @@ ;; *) - $ERROR "unknown command: '$1'" - $FATAL "usage: postfix start (or stop, reload, abort, flush, check, status, set-permissions, upgrade-configuration)" + $FATAL "unknown command: '$1'. Usage: postfix start (or stop, reload, abort, flush, check, status, set-permissions, upgrade-configuration)" exit 1 ;; diff -Nru postfix-3.2.5/conf/post-install postfix-3.3.0/conf/post-install --- postfix-3.2.5/conf/post-install 2015-12-28 00:00:45.000000000 +0000 +++ postfix-3.3.0/conf/post-install 2017-12-27 22:30:14.000000000 +0000 @@ -200,6 +200,11 @@ # IBM T.J. Watson Research # P.O. Box 704 # Yorktown Heights, NY 10598, USA +# +# Wietse Venema +# Google, Inc. +# 111 8th Avenue +# New York, NY 10011, USA #-- umask 022 diff -Nru postfix-3.2.5/debian/changelog postfix-3.3.0/debian/changelog --- postfix-3.2.5/debian/changelog 2018-02-05 23:27:06.000000000 +0000 +++ postfix-3.3.0/debian/changelog 2018-02-23 08:05:27.000000000 +0000 @@ -1,8 +1,19 @@ -postfix (3.2.5-1build1) bionic; urgency=high +postfix (3.3.0-1) unstable; urgency=medium - * No change rebuild against openssl1.1. + [Wietse Venema] - -- Dimitri John Ledkov Mon, 05 Feb 2018 23:27:06 +0000 + * 3.3.0 + + [Scott Kitterman] + + * Remove debian/patches/02_kfreebsd_support.diff - Obsolete + * Refresh patches + * Add debian/patches/tls_version.diff to enable all supported TLS versions. + Closes: #873334 + * Install examples alongside the other documentation in /usr/share/doc/ + postfix/ vice /usr/share/doc/postfix-doc/ + + -- Scott Kitterman Fri, 23 Feb 2018 03:05:27 -0500 postfix (3.2.5-1) unstable; urgency=medium diff -Nru postfix-3.2.5/debian/control postfix-3.3.0/debian/control --- postfix-3.2.5/debian/control 2018-02-05 23:27:06.000000000 +0000 +++ postfix-3.3.0/debian/control 2018-02-23 07:31:37.000000000 +0000 @@ -1,8 +1,7 @@ Source: postfix Section: mail Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: LaMont Jones +Maintainer: LaMont Jones Standards-Version: 4.1.3 Homepage: http://www.postfix.org Build-Depends: debhelper (>= 9.20160709), po-debconf (>= 0.5.0), groff-base, patch, lsb-release, libdb-dev (>=4.6.19), libldap2-dev (>=2.1), liblmdb-dev, libpcre3-dev, default-libmysqlclient-dev | libmysqlclient-dev, libssl-dev (>=0.9.7), libsasl2-dev, libpq-dev, libcdb-dev, dpkg-dev (>= 1.16.1~), libsqlite3-dev, html2text, libicu-dev diff -Nru postfix-3.2.5/debian/patches/02_kfreebsd_support.diff postfix-3.3.0/debian/patches/02_kfreebsd_support.diff --- postfix-3.2.5/debian/patches/02_kfreebsd_support.diff 2018-01-29 14:48:39.000000000 +0000 +++ postfix-3.3.0/debian/patches/02_kfreebsd_support.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ ---- a/makedefs -+++ b/makedefs -@@ -581,8 +581,8 @@ - : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"} - : ${PLUGIN_LD="${CC-gcc} -shared"} - ;; -- GNU.0*|GNU/kFreeBSD.[567]*) -- SYSTYPE=GNU0 -+ GNU.0*|GNU/kFreeBSD.*) -+ SYSTYPE=GNU0 - case "$CCARGS" in - *-DNO_DB*) ;; - *) if [ -f /usr/include/db.h ] diff -Nru postfix-3.2.5/debian/patches/03_ldap3_by_default.diff postfix-3.3.0/debian/patches/03_ldap3_by_default.diff --- postfix-3.2.5/debian/patches/03_ldap3_by_default.diff 2018-01-29 14:48:39.000000000 +0000 +++ postfix-3.3.0/debian/patches/03_ldap3_by_default.diff 2018-02-23 07:37:17.000000000 +0000 @@ -1,5 +1,7 @@ ---- a/src/global/dict_ldap.c -+++ b/src/global/dict_ldap.c +Index: postfix/src/global/dict_ldap.c +=================================================================== +--- postfix.orig/src/global/dict_ldap.c 2018-02-23 02:37:11.468712118 -0500 ++++ postfix/src/global/dict_ldap.c 2018-02-23 02:37:11.460712118 -0500 @@ -102,7 +102,7 @@ /* How to handle LDAP aliases. See ldap.h or ldap_open(3) man page. /* .IP version @@ -9,7 +11,7 @@ /* .IP "\fBsasl_mechs (empty)\fR" /* Specifies a space-separated list of LDAP SASL Mechanisms. /* .IP "\fBsasl_realm (empty)\fR" -@@ -1664,7 +1664,7 @@ +@@ -1669,7 +1669,7 @@ /* * Define LDAP Protocol Version. */ @@ -18,7 +20,7 @@ switch (dict_ldap->version) { case 2: dict_ldap->version = LDAP_VERSION2; -@@ -1673,9 +1673,9 @@ +@@ -1678,9 +1678,9 @@ dict_ldap->version = LDAP_VERSION3; break; default: @@ -30,8 +32,10 @@ } #if defined(LDAP_API_FEATURE_X_OPENLDAP) ---- a/man/man5/ldap_table.5 -+++ b/man/man5/ldap_table.5 +Index: postfix/man/man5/ldap_table.5 +=================================================================== +--- postfix.orig/man/man5/ldap_table.5 2018-02-23 02:37:11.468712118 -0500 ++++ postfix/man/man5/ldap_table.5 2018-02-23 02:37:11.464712118 -0500 @@ -501,7 +501,7 @@ .IP "\fBchase_referrals (default: 0)\fR" Sets (or clears) LDAP_OPT_REFERRALS (requires LDAP version diff -Nru postfix-3.2.5/debian/patches/06_debian_paths.diff postfix-3.3.0/debian/patches/06_debian_paths.diff --- postfix-3.2.5/debian/patches/06_debian_paths.diff 2018-01-29 14:48:39.000000000 +0000 +++ postfix-3.3.0/debian/patches/06_debian_paths.diff 2018-02-23 07:37:40.000000000 +0000 @@ -1,5 +1,7 @@ ---- a/conf/main.cf -+++ b/conf/main.cf +Index: postfix/conf/main.cf +=================================================================== +--- postfix.orig/conf/main.cf 2018-02-23 02:37:33.964713024 -0500 ++++ postfix/conf/main.cf 2018-02-23 02:37:33.960713023 -0500 @@ -47,7 +47,7 @@ # See the files in examples/chroot-setup for setting up Postfix chroot # environments on different UNIX systems. @@ -29,8 +31,10 @@ # The mailbox_transport specifies the optional transport in master.cf # to use after processing aliases and .forward files. This parameter ---- a/examples/smtpd-policy/greylist.pl -+++ b/examples/smtpd-policy/greylist.pl +Index: postfix/examples/smtpd-policy/greylist.pl +=================================================================== +--- postfix.orig/examples/smtpd-policy/greylist.pl 2018-02-23 02:37:33.964713024 -0500 ++++ postfix/examples/smtpd-policy/greylist.pl 2018-02-23 02:37:33.960713023 -0500 @@ -73,7 +73,7 @@ # In case of database corruption, this script saves the database as # $database_name.time(), so that the mail system does not get stuck. @@ -40,9 +44,11 @@ $greylist_delay=60; # ---- a/makedefs -+++ b/makedefs -@@ -482,11 +482,18 @@ +Index: postfix/makedefs +=================================================================== +--- postfix.orig/makedefs 2018-02-23 02:37:33.964713024 -0500 ++++ postfix/makedefs 2018-02-23 02:37:33.960713023 -0500 +@@ -485,11 +485,18 @@ exit 1 fi SYSLIBS="-ldb" @@ -62,7 +68,7 @@ do test -e $lib/lib$name.a -o -e $lib/lib$name.so && { SYSLIBS="$SYSLIBS -l$name" -@@ -561,11 +568,18 @@ +@@ -564,11 +571,18 @@ exit 1 fi SYSLIBS="-ldb" @@ -82,7 +88,7 @@ do test -e $lib/lib$name.a -o -e $lib/lib$name.so && { SYSLIBS="$SYSLIBS -l$name" -@@ -599,11 +613,18 @@ +@@ -602,11 +616,18 @@ exit 1 fi SYSLIBS="-ldb" diff -Nru postfix-3.2.5/debian/patches/09_quiet_startup.diff postfix-3.3.0/debian/patches/09_quiet_startup.diff --- postfix-3.2.5/debian/patches/09_quiet_startup.diff 2018-01-29 14:48:39.000000000 +0000 +++ postfix-3.3.0/debian/patches/09_quiet_startup.diff 2018-02-23 07:40:09.000000000 +0000 @@ -1,6 +1,8 @@ ---- a/conf/postfix-script -+++ b/conf/postfix-script -@@ -42,6 +42,13 @@ +Index: postfix/conf/postfix-script +=================================================================== +--- postfix.orig/conf/postfix-script 2018-02-23 02:38:03.024714193 -0500 ++++ postfix/conf/postfix-script 2018-02-23 02:39:54.812718693 -0500 +@@ -47,6 +47,13 @@ FATAL="$LOGGER -p fatal" PANIC="$LOGGER -p panic" @@ -14,28 +16,28 @@ umask 022 SHELL=/bin/sh -@@ -117,6 +124,20 @@ +@@ -122,6 +129,20 @@ echo "Stop postfix" ;; +quick-start) + -+ $daemon_directory/master -t 2>/dev/null || { -+ $FATAL the Postfix mail system is already running -+ exit 1 -+ } -+ $daemon_directory/postfix-script quick-check || { -+ $FATAL Postfix integrity check failed! -+ exit 1 -+ } -+ $INFO starting the Postfix mail system -+ $daemon_directory/master & -+ ;; ++ $daemon_directory/master -t 2>/dev/null || { ++ $FATAL the Postfix mail system is already running ++ exit 1 ++ } ++ $daemon_directory/postfix-script quick-check || { ++ $FATAL Postfix integrity check failed! ++ exit 1 ++ } ++ $INFO starting the Postfix mail system ++ $daemon_directory/master & ++ ;; + - start) + start|start-fg) $daemon_directory/master -t 2>/dev/null || { -@@ -162,7 +183,7 @@ +@@ -184,7 +205,7 @@ $daemon_directory/master -t 2>/dev/null && { $FATAL the Postfix mail system is not running @@ -44,7 +46,7 @@ } $INFO stopping the Postfix mail system kill `sed 1q pid/master.pid` -@@ -181,7 +202,7 @@ +@@ -203,7 +224,7 @@ $daemon_directory/master -t 2>/dev/null && { $FATAL the Postfix mail system is not running @@ -53,7 +55,7 @@ } $INFO aborting the Postfix mail system kill `sed 1q pid/master.pid` -@@ -225,12 +246,11 @@ +@@ -247,12 +268,11 @@ exit 0 ;; @@ -68,7 +70,7 @@ exit 1 } -@@ -240,6 +260,13 @@ +@@ -262,6 +282,13 @@ $FATAL no $config_directory/master.cf file found exit 1 } diff -Nru postfix-3.2.5/debian/patches/11_postmap_update.diff postfix-3.3.0/debian/patches/11_postmap_update.diff --- postfix-3.2.5/debian/patches/11_postmap_update.diff 2018-01-29 15:37:54.000000000 +0000 +++ postfix-3.3.0/debian/patches/11_postmap_update.diff 2018-02-23 07:40:25.000000000 +0000 @@ -1,7 +1,7 @@ Index: postfix/html/postmap.1.html =================================================================== ---- postfix.orig/html/postmap.1.html 2018-01-29 10:35:35.748509783 -0500 -+++ postfix/html/postmap.1.html 2018-01-29 10:35:35.740509783 -0500 +--- postfix.orig/html/postmap.1.html 2018-02-23 02:40:16.124719550 -0500 ++++ postfix/html/postmap.1.html 2018-02-23 02:40:16.112719550 -0500 @@ -10,7 +10,7 @@ postmap - Postfix lookup table management @@ -24,8 +24,8 @@ instead of the default configuration directory. Index: postfix/man/man1/postmap.1 =================================================================== ---- postfix.orig/man/man1/postmap.1 2018-01-29 10:35:35.748509783 -0500 -+++ postfix/man/man1/postmap.1 2018-01-29 10:35:35.744509783 -0500 +--- postfix.orig/man/man1/postmap.1 2018-02-23 02:40:16.124719550 -0500 ++++ postfix/man/man1/postmap.1 2018-02-23 02:40:16.116719550 -0500 @@ -9,7 +9,7 @@ .na .nf @@ -46,8 +46,8 @@ truncate an existing database. By default, \fBpostmap\fR(1) creates Index: postfix/src/postmap/postmap.c =================================================================== ---- postfix.orig/src/postmap/postmap.c 2018-01-29 10:35:35.748509783 -0500 -+++ postfix/src/postmap/postmap.c 2018-01-29 10:35:35.744509783 -0500 +--- postfix.orig/src/postmap/postmap.c 2018-02-23 02:40:16.124719550 -0500 ++++ postfix/src/postmap/postmap.c 2018-02-23 02:40:16.116719550 -0500 @@ -81,6 +81,8 @@ /* syntax checks anyway. /* .sp @@ -165,8 +165,8 @@ usage(argv[0]); Index: postfix/src/util/dict.h =================================================================== ---- postfix.orig/src/util/dict.h 2018-01-29 10:35:35.748509783 -0500 -+++ postfix/src/util/dict.h 2018-01-29 10:35:35.744509783 -0500 +--- postfix.orig/src/util/dict.h 2018-02-23 02:40:16.124719550 -0500 ++++ postfix/src/util/dict.h 2018-02-23 02:40:16.120719550 -0500 @@ -123,6 +123,7 @@ #define DICT_FLAG_NO_UNAUTH (1<<13) /* disallow unauthenticated data */ #define DICT_FLAG_FOLD_FIX (1<<14) /* case-fold key with fixed-case map */ @@ -177,9 +177,9 @@ #define DICT_FLAG_BULK_UPDATE (1<<17) /* optimize for bulk updates */ Index: postfix/src/util/dict_db.c =================================================================== ---- postfix.orig/src/util/dict_db.c 2018-01-29 10:35:35.748509783 -0500 -+++ postfix/src/util/dict_db.c 2018-01-29 10:37:49.544515168 -0500 -@@ -738,6 +738,12 @@ +--- postfix.orig/src/util/dict_db.c 2018-02-23 02:40:16.124719550 -0500 ++++ postfix/src/util/dict_db.c 2018-02-23 02:40:16.120719550 -0500 +@@ -743,6 +743,12 @@ if (type == DB_HASH && db->set_h_nelem(db, DICT_DB_NELM) != 0) msg_fatal("set DB hash element count %d: %m", DICT_DB_NELM); db_base_buf = vstring_alloc(100); diff -Nru postfix-3.2.5/debian/patches/12_add_bind_now_and_relro_to_pie.diff postfix-3.3.0/debian/patches/12_add_bind_now_and_relro_to_pie.diff --- postfix-3.2.5/debian/patches/12_add_bind_now_and_relro_to_pie.diff 2018-01-29 14:48:39.000000000 +0000 +++ postfix-3.3.0/debian/patches/12_add_bind_now_and_relro_to_pie.diff 2018-02-23 07:40:35.000000000 +0000 @@ -11,9 +11,11 @@ makedefs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---- a/makedefs -+++ b/makedefs -@@ -1197,7 +1197,7 @@ +Index: postfix/makedefs +=================================================================== +--- postfix.orig/makedefs 2018-02-23 02:40:29.952720107 -0500 ++++ postfix/makedefs 2018-02-23 02:40:29.948720107 -0500 +@@ -1200,7 +1200,7 @@ case " $CCARGS " in *" $CCARGS_PIE "*) CCARGS_PIE=;; esac diff -Nru postfix-3.2.5/debian/patches/40_chroot_by_default.diff postfix-3.3.0/debian/patches/40_chroot_by_default.diff --- postfix-3.2.5/debian/patches/40_chroot_by_default.diff 2018-01-29 14:48:39.000000000 +0000 +++ postfix-3.3.0/debian/patches/40_chroot_by_default.diff 2018-02-23 07:46:01.000000000 +0000 @@ -1,5 +1,7 @@ ---- a/conf/master.cf -+++ b/conf/master.cf +Index: postfix/conf/master.cf +=================================================================== +--- postfix.orig/conf/master.cf 2018-02-23 02:40:54.560721098 -0500 ++++ postfix/conf/master.cf 2018-02-23 02:45:56.964733269 -0500 @@ -9,12 +9,12 @@ # service type private unpriv chroot wakeup maxproc command + args # (yes) (yes) (no) (never) (100) @@ -28,7 +30,7 @@ # -o syslog_name=postfix/smtps # -o smtpd_tls_wrappermode=yes # -o smtpd_sasl_auth_enable=yes -@@ -37,32 +37,32 @@ +@@ -37,33 +37,33 @@ # -o smtpd_recipient_restrictions= # -o smtpd_relay_restrictions=permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATING @@ -60,6 +62,7 @@ -relay unix - - n - - smtp +smtp unix - - y - - smtp +relay unix - - y - - smtp + -o syslog_name=postfix/$service_name # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 -showq unix n - n - - showq -error unix - - n - - error @@ -80,7 +83,7 @@ # # ==================================================================== # Interfaces to non-Postfix software. Be sure to examine the manual -@@ -76,8 +76,8 @@ +@@ -77,8 +77,8 @@ # maildrop. See the Postfix MAILDROP_README file for details. # Also specify in main.cf: maildrop_destination_recipient_limit=1 # @@ -91,7 +94,7 @@ # # ==================================================================== # -@@ -99,7 +99,6 @@ +@@ -100,7 +100,6 @@ # user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user} # # ==================================================================== @@ -99,7 +102,7 @@ # Old example of delivery via Cyrus. # #old-cyrus unix - n n - - pipe -@@ -116,16 +115,13 @@ +@@ -117,16 +116,13 @@ # # Other external delivery methods. # diff -Nru postfix-3.2.5/debian/patches/70_postfix-check.diff postfix-3.3.0/debian/patches/70_postfix-check.diff --- postfix-3.2.5/debian/patches/70_postfix-check.diff 2018-01-29 14:48:39.000000000 +0000 +++ postfix-3.3.0/debian/patches/70_postfix-check.diff 2018-02-23 07:46:24.000000000 +0000 @@ -1,6 +1,8 @@ ---- a/conf/postfix-script -+++ b/conf/postfix-script -@@ -302,9 +302,14 @@ +Index: postfix/conf/postfix-script +=================================================================== +--- postfix.orig/conf/postfix-script 2018-02-23 02:46:14.972733994 -0500 ++++ postfix/conf/postfix-script 2018-02-23 02:46:14.968733994 -0500 +@@ -324,9 +324,14 @@ find $todo ! -user root \ -exec $WARN not owned by root: {} \; diff -Nru postfix-3.2.5/debian/patches/series postfix-3.3.0/debian/patches/series --- postfix-3.2.5/debian/patches/series 2018-01-29 15:38:18.000000000 +0000 +++ postfix-3.3.0/debian/patches/series 2018-02-23 07:58:20.000000000 +0000 @@ -1,4 +1,3 @@ -02_kfreebsd_support.diff 03_ldap3_by_default.diff 04_remove_gdbm_support.diff 05_debian_defaults.diff @@ -15,3 +14,4 @@ 41_rmail.diff 50_LANG.diff 70_postfix-check.diff +tls_version.diff diff -Nru postfix-3.2.5/debian/patches/tls_version.diff postfix-3.3.0/debian/patches/tls_version.diff --- postfix-3.2.5/debian/patches/tls_version.diff 1970-01-01 00:00:00.000000000 +0000 +++ postfix-3.3.0/debian/patches/tls_version.diff 2018-02-23 07:57:34.000000000 +0000 @@ -0,0 +1,28 @@ +Index: postfix/src/tls/tls_client.c +=================================================================== +--- postfix.orig/src/tls/tls_client.c 2017-01-01 17:22:13.000000000 -0500 ++++ postfix/src/tls/tls_client.c 2018-02-23 02:57:14.384760535 -0500 +@@ -375,6 +375,9 @@ + off |= tls_bug_bits(); + SSL_CTX_set_options(client_ctx, off); + ++ /* Enable all supported protocols */ ++ SSL_CTX_set_min_proto_version(client_ctx, 0); ++ + /* + * Set the call-back routine for verbose logging. + */ +Index: postfix/src/tls/tls_server.c +=================================================================== +--- postfix.orig/src/tls/tls_server.c 2017-01-01 17:22:13.000000000 -0500 ++++ postfix/src/tls/tls_server.c 2018-02-23 02:57:14.384760535 -0500 +@@ -517,6 +517,9 @@ + if (protomask != 0) + SSL_CTX_set_options(server_ctx, TLS_SSL_OP_PROTOMASK(protomask)); + ++ /* Enable all supported protocols */ ++ SSL_CTX_set_min_proto_version(server_ctx, 0); ++ + /* + * Some sites may want to give the client less rope. On the other hand, + * this could trigger inter-operability issues, the client should not diff -Nru postfix-3.2.5/debian/rules postfix-3.3.0/debian/rules --- postfix-3.2.5/debian/rules 2018-01-29 14:48:39.000000000 +0000 +++ postfix-3.3.0/debian/rules 2018-02-23 08:05:27.000000000 +0000 @@ -21,6 +21,7 @@ package=postfix base=debian/$(package) docpkg=${package}-doc +exampledir=${base}-doc/usr/share/doc/${package}-doc docdir=${base}-doc/usr/share/doc/$(package) chlogdir=${base}/usr/share/doc/$(package) sharedir=${base}/usr/share/postfix @@ -62,7 +63,7 @@ AUXLIBS += -lssl -lcrypto -lsasl2 -lpthread -DOCFILES=README_FILES/*_README README_FILES/OVERVIEW COMPATIBILITY TODO PORTING +DOCFILES=README_FILES/*_README README_FILES/OVERVIEW COMPATIBILITY PORTING TLSDOCFILES=${TLSSRC}/TLS_TODO ${TLSSRC}/TLS_ACKNOWLEDGEMENTS .PHONY: install install-doc binary binary-arch binary-indep clean @@ -83,7 +84,7 @@ shared=yes pie=yes dynamicmaps=yes \ daemon_directory=${CUR_DIR}/usr/lib/postfix/sbin \ shlibs_directory=${CUR_DIR}/usr/lib/postfix manpage_directory=/usr/share/man \ - sample_directory=/usr/share/doc/postfix-doc/examples readme_directory=/usr/share/doc/postfix \ + sample_directory=/usr/share/doc/postfix/examples readme_directory=/usr/share/doc/postfix \ html_directory=/usr/share/doc/postfix/html ${MAKE} LD_LIBRARY_PATH=$$(pwd)/lib:$${LD_LIBRARY_PATH} ${MAKE} manpages @@ -105,7 +106,7 @@ shared=yes pie=yes dynamicmaps=yes \ daemon_directory=${CUR_DIR}/usr/lib/postfix/sbin \ shlibs_directory=${CUR_DIR}/usr/lib/postfix manpage_directory=/usr/share/man \ - sample_directory=/usr/share/doc/postfix-doc/examples readme_directory=/usr/share/doc/postfix \ + sample_directory=/usr/share/doc/postfix/examples readme_directory=/usr/share/doc/postfix \ html_directory=/usr/share/doc/postfix/html ${MAKE} LD_LIBRARY_PATH=$$(pwd)/lib:$${LD_LIBRARY_PATH} ${MAKE} manpages @@ -120,6 +121,7 @@ dh_installexamples -p ${docpkg} examples/{qmail-local,smtpd-policy} dh_installexamples -p ${docpkg} -Xmain.cf -Xmaster.cf -Xfiles conf/[a-z]* dh_installexamples -p ${docpkg} conf/main.cf.default debian/mailqfmt.pl + mv ${exampledir}/examples ${docdir} install -m 0444 RELEASE_NOTES $(docdir)/RELEASE_NOTES install -m 0444 AAAREADME $(docdir)/README for file in */README; do \ diff -Nru postfix-3.2.5/HISTORY postfix-3.3.0/HISTORY --- postfix-3.2.5/HISTORY 2018-01-28 01:15:58.000000000 +0000 +++ postfix-3.3.0/HISTORY 2018-02-19 16:29:00.000000000 +0000 @@ -22940,16 +22940,21 @@ 20170218 Cleanup: typofixes from klemens. The only change in compiled - code is in one mysql error message that also appears in the - pgsql client. Files: about 50. + code is in one identical mysql error message that also + appears in the pgsql client. Files: about 50. 20170221 Compatibility fix (introduced: Postfix 3.1): some Milter - applications do not recognize macros sent as {name} when - macros have single-character names. Postfix now sends such - macros without {} as it has done historically. Viktor - Dukhovni. File: milter/milter.c. + applications do not recognize macros sent as {name} when macros + have single-character names. Postfix now sends such macros + without {} as it has done historically. Viktor Dukhovni. File: + milter/milter.c. + +20170228 + + Documentation: re-word scary warnings at the top of SASL_README + and TLS_README. 20170402 @@ -22963,7 +22968,31 @@ Safety net: append a null byte to vstring buffers, so that C-style string operations won't scribble past the end. File: - vstring.c. + vstring.[hc]. + +20170505 + + Workaround for a current problem where some destination + announces primarily IPv6 MX addresses, the smtp_address_limit + eliminates most or all IPv4 addresses, and the destination + is not reachable over IPv6. This workaround is enabled with + "smtp_balance_mx_inet_protocols = yes", which is the default. + Files: smtp/smtp.c, smtp/smtp_params.c, smtp/smtp_addr.c, + global/mail_params.h, proto/postconf.proto. + +20170506 + + A last-minute cosmetic fix had introduced a bug in + smtp/smtp_addr.c. + +20170512 + + Bugfix (introduced: Postfix 2.0): the MIME nesting level + counter was not initialized (i.e. left at the memory fill + pattern 0xffffffff which equals -1). This broke unit tests + with a different memory allocator. Changing the value to + zero would break backwards compatibility (reject mail that + was previously not rejected). Files: global/mime_state.c. 20170531 @@ -22972,14 +23001,24 @@ features ignored the parent_domain_matches_subdomains setting. Reported by Henrik Larsson. File: smtpd/smtpd_check.c. + Workaround (introduced: Postfix 3.2): mail_addr_find() logs + a warning that it does not support both parent-domain and + dot-parent-domain style lookups in the same call. File: + global/mail_addr_find.c + 20170610 Workaround (introduced: Postfix 3.0 20140718): prevent MIME - downgrade of Postfix-generated message/delivery status. + downgrade of Postfix-generated message/delivery-status. It's supposed to be 7bit, therefore quoted-printable encoding is not expected. Problem reported by Griff. File: bounce/bounce_notify_util.c. + Documentation: indicate that the transport_mumble parameters + are implemented by the queue manager, not by delivery agents. + Files: mantools/postlink, local/local.c, pipe/pipe.c, + *qmgr/qmgr.c, smtp/smtp.c, virtual/virtual.c. + 20170611 Security: Berkeley DB 2 and later try to read settings from @@ -22993,6 +23032,20 @@ for Berkeley DB < 3, but reduces file create performance for Berkeley DB 3 .. 4.6. File: util/dict_db.c. +20170617 + + Cleanup: the postconf command warns about unknown parameter + names in a database configuration file, specified as an + absolute pathname (for example, ldap:/path/to/file). This + code was mostly written in January 2017, and it still is a + partial implementation. Files: postconf/postconf_dbms.c, + postconf/Makefile.in, postconf/test66.ref. + +20170618 + + Cleanup: added missing "defined(__GLIBC__)" guards for + GLIBC version tests. File: util/sys_defs.h. + 20170620 Bugfix (introduced: Postfix 3.2) extension propagation was @@ -23000,6 +23053,93 @@ a change that was trying to be too clever. Files: global/mail_adr_crunch.c, global/mail_addr_crunch.ref. +20170704 + + Typos (introduced: Postfix 2.10): in comments about + IPv4-in-IPv6 addresses, replace :ffff::1.2.3.4 with the + correct form ::ffff:1.2.3.4. Incorrect or misleading comments + are worse than no comments. Files: smtpd/smtpd_haproxy.c, + postscreen/postscreen_haproxy.c. + +20170721 + + Bitrot: updated postconf LDAP database configuration check with + SASL and TLS-related parameters. Reported by Ralf Hildebrandt. + File: postconf/postconf_dbms.c. + +20170722 + + Cleanup: don't log the 'delay_dotcrlf' workaround for CISCO + PIX bugs before the smtp_pix_workaround_threshold_time has + passed. Reported by Ralf Hildebrandt. File: smtp/smtp_proto.c. + +20170727 + + Cleanup: the postconf command now uses mechanically-generated + lists of DBMS parameter names. This eliminates false positives + with mysql databases. Files: postconf/Makefile.in, + postconf/extract_cfg.sh, postconf/postconf_dbms.c. + + Cleanup: removed `#if 0/#endif' dead code from dict_ldap.c, + to avoid spurious output from the extract_cfg.sh parameter name + extraction tool. + +20170728 + + Documentation: added warnings that "enable_original_recipient + = no" prevents Postfix <= 3.2 from saving the address + verification result under the original probe destination + address, if it is changed by aliasing or canonical mapping. + Files: proto/ADDRESS_VERIFICATION_README.html, + proto/postconf.proto. + + Cleanup: don't store an empty address in the verify cache + (this could happen with "enable_original_recipient = no"). + File: global/verify.c. + +20170729 + + Cleanup: the setting "enable_original_recipient = no" no + longer breaks address verification for aliased addresses. + This does not change the behavior of the X-Original-To + header and of recipient deduplication. The fix is to always + store the original recipient in queue files. Some other + changes were needed to move ownership of the var_enable_orcpt + parameter from the cleanup daemon to the global library. + Files: cleanup/cleanup_init.c, cleanup/cleanup_milter.c, + cleanup_out_recipient.c, global/mail_params.c, global/mail_copy.c, + proto/postconf.proto proto/ADDRESS_VERIFICATION_README.html, + local/local.c, virtual/virtual.c, pipe/pipe.c. + +20170730 + + Bugfix (introduced: yesterday): revert global/verify.c code + to always store the verify result under the original address, + and to conditionally store it under the rewritten address. + File: global/verify.c. + +20170827 + + Safety: in vstream_buf_space(), add a sanity check to reject + negative request sizes, instead of letting the program fail + later. File: util/vstream.c + + Bugfix: in tests that enable the VSTRING_FLAG_EXACT flag, + vstring_buf_put_ready() could fail to extend the buffer, + causing infinite recursion in VBUF_PUT(). File: util/vstring.c. + +20170830 + + Bugfix: in vbuf_print(), save the parser-produced format + string before calling msg_panic(), so that the panic message + will not display its own format string. File: util/vbuf_print.c. + +20170831 + + Undefined behavior (introduced Postfix 1.0): after subtracting + a larger unsigned integer from a smaller one, do not assign + the result to a signed integer. File: postqueue/showq_compat.c. + 20170910 Safety: restore sanity checks for dynamically-specified @@ -23007,6 +23147,10 @@ These checks were lost with the Postfix 3.2 rewrite of the vbuf_print formatter. File: vbuf_print.c. + Bugfix (introduced: postfix-alpha): improve the 'fatal: + invalid option' message to show the optopt value instead of + the getopt() result. Files: master/*server.c. + 20170923 Bugfix (introduced: Postfix 3.2): panic in the postqueue @@ -23015,6 +23159,11 @@ the Postfix 3.2 rewrite of the vbuf_print formatter. Problem reported by Andreas Schulze. File: util/vbuf_print.c. +20170924 + + Cleanup: terminate early after output write error. Files: + showq/show_compat.c, showq/show_json.c. + 20171009 Bugfix (introduced: Postfix 3.1): DANE support. Postfix @@ -23035,6 +23184,12 @@ that some restriction returns OK, when the access map DISCARD feature is in effect. File: smtpd/smtpd_check.c. +20171209 + + Documentation: the effects of owner_request_special and + reset_owner_alias on alias expansion. Files: proto/aliases, + proto/postconf.proto. + 20171215 Bugfix (introduced: 20170611): the DB_CONFIG bugfix broke @@ -23048,21 +23203,120 @@ a panic, the Postfix DNS client now logs a warning and sets h_errno to TRY_AGAIN. File: dns/dns_lookup.c. + Cleanup: allow XCLIENT before STARTTLS, when TLS is required. + File: smtpd/smtpd.c. + +20171219 + + Feature: preliminary support to run Postfix in the foreground. + This requires that multi-instance support is disabled. + Files: conf/postfix-script, postfix/postfix.c. + +20171223 + + Feature: Milters can now send RET and ENVID arguments in + SMFIR_CHGFROM requests. Files: cleanup/Makefile.in, + cleanup/cleanup.h, cleanup/cleanup_envelope.c, + cleanup/cleanup_milter.c, cleanup/cleanup_milter.in13h, + cleanup/cleanup_milter.in13i, cleanup/cleanup_milter.ref13c, + cleanup/cleanup_milter.ref13d, cleanup/cleanup_milter.ref13f, + cleanup/cleanup_milter.ref13g, cleanup/cleanup_milter.ref13h, + cleanup/cleanup_milter.ref13i, cleanup/cleanup_state.c, + cleanup/test-queue-file13h, cleanup/test-queue-file13i, + oqmgr/qmgr_message.c, qmgr/qmgr_message.c. + 20171226 Documentation patches by Sven Neuhaus. Files: proto/FORWARD_SECRECY_README.html, proto/MILTER_README.html, proto/SMTPD_ACCESS_README.html. +20171227 + + Feature: postgresql:// URI support by Magosányi Árpád. + Files: global/dict_pgsql.c, proto/pgsql_table. + + Cleanup: added employer attributions for non-trivial changes + after Wietse changed employers. + 20180106 + Compatibility: with compatibility_level < 1, the SMTP server + now warns for mail that would be blocked by the Postfix + 2.10 smtpd_relay_restrictions feature. This extends the + safety net for sites that upgrade from earlier Postfix + versions (questions on the postfix-users list show a steady + trickle). Files: proto/COMPATIBILITY_README.html, + global/mail_params[hc], smtpd/smtpd_check.c. + + Cleanup: reset compatibility_level warnings after 'postfix + reload'. This is relevant primarily for the master daemon. + File: global/mail_params.c. + Cleanup: missing mailbox seek-to-end error check in the local(8) delivery agent. File: local/mailbox.c. Cleanup: incorrect mailbox seek-to-end error message in the virtual(8) delivery agent. File: virtual/mailbox.c. -20180127 +20180107 + + Cleanup: Postfix-generated From: headers with 'full name' + information are now formatted as "From: name
" by + default. Specify "header_from_format = obsolete" for the + earlier form "From: address (name)". Files: proto/postconf.proto, + cleanup/cleanup.h, cleanup_init.c, cleanup_message.c, + mail_params.h. + +20180113 + + Bugfix: "postconf -M" commands did not warn about unused + name=value settings in master.cf. File: postconf/postconf.c. + + Bugfix: "postconf -xM" now expands $process_name using the + daemon file name in master.cf, instead of the "postconf" + command process name. Files: postconf/postconf.h, + postconf/postconf_lookup.c, postconf/postconf_master.c. + + Feature: read-only service_name parameter that contains the + master.cf service name. This allows, for example, setting + the syslog_name with "-o syslog_name=postfix/$service_name" + for the "submission" and "smtps" services. Files: + proto/postconf.proto global/mail_params.h, global/mail_params.c, + master/single_server.c, master/multi_server.c, + master/trigger_server.c, master/event_server.c, + postconf/postconf_master.c, postconf/postconf_builtin.c, + and daemon manpages. + +20180114 + + Paranoia: censor the postqueue process name, similar to the + set-gid postdrop program. File: postqueue/postqueue.c. + + Cleanup: the new "service_name" parameter is applicable + only to Postfix daemons configured in master.cf; hyperlink + the parameter name in documentation. Files: proto/postconf.proto, + mantools/postlink, daemon manpages. + + Cleanup: allow whitespace between $[{(], parameter name, + and [:?)}]. This allows making complex expressions more + readable with line breaks. File: util/mac_expand.c. + + Cleanup: don't initialize the service_name parameter with + the process_name value. Files: postconf/postconf.[hc], + postconf/postconf_builtin.c. + +20180121 + + Bugfix (introduced: 20180106): too many arguments for format + string. File: local/mailbox.c. + +20180128 + + Documentation: the tcp_table(5) manpage now documents the + absence of substring lookups. File: proto/tcp_table. + +20180203 Licence: in addition to the historical IBM Public License 1.0, this software is now also distributed with the more @@ -23070,3 +23324,13 @@ to take the software under the license of their choice. Those who are more comfortable with the IPL can continue with that license. File: LICENSE. + +20180218 + + Cleanup: added 22 missing *_maps parameters to the default + proxy_read_maps setting. Files: global/mail_params.h. + + Bugfix (introduced: 20120117): postconf should scan only + built-in or service-defined parameters for ldap, *sql, etc. + database names. Problem reported by Christian Rößner. Files: + postconf/postconf_user.c. diff -Nru postfix-3.2.5/html/ADDRESS_VERIFICATION_README.html postfix-3.3.0/html/ADDRESS_VERIFICATION_README.html --- postfix-3.2.5/html/ADDRESS_VERIFICATION_README.html 2015-01-29 22:33:47.000000000 +0000 +++ postfix-3.3.0/html/ADDRESS_VERIFICATION_README.html 2017-07-29 23:06:47.000000000 +0000 @@ -298,6 +298,12 @@ ... # Postfix 2.6 and later privacy feature. # unverified_recipient_reject_reason = Address lookup failed + + # Postfix 3.2 and earlier workaround. + # Do not set enable_original_recipient=no. This prevents Postfix + # from saving the recipient address verification result under + # the original address, when the address verification probe + # message goes through address aliasing or canonical mapping. @@ -348,6 +354,12 @@ # Note 1: Be sure to read the "Caching" section below! # Note 2: Avoid hash files here. Use btree or lmdb instead. address_verify_map = btree:/var/lib/postfix/verify + + # Postfix 3.2 and earlier workaround. + # Do not set enable_original_recipient=no. This prevents Postfix + # from saving the sender address verification result under the + # original address, when the address verification probe message + # goes through address aliasing or canonical mapping. /etc/postfix/sender_access: # Don't do this when you handle lots of email. diff -Nru postfix-3.2.5/html/aliases.5.html postfix-3.3.0/html/aliases.5.html --- postfix-3.2.5/html/aliases.5.html 2016-02-14 01:39:26.000000000 +0000 +++ postfix-3.3.0/html/aliases.5.html 2017-12-10 01:07:47.000000000 +0000 @@ -52,52 +52,53 @@ or `@'. The name is folded to lowercase, in order to make database lookups case insensitive. - In addition, when an alias exists for owner-name, delivery diagnostics - are directed to that address, instead of to the originator of the mes- - sage. This is typically used to direct delivery errors to the main- - tainer of a mailing list, who is in a better position to deal with - mailing list delivery problems than the originator of the undelivered - mail. + In addition, when an alias exists for owner-name, this will override + the envelope sender address, so that delivery diagnostics are directed + to owner-name, instead of the originator of the message (for details, + see owner_request_special, expand_owner_alias and reset_owner_alias). + This is typically used to direct delivery errors to the maintainer of a + mailing list, who is in a better position to deal with mailing list + delivery problems than the originator of the undelivered mail. The value contains one or more of the following: address - Mail is forwarded to address, which is compatible with the RFC + Mail is forwarded to address, which is compatible with the RFC 822 standard. /file/name - Mail is appended to /file/name. See local(8) for details of - delivery to file. Delivery is not limited to regular files. + Mail is appended to /file/name. See local(8) for details of + delivery to file. Delivery is not limited to regular files. For example, to dispose of unwanted mail, deflect it to /dev/null. |command - Mail is piped into command. Commands that contain special char- - acters, such as whitespace, should be enclosed between double + Mail is piped into command. Commands that contain special char- + acters, such as whitespace, should be enclosed between double quotes. See local(8) for details of delivery to command. - When the command fails, a limited amount of command output is - mailed back to the sender. The file /usr/include/sysexits.h - defines the expected exit status codes. For example, use "|exit - 67" to simulate a "user unknown" error, and "|exit 0" to imple- + When the command fails, a limited amount of command output is + mailed back to the sender. The file /usr/include/sysexits.h + defines the expected exit status codes. For example, use "|exit + 67" to simulate a "user unknown" error, and "|exit 0" to imple- ment an expensive black hole. :include:/file/name - Mail is sent to the destinations listed in the named file. - Lines in :include: files have the same syntax as the right-hand + Mail is sent to the destinations listed in the named file. + Lines in :include: files have the same syntax as the right-hand side of alias entries. - A destination can be any destination that is described in this - manual page. However, delivery to "|command" and /file/name is - disallowed by default. To enable, edit the allow_mail_to_com- + A destination can be any destination that is described in this + manual page. However, delivery to "|command" and /file/name is + disallowed by default. To enable, edit the allow_mail_to_com- mands and allow_mail_to_files configuration parameters. ADDRESS EXTENSION - When alias database search fails, and the recipient localpart contains - the optional recipient delimiter (e.g., user+foo), the search is + When alias database search fails, and the recipient localpart contains + the optional recipient delimiter (e.g., user+foo), the search is repeated for the unextended address (e.g., user). - The propagate_unmatched_extensions parameter controls whether an + The propagate_unmatched_extensions parameter controls whether an unmatched address extension (+foo) is propagated to the result of table lookup. @@ -106,9 +107,9 @@ before database lookup. REGULAR EXPRESSION TABLES - This section describes how the table lookups change when the table is - given in the form of regular expressions. For a description of regular - expression lookup table syntax, see regexp_table(5) or pcre_table(5). + This section describes how the table lookups change when the table is + given in the form of regular expressions. For a description of regular + expression lookup table syntax, see regexp_table(5) or pcre_table(5). NOTE: these formats do not use ":" at the end of a pattern. Each regular expression is applied to the entire search string. Thus, a @@ -121,57 +122,59 @@ reasons there is no support for $1, $2 etc. substring interpolation. SECURITY - The local(8) delivery agent disallows regular expression substitution + The local(8) delivery agent disallows regular expression substitution of $1 etc. in alias_maps, because that would open a security hole. - The local(8) delivery agent will silently ignore requests to use the - proxymap(8) server within alias_maps. Instead it will open the table + The local(8) delivery agent will silently ignore requests to use the + proxymap(8) server within alias_maps. Instead it will open the table directly. Before Postfix version 2.2, the local(8) delivery agent will terminate with a fatal error. CONFIGURATION PARAMETERS - The following main.cf parameters are especially relevant. The text - below provides only a parameter summary. See postconf(5) for more + The following main.cf parameters are especially relevant. The text + below provides only a parameter summary. See postconf(5) for more details including examples. - alias_database - List of alias databases that are updated by the newaliases(1) - command. - - alias_maps - List of alias databases queried by the local(8) delivery agent. - - allow_mail_to_commands - Restrict the usage of mail delivery to external command. - - allow_mail_to_files - Restrict the usage of mail delivery to external file. - - expand_owner_alias - When delivering to an alias that has an owner- companion alias, - set the envelope sender address to the right-hand side of the - owner alias, instead using of the left-hand side address. - - propagate_unmatched_extensions - A list of address rewriting or forwarding mechanisms that propa- - gate an address extension from the original address to the - result. Specify zero or more of canonical, virtual, alias, for- - ward, include, or generic. - - owner_request_special - Give special treatment to owner-listname and listname-request - addresses. - - recipient_delimiter - Delimiter that separates recipients from address extensions. + alias_database (see 'postconf -d' output) + The alias databases for local(8) delivery that are updated with + "newaliases" or with "sendmail -bi". + + alias_maps (see 'postconf -d' output) + The alias databases that are used for local(8) delivery. + + allow_mail_to_commands (alias, forward) + Restrict local(8) mail delivery to external commands. + + allow_mail_to_files (alias, forward) + Restrict local(8) mail delivery to external files. + + expand_owner_alias (no) + When delivering to an alias "aliasname" that has an + "owner-aliasname" companion alias, set the envelope sender + address to the expansion of the "owner-aliasname" alias. + + propagate_unmatched_extensions (canonical, virtual) + What address lookup tables copy an address extension from the + lookup key to the lookup result. + + owner_request_special (yes) + Enable special treatment for owner-listname entries in the + aliases(5) file, and don't split owner-listname and list- + name-request address localparts when the recipient_delimiter is + set to "-". + + 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 + extension (example: .forward+foo). Available in Postfix version 2.3 and later: - frozen_delivered_to - Update the local(8) delivery agent's Delivered-To: address (see - prepend_delivered_header) only once, at the start of a delivery; - do not update the Delivered-To: address while expanding aliases - or .forward files. + frozen_delivered_to (yes) + Update the local(8) delivery agent's idea of the Delivered-To: + address (see prepend_delivered_header) only once, at the start + of a delivery attempt; do not update the Delivered-To: address + while expanding aliases or .forward files. STANDARDS RFC 822 (ARPA Internet Text Messages) diff -Nru postfix-3.2.5/html/anvil.8.html postfix-3.3.0/html/anvil.8.html --- postfix-3.2.5/html/anvil.8.html 2016-09-17 14:50:59.000000000 +0000 +++ postfix-3.3.0/html/anvil.8.html 2018-01-14 16:48:38.000000000 +0000 @@ -208,6 +208,11 @@ A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + SEE ALSO smtpd(8), Postfix SMTP server postconf(5), configuration parameters diff -Nru postfix-3.2.5/html/bounce.8.html postfix-3.3.0/html/bounce.8.html --- postfix-3.2.5/html/bounce.8.html 2016-09-17 14:50:57.000000000 +0000 +++ postfix-3.3.0/html/bounce.8.html 2018-01-14 16:48:36.000000000 +0000 @@ -148,6 +148,11 @@ Detect that a message requires SMTPUTF8 support for the speci- fied mail origin classes. + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + FILES /var/spool/postfix/bounce/* non-delivery records /var/spool/postfix/defer/* non-delivery records diff -Nru postfix-3.2.5/html/cleanup.8.html postfix-3.3.0/html/cleanup.8.html --- postfix-3.2.5/html/cleanup.8.html 2016-11-05 12:01:03.000000000 +0000 +++ postfix-3.3.0/html/cleanup.8.html 2018-01-14 16:48:36.000000000 +0000 @@ -480,7 +480,14 @@ Available in Postfix version 2.1 and later: enable_original_recipient (yes) - Enable support for the X-Original-To message header. + Enable support for the original recipient address after an + address is rewritten to a different address (for example with + aliasing or with canonical mapping). + + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. FILES /etc/postfix/canonical*, canonical mapping table diff -Nru postfix-3.2.5/html/COMPATIBILITY_README.html postfix-3.3.0/html/COMPATIBILITY_README.html --- postfix-3.2.5/html/COMPATIBILITY_README.html 2015-02-20 21:43:51.000000000 +0000 +++ postfix-3.3.0/html/COMPATIBILITY_README.html 2018-01-06 23:15:54.000000000 +0000 @@ -48,7 +48,7 @@ can decide if any backwards-compatible settings need to be made permanent in main.cf or master.cf, before turning off the backwards-compatibility safety net as described at the -end of this document.

+end of this document.

The following messages may be logged:

@@ -60,6 +60,9 @@
  • Using backwards-compatible default setting chroot=y

    +
  • Using backwards-compatible +default setting smtpd_relay_restrictions = (empty)

    +
  • Using backwards-compatible default setting mynetworks_style=subnet

    @@ -79,15 +82,19 @@

    When no more backwards-compatible settings need to be made permanent, the system administrator should turn off the backwards-compatibility safety net as described at the -end of this document.

    +end of this document.

    Using backwards-compatible default setting append_dot_mydomain=yes

    The append_dot_mydomain default value has changed from "yes" -to "no". As long as the append_dot_mydomain parameter is left at -its implicit default value, and the backwards-compatible default -setting is turned on, Postfix may log one of the following messages:

    +to "no". This could result in unexpected non-delivery of email after +Postfix is updated from an older version. The backwards-compatibility +safety net is designed to prevent such surprises.

    + +

    As long as the append_dot_mydomain parameter is left at +its implicit default value, and the compatibility_level setting is +less than 1, Postfix may log one of the following messages:

      @@ -136,9 +143,16 @@ setting chroot=y

      The master.cf chroot default value has changed from "y" (yes) -to "n" (no). As long as a master.cf chroot field is left at its -implicit default value, and the backwards-compatible default setting -is turned on, Postfix may log the following message while it +to "n" (no). The new default avoids the need for copies of system +files under the Postfix queue directory. However, sites with strict +security requirements may want to keep the chroot feature enabled +after updating Postfix from an older version. The backwards-compatibility +safety net is designed allow the administrator to choose if they +want to keep the old behavior.

      + +

      As long as a master.cf chroot field is left at its +implicit default value, and the compatibility_level setting +is less than 1, Postfix may log the following message while it reads the master.cf file:

      @@ -160,15 +174,58 @@
      +

      Using backwards-compatible default +setting smtpd_relay_restrictions = (empty)

      + +

      The smtpd_relay_restrictions feature was introduced with Postfix +version 2.10, as a safety mechanism for configuration errors in +smtpd_recipient_restrictions that could make Postfix an open relay. +

      + +

      The smtpd_relay_restrictions implicit default setting forbids +mail to remote destinations from clients that don't match +permit_mynetworks or permit_sasl_authenticated. This could result +in unexpected 'Relay access denied' errors after Postfix is updated +from an older Postfix version. The backwards-compatibility safety +net is designed to prevent such surprises.

      + +

      When the compatibility_level less than 1, and the +smtpd_relay_restrictions parameter is left at its implicit default +setting, Postfix may log the following message:

      + +
      +
      +postfix/smtpd[38463]: using backwards-compatible default setting
      +    "smtpd_relay_restrictions = (empty)" to avoid "Relay access
      +    denied" error for recipient "user@example.com" from client
      +    "host.example.net[10.0.0.2]"
      +
      +
      + +

      If this request should not be blocked, then the system +administrator should make the backwards-compatible setting +"smtpd_relay_restrictions=" (i.e. empty) permanent in main.cf: + +

      +
      +# postconf smtpd_relay_restrictions=
      +# postfix reload
      +
      +
      +

      Using backwards-compatible default setting mynetworks_style=subnet

      The mynetworks_style default value has changed from "subnet" to "host". This parameter is used to implement the "permit_mynetworks" -feature. As long as the mynetworks and mynetworks_style parameters -are left at their implicit default values, and the backwards-compatible -default setting is turned on, the Postfix SMTP server may log one -of the following messages:

      +feature. The change could in unexpected 'access denied' errors after +Postfix is updated from an older version. The backwards-compatibility +safety net is designed to prevent such surprises.

      + +

      As long as the mynetworks and mynetworks_style parameters are +left at their implicit default values, and the compatibility_level +setting is less than 2, the Postfix SMTP server may log one of the +following messages:

      @@ -201,10 +258,14 @@
       setting relay_domains=$mydestination  
       
       

      The relay_domains default value has changed from "$mydestination" -to the empty value. As long as the relay_domains parameter is left -at its implicit default value, and the backwards-compatible default -setting is turned on, Postfix may log one of the following messages. -

      +to the empty value. This could result in unexpected 'Relay access +denied' errors or ETRN errors after Postfix is updated from an older +version. The backwards-compatibility safety net is designed to +prevent such surprises.

      + +

      As long as the relay_domains parameter is left at its implicit +default value, and the compatibility_level setting is less than 2, +Postfix may log one of the following messages.

        @@ -268,13 +329,13 @@

        The smtputf8_enable default value has changed from "no" to "yes. With the new "yes" setting, the Postfix SMTP server rejects non-ASCII -addresses from clients that don't request SMTPUTF8 support. With -the old "no" setting, Postfix will accept such addresses, even if -such addresses are not permitted by traditional SMTP standards.

        +addresses from clients that don't request SMTPUTF8 support, after +Postfix is updated from an older version. The backwards-compatibility +safety net is designed to prevent such surprises.

        As long as the smtputf8_enable parameter is left at its implicit -default value, and the backwards-compatible default setting is -turned on, Postfix logs a warning each time an SMTP command uses a +default value, and the compatibility_level setting is +less than 1, Postfix logs a warning each time an SMTP command uses a non-ASCII address localpart without requesting SMTPUTF8 support:

        diff -Nru postfix-3.2.5/html/defer.8.html postfix-3.3.0/html/defer.8.html --- postfix-3.2.5/html/defer.8.html 2016-09-17 14:50:57.000000000 +0000 +++ postfix-3.3.0/html/defer.8.html 2018-01-14 16:48:36.000000000 +0000 @@ -148,6 +148,11 @@ Detect that a message requires SMTPUTF8 support for the speci- fied mail origin classes. + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + FILES /var/spool/postfix/bounce/* non-delivery records /var/spool/postfix/defer/* non-delivery records diff -Nru postfix-3.2.5/html/discard.8.html postfix-3.3.0/html/discard.8.html --- postfix-3.2.5/html/discard.8.html 2016-09-17 14:50:59.000000000 +0000 +++ postfix-3.3.0/html/discard.8.html 2018-01-14 16:48:38.000000000 +0000 @@ -93,6 +93,11 @@ A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + SEE ALSO qmgr(8), queue manager bounce(8), delivery status reports diff -Nru postfix-3.2.5/html/dnsblog.8.html postfix-3.3.0/html/dnsblog.8.html --- postfix-3.2.5/html/dnsblog.8.html 2016-09-17 14:50:59.000000000 +0000 +++ postfix-3.3.0/html/dnsblog.8.html 2018-01-14 16:48:39.000000000 +0000 @@ -71,6 +71,11 @@ A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + SEE ALSO smtpd(8), Postfix SMTP server postconf(5), configuration parameters diff -Nru postfix-3.2.5/html/error.8.html postfix-3.3.0/html/error.8.html --- postfix-3.2.5/html/error.8.html 2016-09-17 14:50:57.000000000 +0000 +++ postfix-3.3.0/html/error.8.html 2018-01-14 16:48:36.000000000 +0000 @@ -106,6 +106,11 @@ A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + SEE ALSO qmgr(8), queue manager bounce(8), delivery status reports diff -Nru postfix-3.2.5/html/flush.8.html postfix-3.3.0/html/flush.8.html --- postfix-3.2.5/html/flush.8.html 2016-09-17 14:50:58.000000000 +0000 +++ postfix-3.3.0/html/flush.8.html 2018-01-14 16:48:38.000000000 +0000 @@ -138,6 +138,11 @@ A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + FILES /var/spool/postfix/flush, "fast flush" logfiles. diff -Nru postfix-3.2.5/html/FORWARD_SECRECY_README.html postfix-3.3.0/html/FORWARD_SECRECY_README.html --- postfix-3.2.5/html/FORWARD_SECRECY_README.html 2017-12-26 15:48:52.000000000 +0000 +++ postfix-3.3.0/html/FORWARD_SECRECY_README.html 2018-02-04 15:27:52.000000000 +0000 @@ -270,7 +270,7 @@ if the server's long-term authentication keys are later compromised.

        -

        Postfix ≥ 3.2 supports the curve negotitation API of OpenSSL +

        Postfix ≥ 3.2 supports the curve negotiation API of OpenSSL ≥ 1.0.2. The list of candidate curves can be changed via the "tls_eecdh_auto_curves" configuration parameter, which can be used to select a prioritized list of supported curves (most preferred diff -Nru postfix-3.2.5/html/lmtp.8.html postfix-3.3.0/html/lmtp.8.html --- postfix-3.2.5/html/lmtp.8.html 2016-12-04 20:55:06.000000000 +0000 +++ postfix-3.3.0/html/lmtp.8.html 2018-01-14 16:48:37.000000000 +0000 @@ -303,6 +303,13 @@ smtp_dns_reply_filter (empty) Optional filter for Postfix SMTP client DNS lookup results. + Available in Postfix version 3.3 and later: + + smtp_balance_inet_protocols (yes) + When a remote destination resolves to a combination of IPv4 and + IPv6 addresses, ensure that the Postfix SMTP client can try both + address types before it runs into the smtp_mx_address_limit. + MIME PROCESSING CONTROLS Available in Postfix version 2.0 and later: @@ -594,15 +601,6 @@ cipher list. RESOURCE AND RATE CONTROLS - smtp_destination_concurrency_limit ($default_destination_concur- - rency_limit) - The maximal number of parallel deliveries to the same destina- - tion via the smtp message delivery transport. - - smtp_destination_recipient_limit ($default_destination_recipient_limit) - The maximal number of recipients per message for the smtp mes- - sage delivery transport. - smtp_connect_timeout (30s) The Postfix SMTP client time limit for completing a TCP connec- tion, or zero (use the operating system built-in time limit). @@ -706,6 +704,20 @@ that an SMTP session may be reused before it is closed, or zero (no limit). + Implemented in the qmgr(8) daemon: + + transport_destination_concurrency_limit ($default_destination_concur- + rency_limit) + A transport-specific override for the default_destination_con- + currency_limit parameter value, where transport is the master.cf + name of the message delivery transport. + + transport_destination_recipient_limit ($default_destination_recipi- + ent_limit) + A transport-specific override for the default_destination_recip- + ient_limit parameter value, where transport is the master.cf + name of the message delivery transport. + SMTPUTF8 CONTROLS Preliminary SMTPUTF8 support is introduced with Postfix 3.0. @@ -867,6 +879,11 @@ smtp_tcp_port (smtp) The default TCP port that the Postfix SMTP client connects to. + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + SEE ALSO generic(5), output address rewriting header_checks(5), message header content inspection diff -Nru postfix-3.2.5/html/local.8.html postfix-3.3.0/html/local.8.html --- postfix-3.2.5/html/local.8.html 2016-09-17 14:50:57.000000000 +0000 +++ postfix-3.3.0/html/local.8.html 2018-01-14 16:48:37.000000000 +0000 @@ -327,14 +327,15 @@ Whether or not to use the local biff service. expand_owner_alias (no) - When delivering to an alias "aliasname" that has an - "owner-aliasname" companion alias, set the envelope sender - address to the expansion of the "owner-aliasname" alias. + When delivering to an alias "aliasname" that has an + "owner-aliasname" companion alias, set the envelope sender + address to the expansion of the "owner-aliasname" alias. owner_request_special (yes) - Give special treatment to owner-listname and listname-request - address localparts: don't split such addresses when the recipi- - ent_delimiter is set to "-". + Enable special treatment for owner-listname entries in the + aliases(5) file, and don't split owner-listname and list- + name-request address localparts when the recipient_delimiter is + set to "-". sun_mailtool_compatibility (no) Obsolete SUN mailtool compatibility feature. @@ -342,62 +343,62 @@ Available in Postfix version 2.3 and later: frozen_delivered_to (yes) - Update the local(8) delivery agent's idea of the Delivered-To: - address (see prepend_delivered_header) only once, at the start - of a delivery attempt; do not update the Delivered-To: address + Update the local(8) delivery agent's idea of the Delivered-To: + address (see prepend_delivered_header) only once, at the start + of a delivery attempt; do not update the Delivered-To: address while expanding aliases or .forward files. Available in Postfix version 2.5.3 and later: strict_mailbox_ownership (yes) - Defer delivery when a mailbox file is not owned by its recipi- + Defer delivery when a mailbox file is not owned by its recipi- ent. reset_owner_alias (no) - Reset the local(8) delivery agent's idea of the owner-alias - attribute, when delivering mail to a child alias that does not + Reset the local(8) delivery agent's idea of the owner-alias + attribute, when delivering mail to a child alias that does not have its own owner alias. Available in Postfix version 3.0 and later: local_delivery_status_filter ($default_delivery_status_filter) - Optional filter for the local(8) delivery agent to change the - status code or explanatory text of successful or unsuccessful + Optional filter for the local(8) delivery agent to change the + status code or explanatory text of successful or unsuccessful deliveries. DELIVERY METHOD CONTROLS - The precedence of local(8) delivery methods from high to low is: + The precedence of local(8) delivery methods from high to low is: aliases, .forward files, mailbox_transport_maps, mailbox_transport, - mailbox_command_maps, mailbox_command, home_mailbox, mail_spool_direc- + mailbox_command_maps, mailbox_command, home_mailbox, mail_spool_direc- tory, fallback_transport_maps, fallback_transport, and luser_relay. alias_maps (see 'postconf -d' output) The alias databases that are used for local(8) delivery. forward_path (see 'postconf -d' output) - The local(8) delivery agent search list for finding a .forward + The local(8) delivery agent search list for finding a .forward file with user-specified delivery methods. mailbox_transport_maps (empty) Optional lookup tables with per-recipient message delivery - transports to use for local(8) mailbox delivery, whether or not + transports to use for local(8) mailbox delivery, whether or not the recipients are found in the UNIX passwd database. mailbox_transport (empty) - Optional message delivery transport that the local(8) delivery - agent should use for mailbox delivery to all local recipients, + Optional message delivery transport that the local(8) delivery + agent should use for mailbox delivery to all local recipients, whether or not they are found in the UNIX passwd database. mailbox_command_maps (empty) - Optional lookup tables with per-recipient external commands to + Optional lookup tables with per-recipient external commands to use for local(8) mailbox delivery. mailbox_command (empty) - Optional external command that the local(8) delivery agent + Optional external command that the local(8) delivery agent should use for mailbox delivery. home_mailbox (empty) - Optional pathname of a mailbox file relative to a local(8) + Optional pathname of a mailbox file relative to a local(8) user's home directory. mail_spool_directory (see 'postconf -d' output) @@ -409,17 +410,17 @@ not find in the aliases(5) or UNIX password database. fallback_transport (empty) - Optional message delivery transport that the local(8) delivery - agent should use for names that are not found in the aliases(5) + Optional message delivery transport that the local(8) delivery + agent should use for names that are not found in the aliases(5) or UNIX password database. luser_relay (empty) - Optional catch-all destination for unknown local(8) recipients. + Optional catch-all destination for unknown local(8) recipients. Available in Postfix version 2.2 and later: command_execution_directory (empty) - The local(8) delivery agent working directory for delivery to + The local(8) delivery agent working directory for delivery to external command. MAILBOX LOCKING CONTROLS @@ -428,15 +429,15 @@ mailbox file or bounce(8) logfile. deliver_lock_delay (1s) - The time between attempts to acquire an exclusive lock on a + The time between attempts to acquire an exclusive lock on a mailbox file or bounce(8) logfile. stale_lock_time (500s) - The time after which a stale exclusive mailbox lockfile is + The time after which a stale exclusive mailbox lockfile is removed. mailbox_delivery_lock (see 'postconf -d' output) - How to lock a UNIX-style local(8) mailbox before attempting + How to lock a UNIX-style local(8) mailbox before attempting delivery. RESOURCE AND RATE CONTROLS @@ -448,6 +449,12 @@ cate filter for aliases(5) or virtual(5) alias expansion, or for showq(8) queue displays. + mailbox_size_limit (51200000) + The maximal size of any local(8) individual mailbox or maildir + file, or zero (no limit). + + Implemented in the qmgr(8) daemon: + local_destination_concurrency_limit (2) The maximal number of parallel deliveries via the local mail delivery transport to the same recipient (when "local_destina- @@ -459,10 +466,6 @@ The maximal number of recipients per message delivery via the local mail delivery transport. - mailbox_size_limit (51200000) - The maximal size of any local(8) individual mailbox or maildir - file, or zero (no limit). - SECURITY CONTROLS allow_mail_to_commands (alias, forward) Restrict local(8) mail delivery to external commands. @@ -471,49 +474,49 @@ Restrict local(8) mail delivery to external files. command_expansion_filter (see 'postconf -d' output) - Restrict the characters that the local(8) delivery agent allows - in $name expansions of $mailbox_command and $command_execu- + Restrict the characters that the local(8) delivery agent allows + in $name expansions of $mailbox_command and $command_execu- tion_directory. default_privs (nobody) - The default rights used by the local(8) delivery agent for + The default rights used by the local(8) delivery agent for delivery to external file or command. forward_expansion_filter (see 'postconf -d' output) - Restrict the characters that the local(8) delivery agent allows + Restrict the characters that the local(8) delivery agent allows in $name expansions of $forward_path. Available in Postfix version 2.2 and later: execution_directory_expansion_filter (see 'postconf -d' output) - Restrict the characters that the local(8) delivery agent allows + Restrict the characters that the local(8) delivery agent allows in $name expansions of $command_execution_directory. Available in Postfix version 2.5.3 and later: strict_mailbox_ownership (yes) - Defer delivery when a mailbox file is not owned by its recipi- + Defer delivery when a mailbox file is not owned by its recipi- ent. 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. delay_logging_resolution_limit (2) - The maximal number of digits after the decimal point when log- + The maximal number of digits after the decimal point when log- ging sub-second delay values. export_environment (see 'postconf -d' output) - The list of environment variables that a Postfix process will + The list of environment variables that a Postfix process will export to non-Postfix processes. 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. local_command_shell (empty) @@ -521,7 +524,7 @@ mand. 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) @@ -529,8 +532,8 @@ process will service before terminating voluntarily. prepend_delivered_header (command, file, forward) - The message delivery contexts where the Postfix local(8) deliv- - ery agent prepends a Delivered-To: message header with the + The message delivery contexts where the Postfix local(8) deliv- + ery agent prepends a Delivered-To: message header with the address that the mail was delivered to. process_id (read-only) @@ -540,15 +543,15 @@ The process name of a Postfix command or daemon process. propagate_unmatched_extensions (canonical, virtual) - What address lookup tables copy an address extension from the + What address lookup tables copy an address extension from the lookup key to the lookup result. queue_directory (see 'postconf -d' output) 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). require_home_directory (no) @@ -559,9 +562,19 @@ 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 3.3 and later: + + enable_original_recipient (yes) + Enable support for the original recipient address after an + address is rewritten to a different address (for example with + aliasing or with canonical mapping). + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + FILES The following are examples; details differ between systems. $HOME/.forward, per-user aliasing @@ -582,10 +595,10 @@ The Secure Mailer license must be distributed with this software. HISTORY - The Delivered-To: message header appears in the qmail system by Daniel + The Delivered-To: message header appears in the qmail system by Daniel Bernstein. - The maildir structure appears in the qmail system by Daniel Bernstein. + The maildir structure appears in the qmail system by Daniel Bernstein. AUTHOR(S) Wietse Venema diff -Nru postfix-3.2.5/html/mailq.1.html postfix-3.3.0/html/mailq.1.html --- postfix-3.2.5/html/mailq.1.html 2017-02-06 00:05:04.000000000 +0000 +++ postfix-3.3.0/html/mailq.1.html 2017-10-28 12:13:42.000000000 +0000 @@ -434,7 +434,7 @@ alternate_config_directories (empty) A list of non-default Postfix configuration directories that may be specified with "-c config_directory" on the command line (in - the case of sendmail(1), with "-C config_directory"), or via the + the case of sendmail(1), with the "-C" option), or via the MAIL_CONFIG environment parameter. multi_instance_directories (empty) diff -Nru postfix-3.2.5/html/master.5.html postfix-3.3.0/html/master.5.html --- postfix-3.2.5/html/master.5.html 2016-09-08 11:02:51.000000000 +0000 +++ postfix-3.3.0/html/master.5.html 2017-12-27 17:28:45.000000000 +0000 @@ -135,7 +135,7 @@ service in the first place. The files in the examples/chroot-setup subdirectory of the Post- - fix source archive show set up a Postfix chroot environment on a + fix source show how to set up a Postfix chroot environment on a variety of systems. See also BASIC_CONFIGURATION_README for issues related to running daemons chrooted. diff -Nru postfix-3.2.5/html/master.8.html postfix-3.3.0/html/master.8.html --- postfix-3.2.5/html/master.8.html 2016-09-17 14:50:57.000000000 +0000 +++ postfix-3.3.0/html/master.8.html 2018-01-14 16:48:37.000000000 +0000 @@ -143,11 +143,12 @@ or accepting connections. import_environment (see 'postconf -d' output) - The list of environment parameters that a Postfix process will - import from a non-Postfix parent process. + The list of environment parameters that a privileged Postfix + process will import from a non-Postfix parent process, or + name=value environment overrides. 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. process_id (read-only) @@ -163,11 +164,16 @@ 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 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + FILES - To expand the directory names below into their actual values, use the + To expand the directory names below into their actual values, use the command "postconf config_directory" etc. $config_directory/main.cf, global configuration file. diff -Nru postfix-3.2.5/html/newaliases.1.html postfix-3.3.0/html/newaliases.1.html --- postfix-3.2.5/html/newaliases.1.html 2017-02-06 00:05:04.000000000 +0000 +++ postfix-3.3.0/html/newaliases.1.html 2017-10-28 12:13:42.000000000 +0000 @@ -434,7 +434,7 @@ alternate_config_directories (empty) A list of non-default Postfix configuration directories that may be specified with "-c config_directory" on the command line (in - the case of sendmail(1), with "-C config_directory"), or via the + the case of sendmail(1), with the "-C" option), or via the MAIL_CONFIG environment parameter. multi_instance_directories (empty) diff -Nru postfix-3.2.5/html/oqmgr.8.html postfix-3.3.0/html/oqmgr.8.html --- postfix-3.2.5/html/oqmgr.8.html 2016-09-17 14:50:58.000000000 +0000 +++ postfix-3.3.0/html/oqmgr.8.html 2018-01-14 16:48:38.000000000 +0000 @@ -207,54 +207,66 @@ The default maximal number of parallel deliveries to the same destination. - transport_destination_concurrency_limit ($default_destination_concur- + transport_destination_concurrency_limit ($default_destination_concur- rency_limit) - Idem, for delivery via the named message transport. + A transport-specific override for the default_destination_con- + currency_limit parameter value, where transport is the master.cf + name of the message delivery transport. Available in Postfix version 2.5 and later: - transport_initial_destination_concurrency ($initial_destination_concur- + transport_initial_destination_concurrency ($initial_destination_concur- rency) - Initial concurrency for delivery via the named message trans- - port. + A transport-specific override for the initial_destination_con- + currency parameter value, where transport is the master.cf name + of the message delivery transport. default_destination_concurrency_failed_cohort_limit (1) - How many pseudo-cohorts must suffer connection or handshake - failure before a specific destination is considered unavailable + How many pseudo-cohorts must suffer connection or handshake + failure before a specific destination is considered unavailable (and further delivery is suspended). - transport_destination_concurrency_failed_cohort_limit ($default_desti- + transport_destination_concurrency_failed_cohort_limit ($default_desti- nation_concurrency_failed_cohort_limit) - Idem, for delivery via the named message transport. + A transport-specific override for the default_destination_con- + currency_failed_cohort_limit parameter value, where transport is + the master.cf name of the message delivery transport. default_destination_concurrency_negative_feedback (1) - The per-destination amount of delivery concurrency negative - feedback, after a delivery completes with a connection or hand- + The per-destination amount of delivery concurrency negative + feedback, after a delivery completes with a connection or hand- shake failure. - transport_destination_concurrency_negative_feedback ($default_destina- + transport_destination_concurrency_negative_feedback ($default_destina- tion_concurrency_negative_feedback) - Idem, for delivery via the named message transport. + A transport-specific override for the default_destination_con- + currency_negative_feedback parameter value, where transport is + the master.cf name of the message delivery transport. default_destination_concurrency_positive_feedback (1) - The per-destination amount of delivery concurrency positive + The per-destination amount of delivery concurrency positive feedback, after a delivery completes without connection or hand- shake failure. - transport_destination_concurrency_positive_feedback ($default_destina- + transport_destination_concurrency_positive_feedback ($default_destina- tion_concurrency_positive_feedback) - Idem, for delivery via the named message transport. + A transport-specific override for the default_destination_con- + currency_positive_feedback parameter value, where transport is + the master.cf name of the message delivery transport. destination_concurrency_feedback_debug (no) - Make the queue manager's feedback algorithm verbose for perfor- + Make the queue manager's feedback algorithm verbose for perfor- mance analysis purposes. RECIPIENT SCHEDULING CONTROLS default_destination_recipient_limit (50) The default maximal number of recipients per message delivery. - transport_destination_recipient_limit - Idem, for delivery via the named message transport. + transport_destination_recipient_limit ($default_destination_recipi- + ent_limit) + A transport-specific override for the default_destination_recip- + ient_limit parameter value, where transport is the master.cf + name of the message delivery transport. OTHER RESOURCE AND RATE CONTROLS minimal_backoff_time (300s) @@ -265,45 +277,50 @@ The maximal time between attempts to deliver a deferred message. maximal_queue_lifetime (5d) - Consider a message as undeliverable, when delivery fails with a + Consider a message as undeliverable, when delivery fails with a temporary error, and the time in the queue has reached the maxi- mal_queue_lifetime limit. queue_run_delay (300s) - The time between deferred queue scans by the queue manager; + The time between deferred queue scans by the queue manager; prior to Postfix 2.4 the default value was 1000s. transport_retry_time (60s) - The time between attempts by the Postfix queue manager to con- + The time between attempts by the Postfix queue manager to con- tact a malfunctioning message delivery transport. Available in Postfix version 2.1 and later: bounce_queue_lifetime (5d) - Consider a bounce message as undeliverable, when delivery fails - with a temporary error, and the time in the queue has reached + Consider a bounce message as undeliverable, when delivery fails + with a temporary error, and the time in the queue has reached the bounce_queue_lifetime limit. Available in Postfix version 2.5 and later: default_destination_rate_delay (0s) - The default amount of delay that is inserted between individual - deliveries to the same destination; the resulting behavior + The default amount of delay that is inserted between individual + deliveries to the same destination; the resulting behavior depends on the value of the corresponding per-destination recip- ient limit. - transport_destination_rate_delay $default_destination_rate_delay - Idem, for delivery via the named message transport. + transport_destination_rate_delay ($default_destination_rate_delay) + A transport-specific override for the default_destina- + tion_rate_delay parameter value, where transport is the mas- + ter.cf name of the message delivery transport. Available in Postfix version 3.1 and later: default_transport_rate_delay (0s) - The default amount of delay that is inserted between individual - deliveries over the same message delivery transport, regardless + The default amount of delay that is inserted between individual + deliveries over the same message delivery transport, regardless of destination. - transport_transport_rate_delay $default_transport_rate_delay - Idem, for delivery via the named message transport. + transport_transport_rate_delay ($default_transport_rate_delay) + A transport-specific override for the default_trans- + port_rate_delay parameter value, where the initial transport in + the parameter name is the master.cf name of the message delivery + transport. SAFETY CONTROLS qmgr_daemon_timeout (1000s) @@ -359,6 +376,11 @@ After sending a "your message is delayed" notification, inform the sender when the delay clears up. + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + FILES /var/spool/postfix/incoming, incoming queue /var/spool/postfix/active, active queue diff -Nru postfix-3.2.5/html/pgsql_table.5.html postfix-3.3.0/html/pgsql_table.5.html --- postfix-3.2.5/html/pgsql_table.5.html 2016-12-31 18:48:22.000000000 +0000 +++ postfix-3.3.0/html/pgsql_table.5.html 2017-12-27 16:42:19.000000000 +0000 @@ -42,21 +42,18 @@ PGSQL PARAMETERS hosts The hosts that Postfix will try to connect to and query from. - Specify unix: for UNIX-domain sockets, inet: for TCP connections - (default). Example: + Besides a postgresql:// connection URI, this setting supports + the historical forms unix:/pathname for UNIX-domain sockets and + inet:host:port for TCP connections, where the unix: and inet: + prefixes are accepted and ignored for backwards compatibility. + Examples: + hosts = postgresql://username@example.com/tablename?sslmode=require hosts = host1.some.domain host2.some.domain:port hosts = unix:/file/name - The hosts are tried in random order, with all connections over - UNIX domain sockets being tried before those over TCP. The con- - nections are automatically closed after being idle for about 1 - minute, and are re-opened as necessary. - - NOTE: the unix: and inet: prefixes are accepted for backwards - compatibility reasons, but are actually ignored. The PostgreSQL - client library will always try to connect to an UNIX socket if - the name starts with a slash, and will try a TCP connection oth- - erwise. + The hosts are tried in random order. The connections are auto- + matically closed after being idle for about 1 minute, and are + re-opened as necessary. user, password The user name and password to log into the pgsql server. Exam- diff -Nru postfix-3.2.5/html/pickup.8.html postfix-3.3.0/html/pickup.8.html --- postfix-3.2.5/html/pickup.8.html 2016-09-17 14:50:57.000000000 +0000 +++ postfix-3.3.0/html/pickup.8.html 2018-01-14 16:48:37.000000000 +0000 @@ -92,6 +92,11 @@ A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + SEE ALSO cleanup(8), message canonicalization sendmail(1), Sendmail-compatible interface diff -Nru postfix-3.2.5/html/pipe.8.html postfix-3.3.0/html/pipe.8.html --- postfix-3.2.5/html/pipe.8.html 2017-01-14 21:33:36.000000000 +0000 +++ postfix-3.3.0/html/pipe.8.html 2018-01-14 16:48:37.000000000 +0000 @@ -381,26 +381,24 @@ RESOURCE AND RATE CONTROLS In the text below, transport is the first field in a master.cf entry. - transport_destination_concurrency_limit ($default_destination_concur- + transport_time_limit ($command_time_limit) + A transport-specific override for the command_time_limit parame- + ter value, where transport is the master.cf name of the message + delivery transport. + + Implemented in the qmgr(8) daemon: + + transport_destination_concurrency_limit ($default_destination_concur- rency_limit) - Limit the number of parallel deliveries to the same destination, - for delivery via the named transport. The limit is enforced by - the Postfix queue manager. + A transport-specific override for the default_destination_con- + currency_limit parameter value, where transport is the master.cf + name of the message delivery transport. - transport_destination_recipient_limit ($default_destination_recipi- + transport_destination_recipient_limit ($default_destination_recipi- ent_limit) - Limit the number of recipients per message delivery, for deliv- - ery via the named transport. The limit is enforced by the Post- - fix queue manager. - - transport_time_limit ($command_time_limit) - Limit the time for delivery to external command, for delivery - via the named transport. The limit is enforced by the pipe - delivery agent. - - Postfix 2.4 and later support a suffix that specifies the time - unit: s (seconds), m (minutes), h (hours), d (days), w (weeks). - The default time unit is seconds. + A transport-specific override for the default_destination_recip- + ient_limit parameter value, where transport is the master.cf + name of the message delivery transport. MISCELLANEOUS CONTROLS config_directory (see 'postconf -d' output) @@ -463,6 +461,16 @@ delivery status code or explanatory text of successful or unsuc- cessful deliveries. + Available in Postfix version 3.3 and later: + + enable_original_recipient (yes) + Enable support for the original recipient address after an + address is rewritten to a different address (for example with + aliasing or with canonical mapping). + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + SEE ALSO qmgr(8), queue manager bounce(8), delivery status reports diff -Nru postfix-3.2.5/html/postconf.5.html postfix-3.3.0/html/postconf.5.html --- postfix-3.2.5/html/postconf.5.html 2017-02-08 00:40:28.000000000 +0000 +++ postfix-3.3.0/html/postconf.5.html 2018-02-04 15:40:51.000000000 +0000 @@ -3203,22 +3203,39 @@

        enable_original_recipient (default: yes)
        -

        Enable support for the X-Original-To message header. This header -is needed for multi-recipient mailboxes.

        +

        Enable support for the original recipient address after an +address is rewritten to a different address (for example with +aliasing or with canonical mapping).

        -

        When this parameter is set to yes, the cleanup(8) daemon performs -duplicate elimination on distinct pairs of (original recipient, -rewritten recipient), and generates non-empty original recipient -queue file records.

        - -

        When this parameter is set to no, the cleanup(8) daemon performs -duplicate elimination on the rewritten recipient address only, and -generates empty original recipient queue file records.

        - -

        This feature is available in Postfix 2.1 and later. With Postfix -version 2.0, support for the X-Original-To message header is always turned -on. Postfix versions before 2.0 have no support for the X-Original-To -message header.

        +

        The original recipient address is used as follows:

        + +
        + +
        Final delivery
        With "enable_original_recipient = +yes", the original recipient address is stored in the X-Original-To +message header. This header may be used to distinguish between +different recipients that share the same mailbox.
        + +
        Recipient deduplication
        With "enable_original_recipient += yes", the cleanup(8) daemon performs duplicate recipient elimination +based on the content of (original recipient, maybe-rewritten +recipient) pairs. Otherwise, the cleanup(8) daemon performs duplicate +recipient elimination based only on the maybe-rewritten recipient +address.
        + +
        + +

        Note: with Postfix ≤ 3.2 the "setting enable_original_recipient += no" breaks address verification for addresses that are +aliased or otherwise rewritten (Postfix is unable to store the +address verification result under the original probe destination +address; instead, it can store the result only under the rewritten +address).

        + +

        This feature is available in Postfix 2.1 and later. Postfix +version 2.0 behaves as if this parameter is always set to yes. +Postfix versions before 2.0 have no support for the original recipient +address.

        @@ -3265,10 +3282,11 @@ (default: no)

        -When delivering to an alias "aliasname" that has an "owner-aliasname" -companion alias, set the envelope sender address to the expansion -of the "owner-aliasname" alias. Normally, Postfix sets the envelope -sender address to the name of the "owner-aliasname" alias. +When delivering to an alias "aliasname" that has an +"owner-aliasname" companion alias, set the envelope sender +address to the expansion of the "owner-aliasname" alias. +Normally, Postfix sets the envelope sender address to the name of +the "owner-aliasname" alias.

        @@ -3690,6 +3708,52 @@
        +
        header_from_format +(default: standard)
        + +

        The format of the Postfix-generated From: header. This +setting affects the appearance of 'full name' information when a +local program such as /bin/mail submits a message without From: +header through the Postfix sendmail(1) command.

        + +

        Specify one of the following:

        + +
        + +
        standard (default)
        Produce a header formatted +as "From: name <address>". +This is the default as of Postfix 3.3.
        + +
        obsolete
        Produce a header formatted as "From: +address (name)". This is the behavior +prior to Postfix 3.3.
        + +
        + +

        Notes:

        + +
          + +
        • Postfix generates the format "From: address" +when name information is unavailable or the envelope sender +address is empty. This is the same behavior as prior to Postfix +3.3.

          + +
        • In the standard form, the name will be quoted +if it contains specials as defined in RFC 5322, or the "!%" +address operators.

          + +
        • The Postfix sendmail(1) command gets name information +from the -F command-line option, from the NAME +environment variable, or from the UNIX password file.

          + +
        + +

        This feature is available in Postfix 3.3 and later.

        + + +
        +
        header_size_limit (default: 102400)
        @@ -4149,6 +4213,17 @@
        +
        lmtp_balance_inet_protocols +(default: yes)
        + +

        The LMTP-specific version of the smtp_balance_inet_protocols +configuration parameter. See there for details.

        + +

        This feature is available in Postfix 3.3 and later.

        + + +
        +
        lmtp_bind_address (default: empty)
        @@ -7380,10 +7455,10 @@ (default: yes)

        -Give special treatment to owner-listname and listname-request -address localparts: don't split such addresses when the -recipient_delimiter is set to "-". This feature is useful for -mailing lists. +Enable special treatment for owner-listname entries in the +aliases(5) file, and don't split owner-listname and +listname-request address localparts when the recipient_delimiter +is set to "-". This feature is useful for mailing lists.

        @@ -9595,7 +9670,8 @@ "yes".

        As documented in aliases(5), when an alias name has a -companion alias named owner-name, delivery errors will be +companion alias named owner-name, this will replace the +envelope sender address, so that delivery errors will be reported to the owner alias instead of the sender. This configuration is recommended for mailing lists.

        @@ -9625,7 +9701,9 @@

        Unfortunately, older Postfix releases reset the owner-alias attribute when delivering mail to a child alias that does not have -its own owner alias. The local(8) delivery agent then attempts to +its own owner alias. To be precise, this resets only the decision +to create a new queue file, not the decision to override the envelope +sender address. The local(8) delivery agent then attempts to deliver local addresses as soon as they come out of child alias expansion. If delivery to any address from child alias expansion fails with a temporary error condition, the entire mailing list may @@ -9957,6 +10035,34 @@

        +
        service_name +(read-only)
        + +

        The master.cf service name of a Postfix daemon process. This +can be used to distinguish the logging from different services that +use the same program name.

        + +

        Example master.cf entries:

        + +
        +# Distinguish inbound MTA logging from submission and smtps logging.
        +smtp      inet  n       -       n       -       -       smtpd
        +submission inet n       -       n       -       -       smtpd
        +    -o syslog_name=postfix/$service_name
        +smtps     inet  n       -       n       -       -       smtpd
        +    -o syslog_name=postfix/$service_name
        +
        + +
        +# Distinguish outbound MTA logging from inbound relay logging.
        +smtp      unix  -       -       n       -       -       smtp
        +relay     unix  -       -       n       -       -       smtp
        +    -o syslog_name=postfix/$service_name
        +
        + + +
        +
        service_throttle_time (default: 60s)
        @@ -10146,6 +10252,23 @@
        +
        smtp_balance_inet_protocols +(default: yes)
        + +

        When a remote destination resolves to a combination of IPv4 and +IPv6 addresses, ensure that the Postfix SMTP client can try both +address types before it runs into the smtp_mx_address_limit.

        + +

        This avoids an interoperability problem when a destination resolves +to primarily IPv6 addresses, the smtp_address_limit feature eliminates +most or all IPv4 addresses, and the destination is not reachable over +IPv6.

        + +

        This feature is available in Postfix 3.3 and later.

        + + +
        +
        smtp_bind_address (default: empty)
        @@ -12618,7 +12741,7 @@ authentication and DNSSEC support is available with Postfix 2.11 and later.
        -
        fingerprint
        +
        fingerprint
        Certificate fingerprint verification. Available with Postfix 2.5 and later. At this security level, there are no trusted Certification Authorities. The certificate @@ -12889,7 +13012,7 @@ (DANE) TLS authentication is available with Postfix 2.11 and later.
        -
        fingerprint
        +
        fingerprint
        Certificate fingerprint verification. At this security level, there are no trusted Certification Authorities. The certificate trust chain, expiration date, etc., are @@ -15230,8 +15353,9 @@ temporary problem (default: 450).
        The unverified_recipient_tempfail_action parameter specifies the action after address probe failure due to a temporary problem (default: -defer_if_permit).
        This feature is available in Postfix 2.1 -and later.
        +defer_if_permit).
        This feature breaks for aliased addresses +with "enable_original_recipient = no" (Postfix ≤ 3.2).
        +This feature is available in Postfix 2.1 and later. @@ -15974,8 +16098,10 @@ code when an address probe failed due to a temporary problem (default: 450).
        The unverified_sender_tempfail_action parameter specifies the action after address probe failure due to a temporary -problem (default: defer_if_permit).
        This feature is available -in Postfix 2.1 and later. +problem (default: defer_if_permit).
        This feature breaks for +aliased addresses with "enable_original_recipient = no" (Postfix +≤ 3.2).
        This feature is available in Postfix 2.1 and later. + diff -Nru postfix-3.2.5/html/postfix.1.html postfix-3.3.0/html/postfix.1.html --- postfix-3.2.5/html/postfix.1.html 2016-09-17 14:50:59.000000000 +0000 +++ postfix-3.3.0/html/postfix.1.html 2018-02-11 15:17:59.000000000 +0000 @@ -36,92 +36,102 @@ start Start the Postfix mail system. This also runs the configuration check described above. + start-fg + Like start, but keep the master daemon running in the fore- + ground. This requires that multi-instance support is disabled + (i.e. the multi_instance_directories parameter value must be + empty). When running Postfix inside a container, mount the con- + tainer host's /dev/log socket inside the container (example: + "docker run -v /dev/log:/dev/log ...") and specify a distinct + Postfix "syslog_name" prefix that identifies logging from the + Postfix instance. + stop Stop the Postfix mail system in an orderly fashion. If possible, - running processes are allowed to terminate at their earliest + running processes are allowed to terminate at their earliest convenience. - Note: in order to refresh the Postfix mail system after a con- - figuration change, do not use the start and stop commands in + Note: in order to refresh the Postfix mail system after a con- + figuration change, do not use the start and stop commands in succession. Use the reload command instead. - abort Stop the Postfix mail system abruptly. Running processes are + abort Stop the Postfix mail system abruptly. Running processes are signaled to stop immediately. flush Force delivery: attempt to deliver every message in the deferred mail queue. Normally, attempts to deliver delayed mail happen at - regular intervals, the interval doubling after each failed + regular intervals, the interval doubling after each failed attempt. - Warning: flushing undeliverable mail frequently will result in + Warning: flushing undeliverable mail frequently will result in poor delivery performance of all other mail. - reload Re-read configuration files. Running processes terminate at + reload Re-read configuration files. Running processes terminate at their earliest convenience. status Indicate if the Postfix mail system is currently running. set-permissions [name=value ...] - Set the ownership and permissions of Postfix related files and + Set the ownership and permissions of Postfix related files and directories, as specified in the postfix-files file. - Specify name=value to override and update specific main.cf con- - figuration parameters. Use this, for example, to change the - mail_owner or setgid_group setting for an already installed + Specify name=value to override and update specific main.cf con- + figuration parameters. Use this, for example, to change the + mail_owner or setgid_group setting for an already installed Postfix system. - This feature is available in Postfix 2.1 and later. With Post- - fix 2.0 and earlier, use "$config_directory/post-install + This feature is available in Postfix 2.1 and later. With Post- + fix 2.0 and earlier, use "$config_directory/post-install set-permissions". tls subcommand - Enable opportunistic TLS in the Postfix SMTP client or server, - and manage Postfix SMTP server TLS private keys and certifi- + Enable opportunistic TLS in the Postfix SMTP client or server, + and manage Postfix SMTP server TLS private keys and certifi- cates. See postfix-tls(1) for documentation. This feature is available in Postfix 3.1 and later. upgrade-configuration [name=value ...] - Update the main.cf and master.cf files with information that - Postfix needs in order to run: add or update services, and add + Update the main.cf and master.cf files with information that + Postfix needs in order to run: add or update services, and add or update configuration parameter settings. - Specify name=value to override and update specific main.cf con- + Specify name=value to override and update specific main.cf con- figuration parameters. - This feature is available in Postfix 2.1 and later. With Post- - fix 2.0 and earlier, use "$config_directory/post-install + This feature is available in Postfix 2.1 and later. With Post- + fix 2.0 and earlier, use "$config_directory/post-install upgrade-configuration". The following options are implemented: -c config_dir - Read the main.cf and master.cf configuration files in the named - directory instead of the default configuration directory. Use - this to distinguish between multiple Postfix instances on the + Read the main.cf and master.cf configuration files in the named + directory instead of the default configuration directory. Use + this to distinguish between multiple Postfix instances on the same host. - With Postfix 2.6 and later, this option forces the postfix(1) + With Postfix 2.6 and later, this option forces the postfix(1) command to operate on the specified Postfix instance only. This - behavior is inherited by postfix(1) commands that run as a + behavior is inherited by postfix(1) commands that run as a descendant of the current process. -D (with postfix start only) Run each Postfix daemon under control of a debugger as specified via the debugger_command configuration parameter. - -v Enable verbose logging for debugging purposes. Multiple -v + -v Enable verbose logging for debugging purposes. Multiple -v options make the software increasingly verbose. ENVIRONMENT - The postfix(1) command exports the following environment variables + The postfix(1) command exports the following environment variables before executing the postfix-script file: MAIL_CONFIG This is set when the -c command-line option is present. With Postfix 2.6 and later, this environment variable forces the - postfix(1) command to operate on the specified Postfix instance - only. This behavior is inherited by postfix(1) commands that + postfix(1) command to operate on the specified Postfix instance + only. This behavior is inherited by postfix(1) commands that run as a descendant of the current process. MAIL_VERBOSE @@ -135,7 +145,7 @@ ment variables with the same names: 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. command_directory (see 'postconf -d' output) @@ -145,22 +155,22 @@ The directory with Postfix support programs and daemon programs. html_directory (see 'postconf -d' output) - The location of Postfix HTML files that describe how to build, + The location of Postfix HTML files that describe how to build, configure or operate a specific Postfix subsystem or feature. 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. mailq_path (see 'postconf -d' output) - Sendmail compatibility feature that specifies where the Postfix + Sendmail compatibility feature that specifies where the Postfix mailq(1) command is installed. manpage_directory (see 'postconf -d' output) Where the Postfix manual pages are installed. newaliases_path (see 'postconf -d' output) - Sendmail compatibility feature that specifies the location of + Sendmail compatibility feature that specifies the location of the newaliases(1) command. queue_directory (see 'postconf -d' output) @@ -171,31 +181,31 @@ configure or operate a specific Postfix subsystem or feature. sendmail_path (see 'postconf -d' output) - A Sendmail compatibility feature that specifies the location of + A Sendmail compatibility feature that specifies the location of the Postfix sendmail(1) command. setgid_group (postdrop) - The group ownership of set-gid Postfix commands and of + The group ownership of set-gid Postfix commands and of group-writable Postfix directories. Available in Postfix version 2.5 and later: data_directory (see 'postconf -d' output) - The directory with Postfix-writable data files (for example: + The directory with Postfix-writable data files (for example: caches, pseudo-random numbers). Available in Postfix version 3.0 and later: meta_directory (see 'postconf -d' output) - The location of non-executable files that are shared among mul- - tiple Postfix instances, such as postfix-files, dynamicmaps.cf, - and the multi-instance template files main.cf.proto and mas- + The location of non-executable files that are shared among mul- + tiple Postfix instances, such as postfix-files, dynamicmaps.cf, + and the multi-instance template files main.cf.proto and mas- ter.cf.proto. shlib_directory (see 'postconf -d' output) - The location of Postfix dynamically-linked libraries (libpost- - fix-*.so), and the default location of Postfix database plugins - (postfix-*.so) that have a relative pathname in the dynam- + The location of Postfix dynamically-linked libraries (libpost- + fix-*.so), and the default location of Postfix database plugins + (postfix-*.so) that have a relative pathname in the dynam- icmaps.cf file. Available in Postfix version 3.1 and later: @@ -206,8 +216,9 @@ Other configuration parameters: import_environment (see 'postconf -d' output) - The list of environment parameters that a Postfix process will - import from a non-Postfix parent process. + The list of environment parameters that a privileged Postfix + process will import from a non-Postfix parent process, or + name=value environment overrides. syslog_facility (mail) The syslog facility of Postfix logging. diff -Nru postfix-3.2.5/html/postmulti.1.html postfix-3.3.0/html/postmulti.1.html --- postfix-3.2.5/html/postmulti.1.html 2017-05-02 23:29:10.000000000 +0000 +++ postfix-3.3.0/html/postmulti.1.html 2017-02-19 02:22:30.000000000 +0000 @@ -318,14 +318,15 @@ The directory with Postfix support programs and daemon programs. import_environment (see 'postconf -d' output) - The list of environment parameters that a Postfix process will - import from a non-Postfix parent process. + The list of environment parameters that a privileged Postfix + process will import from a non-Postfix parent process, or + name=value environment overrides. multi_instance_directories (empty) - An optional list of non-default Postfix configuration directo- - ries; these directories belong to additional Postfix instances - that share the Postfix executable files and documentation with - the default Postfix instance, and that are started, stopped, + An optional list of non-default Postfix configuration directo- + ries; these directories belong to additional Postfix instances + that share the Postfix executable files and documentation with + the default Postfix instance, and that are started, stopped, etc., together with the default Postfix instance. multi_instance_group (empty) @@ -335,40 +336,40 @@ The optional instance name of this Postfix instance. multi_instance_enable (no) - Allow this Postfix instance to be started, stopped, etc., by a + Allow this Postfix instance to be started, stopped, etc., by a multi-instance manager. postmulti_start_commands (start) - The postfix(1) commands that the postmulti(1) instance manager + The postfix(1) commands that the postmulti(1) instance manager treats as "start" commands. postmulti_stop_commands (see 'postconf -d' output) - The postfix(1) commands that the postmulti(1) instance manager + The postfix(1) commands that the postmulti(1) instance manager treats as "stop" commands. postmulti_control_commands (reload flush) - The postfix(1) commands that the postmulti(1) instance manager + The postfix(1) commands that the postmulti(1) instance manager treats as "control" commands, that operate on running instances. 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 3.0 and later: meta_directory (see 'postconf -d' output) - The location of non-executable files that are shared among mul- - tiple Postfix instances, such as postfix-files, dynamicmaps.cf, - and the multi-instance template files main.cf.proto and mas- + The location of non-executable files that are shared among mul- + tiple Postfix instances, such as postfix-files, dynamicmaps.cf, + and the multi-instance template files main.cf.proto and mas- ter.cf.proto. shlib_directory (see 'postconf -d' output) - The location of Postfix dynamically-linked libraries (libpost- - fix-*.so), and the default location of Postfix database plugins - (postfix-*.so) that have a relative pathname in the dynam- + The location of Postfix dynamically-linked libraries (libpost- + fix-*.so), and the default location of Postfix database plugins + (postfix-*.so) that have a relative pathname in the dynam- icmaps.cf file. FILES diff -Nru postfix-3.2.5/html/postqueue.1.html postfix-3.3.0/html/postqueue.1.html --- postfix-3.2.5/html/postqueue.1.html 2017-01-29 20:10:55.000000000 +0000 +++ postfix-3.3.0/html/postqueue.1.html 2018-01-14 15:17:34.000000000 +0000 @@ -169,7 +169,7 @@ alternate_config_directories (empty) A list of non-default Postfix configuration directories that may be specified with "-c config_directory" on the command line (in - the case of sendmail(1), with "-C config_directory"), or via the + the case of sendmail(1), with the "-C" option), or via the MAIL_CONFIG environment parameter. config_directory (see 'postconf -d' output) @@ -184,8 +184,9 @@ tion logfiles with mail that is queued to those destinations. import_environment (see 'postconf -d' output) - The list of environment parameters that a Postfix process will - import from a non-Postfix parent process. + The list of environment parameters that a privileged Postfix + process will import from a non-Postfix parent process, or + name=value environment overrides. queue_directory (see 'postconf -d' output) The location of the Postfix top-level queue directory. @@ -194,11 +195,11 @@ 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". trigger_timeout (10s) - The time limit for sending a trigger to a Postfix daemon (for + The time limit for sending a trigger to a Postfix daemon (for example, the pickup(8) or qmgr(8) daemon). Available in Postfix version 2.2 and later: diff -Nru postfix-3.2.5/html/postscreen.8.html postfix-3.3.0/html/postscreen.8.html --- postfix-3.2.5/html/postscreen.8.html 2016-09-17 14:50:59.000000000 +0000 +++ postfix-3.3.0/html/postscreen.8.html 2018-01-14 16:48:39.000000000 +0000 @@ -397,6 +397,11 @@ A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + SEE ALSO smtpd(8), Postfix SMTP server tlsproxy(8), Postfix TLS proxy server diff -Nru postfix-3.2.5/html/proxymap.8.html postfix-3.3.0/html/proxymap.8.html --- postfix-3.2.5/html/proxymap.8.html 2016-02-14 01:32:49.000000000 +0000 +++ postfix-3.3.0/html/proxymap.8.html 2018-01-14 16:48:38.000000000 +0000 @@ -189,6 +189,11 @@ The lookup tables that the proxymap(8) server is allowed to access for the read-write service. + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + SEE ALSO postconf(5), configuration parameters master(5), generic daemon options diff -Nru postfix-3.2.5/html/qmgr.8.html postfix-3.3.0/html/qmgr.8.html --- postfix-3.2.5/html/qmgr.8.html 2016-09-17 14:50:58.000000000 +0000 +++ postfix-3.3.0/html/qmgr.8.html 2018-01-14 16:48:37.000000000 +0000 @@ -204,15 +204,19 @@ The default per-transport upper limit on the number of in-memory recipients. - transport_recipient_limit ($default_recipient_limit) - Idem, for delivery via the named message transport. + transport_recipient_limit ($default_recipient_limit) + A transport-specific override for the default_recipient_limit + parameter value, where transport is the master.cf name of the + message delivery transport. default_extra_recipient_limit (1000) The default value for the extra per-transport limit imposed on the number of in-memory recipients. - transport_extra_recipient_limit ($default_extra_recipient_limit) - Idem, for delivery via the named message transport. + transport_extra_recipient_limit ($default_extra_recipient_limit) + A transport-specific override for the default_extra_recipi- + ent_limit parameter value, where transport is the master.cf name + of the message delivery transport. Available in Postfix version 2.4 and later: @@ -220,15 +224,19 @@ The default per-transport limit on the number of recipients refilled at once. - transport_recipient_refill_limit ($default_recipient_refill_limit) - Idem, for delivery via the named message transport. + transport_recipient_refill_limit ($default_recipient_refill_limit) + A transport-specific override for the default_recipi- + ent_refill_limit parameter value, where transport is the mas- + ter.cf name of the message delivery transport. default_recipient_refill_delay (5s) The default per-transport maximum delay between recipients refills. - transport_recipient_refill_delay ($default_recipient_refill_delay) - Idem, for delivery via the named message transport. + transport_recipient_refill_delay ($default_recipient_refill_delay) + A transport-specific override for the default_recipi- + ent_refill_delay parameter value, where transport is the mas- + ter.cf name of the message delivery transport. DELIVERY CONCURRENCY CONTROLS initial_destination_concurrency (5) @@ -239,84 +247,103 @@ The default maximal number of parallel deliveries to the same destination. - transport_destination_concurrency_limit ($default_destination_concur- + transport_destination_concurrency_limit ($default_destination_concur- rency_limit) - Idem, for delivery via the named message transport. + A transport-specific override for the default_destination_con- + currency_limit parameter value, where transport is the master.cf + name of the message delivery transport. Available in Postfix version 2.5 and later: - transport_initial_destination_concurrency ($initial_destination_concur- + transport_initial_destination_concurrency ($initial_destination_concur- rency) - Initial concurrency for delivery via the named message trans- - port. + A transport-specific override for the initial_destination_con- + currency parameter value, where transport is the master.cf name + of the message delivery transport. default_destination_concurrency_failed_cohort_limit (1) - How many pseudo-cohorts must suffer connection or handshake - failure before a specific destination is considered unavailable + How many pseudo-cohorts must suffer connection or handshake + failure before a specific destination is considered unavailable (and further delivery is suspended). - transport_destination_concurrency_failed_cohort_limit ($default_desti- + transport_destination_concurrency_failed_cohort_limit ($default_desti- nation_concurrency_failed_cohort_limit) - Idem, for delivery via the named message transport. + A transport-specific override for the default_destination_con- + currency_failed_cohort_limit parameter value, where transport is + the master.cf name of the message delivery transport. default_destination_concurrency_negative_feedback (1) - The per-destination amount of delivery concurrency negative - feedback, after a delivery completes with a connection or hand- + The per-destination amount of delivery concurrency negative + feedback, after a delivery completes with a connection or hand- shake failure. - transport_destination_concurrency_negative_feedback ($default_destina- + transport_destination_concurrency_negative_feedback ($default_destina- tion_concurrency_negative_feedback) - Idem, for delivery via the named message transport. + A transport-specific override for the default_destination_con- + currency_negative_feedback parameter value, where transport is + the master.cf name of the message delivery transport. default_destination_concurrency_positive_feedback (1) - The per-destination amount of delivery concurrency positive + The per-destination amount of delivery concurrency positive feedback, after a delivery completes without connection or hand- shake failure. - transport_destination_concurrency_positive_feedback ($default_destina- + transport_destination_concurrency_positive_feedback ($default_destina- tion_concurrency_positive_feedback) - Idem, for delivery via the named message transport. + A transport-specific override for the default_destination_con- + currency_positive_feedback parameter value, where transport is + the master.cf name of the message delivery transport. destination_concurrency_feedback_debug (no) - Make the queue manager's feedback algorithm verbose for perfor- + Make the queue manager's feedback algorithm verbose for perfor- mance analysis purposes. RECIPIENT SCHEDULING CONTROLS default_destination_recipient_limit (50) The default maximal number of recipients per message delivery. - transport_destination_recipient_limit ($default_destination_recipi- + transport_destination_recipient_limit ($default_destination_recipi- ent_limit) - Idem, for delivery via the named message transport. + A transport-specific override for the default_destination_recip- + ient_limit parameter value, where transport is the master.cf + name of the message delivery transport. MESSAGE SCHEDULING CONTROLS default_delivery_slot_cost (5) - How often the Postfix queue manager's scheduler is allowed to + How often the Postfix queue manager's scheduler is allowed to preempt delivery of one message with another. - transport_delivery_slot_cost ($default_delivery_slot_cost) - Idem, for delivery via the named message transport. + transport_delivery_slot_cost ($default_delivery_slot_cost) + A transport-specific override for the default_delivery_slot_cost + parameter value, where transport is the master.cf name of the + message delivery transport. default_minimum_delivery_slots (3) - How many recipients a message must have in order to invoke the + How many recipients a message must have in order to invoke the Postfix queue manager's scheduling algorithm at all. - transport_minimum_delivery_slots ($default_minimum_delivery_slots) - Idem, for delivery via the named message transport. + transport_minimum_delivery_slots ($default_minimum_delivery_slots) + A transport-specific override for the default_minimum_deliv- + ery_slots parameter value, where transport is the master.cf name + of the message delivery transport. default_delivery_slot_discount (50) The default value for transport-specific _delivery_slot_discount settings. - transport_delivery_slot_discount ($default_delivery_slot_discount) - Idem, for delivery via the named message transport. + transport_delivery_slot_discount ($default_delivery_slot_discount) + A transport-specific override for the default_delivery_slot_dis- + count parameter value, where transport is the master.cf name of + the message delivery transport. default_delivery_slot_loan (3) - The default value for transport-specific _delivery_slot_loan + The default value for transport-specific _delivery_slot_loan settings. - transport_delivery_slot_loan ($default_delivery_slot_loan) - Idem, for delivery via the named message transport. + transport_delivery_slot_loan ($default_delivery_slot_loan) + A transport-specific override for the default_delivery_slot_loan + parameter value, where transport is the master.cf name of the + message delivery transport. OTHER RESOURCE AND RATE CONTROLS minimal_backoff_time (300s) @@ -327,45 +354,50 @@ The maximal time between attempts to deliver a deferred message. maximal_queue_lifetime (5d) - Consider a message as undeliverable, when delivery fails with a + Consider a message as undeliverable, when delivery fails with a temporary error, and the time in the queue has reached the maxi- mal_queue_lifetime limit. queue_run_delay (300s) - The time between deferred queue scans by the queue manager; + The time between deferred queue scans by the queue manager; prior to Postfix 2.4 the default value was 1000s. transport_retry_time (60s) - The time between attempts by the Postfix queue manager to con- + The time between attempts by the Postfix queue manager to con- tact a malfunctioning message delivery transport. Available in Postfix version 2.1 and later: bounce_queue_lifetime (5d) - Consider a bounce message as undeliverable, when delivery fails - with a temporary error, and the time in the queue has reached + Consider a bounce message as undeliverable, when delivery fails + with a temporary error, and the time in the queue has reached the bounce_queue_lifetime limit. Available in Postfix version 2.5 and later: default_destination_rate_delay (0s) - The default amount of delay that is inserted between individual - deliveries to the same destination; the resulting behavior + The default amount of delay that is inserted between individual + deliveries to the same destination; the resulting behavior depends on the value of the corresponding per-destination recip- ient limit. - transport_destination_rate_delay $default_destination_rate_delay - Idem, for delivery via the named message transport. + transport_destination_rate_delay ($default_destination_rate_delay) + A transport-specific override for the default_destina- + tion_rate_delay parameter value, where transport is the mas- + ter.cf name of the message delivery transport. Available in Postfix version 3.1 and later: default_transport_rate_delay (0s) - The default amount of delay that is inserted between individual - deliveries over the same message delivery transport, regardless + The default amount of delay that is inserted between individual + deliveries over the same message delivery transport, regardless of destination. - transport_transport_rate_delay $default_transport_rate_delay - Idem, for delivery via the named message transport. + transport_transport_rate_delay ($default_transport_rate_delay) + A transport-specific override for the default_trans- + port_rate_delay parameter value, where the initial transport in + the parameter name is the master.cf name of the message delivery + transport. SAFETY CONTROLS qmgr_daemon_timeout (1000s) @@ -421,6 +453,11 @@ After sending a "your message is delayed" notification, inform the sender when the delay clears up. + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + FILES /var/spool/postfix/incoming, incoming queue /var/spool/postfix/active, active queue diff -Nru postfix-3.2.5/html/qmqpd.8.html postfix-3.3.0/html/qmqpd.8.html --- postfix-3.2.5/html/qmqpd.8.html 2016-11-05 12:01:04.000000000 +0000 +++ postfix-3.3.0/html/qmqpd.8.html 2018-01-14 16:48:38.000000000 +0000 @@ -160,6 +160,11 @@ Enable logging of the remote QMQP client port in addition to the hostname and IP address. + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + SEE ALSO http://cr.yp.to/proto/qmqp.html, QMQP protocol cleanup(8), message canonicalization diff -Nru postfix-3.2.5/html/SASL_README.html postfix-3.3.0/html/SASL_README.html --- postfix-3.2.5/html/SASL_README.html 2015-07-26 13:48:24.000000000 +0000 +++ postfix-3.3.0/html/SASL_README.html 2017-03-01 00:53:07.000000000 +0000 @@ -15,15 +15,6 @@
        -

        Warning

        - -

        People who go to the trouble of installing Postfix may have the -expectation that Postfix is more secure than some other mailers. -The Cyrus SASL library contains a lot of code. With this, Postfix -becomes as secure as other mail systems that use the Cyrus SASL -library. Dovecot provides an alternative that may be worth -considering.

        -

        How Postfix uses SASL authentication

        SMTP servers need to decide whether an SMTP client is authorized @@ -47,6 +38,13 @@ implementation that Postfix will use. This document covers both the Postfix and non-Postfix configuration.

        +

        NOTE: People who go to the trouble of installing Postfix may +have the expectation that Postfix is more secure than some other +mailers. The Cyrus SASL library contains a lot of code. With this, +Postfix becomes as secure as other mail systems that use the Cyrus +SASL library. Dovecot provides an alternative that may be worth +considering.

        +

        You can read more about the following topics:

          diff -Nru postfix-3.2.5/html/scache.8.html postfix-3.3.0/html/scache.8.html --- postfix-3.2.5/html/scache.8.html 2016-09-17 14:50:59.000000000 +0000 +++ postfix-3.3.0/html/scache.8.html 2018-01-14 16:48:38.000000000 +0000 @@ -129,6 +129,11 @@ A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + SEE ALSO smtp(8), SMTP client postconf(5), configuration parameters diff -Nru postfix-3.2.5/html/sendmail.1.html postfix-3.3.0/html/sendmail.1.html --- postfix-3.2.5/html/sendmail.1.html 2017-02-06 00:05:04.000000000 +0000 +++ postfix-3.3.0/html/sendmail.1.html 2017-10-28 12:13:42.000000000 +0000 @@ -434,7 +434,7 @@ alternate_config_directories (empty) A list of non-default Postfix configuration directories that may be specified with "-c config_directory" on the command line (in - the case of sendmail(1), with "-C config_directory"), or via the + the case of sendmail(1), with the "-C" option), or via the MAIL_CONFIG environment parameter. multi_instance_directories (empty) diff -Nru postfix-3.2.5/html/showq.8.html postfix-3.3.0/html/showq.8.html --- postfix-3.2.5/html/showq.8.html 2016-09-17 14:50:58.000000000 +0000 +++ postfix-3.3.0/html/showq.8.html 2018-01-14 16:48:37.000000000 +0000 @@ -90,6 +90,11 @@ enable_long_queue_ids (no) Enable long, non-repeating, queue IDs (queue file names). + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + FILES /var/spool/postfix, queue directories diff -Nru postfix-3.2.5/html/smtp.8.html postfix-3.3.0/html/smtp.8.html --- postfix-3.2.5/html/smtp.8.html 2016-12-04 20:55:06.000000000 +0000 +++ postfix-3.3.0/html/smtp.8.html 2018-01-14 16:48:37.000000000 +0000 @@ -303,6 +303,13 @@ smtp_dns_reply_filter (empty) Optional filter for Postfix SMTP client DNS lookup results. + Available in Postfix version 3.3 and later: + + smtp_balance_inet_protocols (yes) + When a remote destination resolves to a combination of IPv4 and + IPv6 addresses, ensure that the Postfix SMTP client can try both + address types before it runs into the smtp_mx_address_limit. + MIME PROCESSING CONTROLS Available in Postfix version 2.0 and later: @@ -594,15 +601,6 @@ cipher list. RESOURCE AND RATE CONTROLS - smtp_destination_concurrency_limit ($default_destination_concur- - rency_limit) - The maximal number of parallel deliveries to the same destina- - tion via the smtp message delivery transport. - - smtp_destination_recipient_limit ($default_destination_recipient_limit) - The maximal number of recipients per message for the smtp mes- - sage delivery transport. - smtp_connect_timeout (30s) The Postfix SMTP client time limit for completing a TCP connec- tion, or zero (use the operating system built-in time limit). @@ -706,6 +704,20 @@ that an SMTP session may be reused before it is closed, or zero (no limit). + Implemented in the qmgr(8) daemon: + + transport_destination_concurrency_limit ($default_destination_concur- + rency_limit) + A transport-specific override for the default_destination_con- + currency_limit parameter value, where transport is the master.cf + name of the message delivery transport. + + transport_destination_recipient_limit ($default_destination_recipi- + ent_limit) + A transport-specific override for the default_destination_recip- + ient_limit parameter value, where transport is the master.cf + name of the message delivery transport. + SMTPUTF8 CONTROLS Preliminary SMTPUTF8 support is introduced with Postfix 3.0. @@ -867,6 +879,11 @@ smtp_tcp_port (smtp) The default TCP port that the Postfix SMTP client connects to. + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + SEE ALSO generic(5), output address rewriting header_checks(5), message header content inspection diff -Nru postfix-3.2.5/html/smtpd.8.html postfix-3.3.0/html/smtpd.8.html --- postfix-3.2.5/html/smtpd.8.html 2017-05-02 23:24:44.000000000 +0000 +++ postfix-3.3.0/html/smtpd.8.html 2018-01-14 16:48:38.000000000 +0000 @@ -1279,6 +1279,11 @@ Enable logging of the remote SMTP client port in addition to the hostname and IP address. + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + SEE ALSO anvil(8), connection/rate limiting cleanup(8), message canonicalization diff -Nru postfix-3.2.5/html/socketmap_table.5.html postfix-3.3.0/html/socketmap_table.5.html --- postfix-3.2.5/html/socketmap_table.5.html 2016-02-14 01:39:27.000000000 +0000 +++ postfix-3.3.0/html/socketmap_table.5.html 2018-01-28 16:18:00.000000000 +0000 @@ -27,8 +27,8 @@ PROTOCOL Socketmaps use a simple protocol: the client sends one request, and the - server sends one reply. Each request and reply are sent as one net- - string object. + server sends one reply. Each request and each reply are sent as one + netstring object. REQUEST FORMAT The socketmap protocol supports only the lookup request. The request diff -Nru postfix-3.2.5/html/spawn.8.html postfix-3.3.0/html/spawn.8.html --- postfix-3.2.5/html/spawn.8.html 2016-09-17 14:50:58.000000000 +0000 +++ postfix-3.3.0/html/spawn.8.html 2018-01-14 16:48:38.000000000 +0000 @@ -71,37 +71,34 @@ master.cf file. RESOURCE AND RATE CONTROL - transport_time_limit ($command_time_limit) - The amount of time the command is allowed to run before it is - terminated. - - Postfix 2.4 and later support a suffix that specifies the time - unit: s (seconds), m (minutes), h (hours), d (days), w (weeks). - The default time unit is seconds. + transport_time_limit ($command_time_limit) + A transport-specific override for the command_time_limit parame- + ter value, where transport is the master.cf name of the message + delivery transport. MISCELLANEOUS 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. export_environment (see 'postconf -d' output) - The list of environment variables that a Postfix process will + The list of environment variables that a Postfix process will export to non-Postfix processes. 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_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) @@ -121,9 +118,14 @@ 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 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + SEE ALSO postconf(5), configuration parameters master(8), process manager diff -Nru postfix-3.2.5/html/tcp_table.5.html postfix-3.3.0/html/tcp_table.5.html --- postfix-3.2.5/html/tcp_table.5.html 2016-02-14 01:39:27.000000000 +0000 +++ postfix-3.3.0/html/tcp_table.5.html 2018-01-28 16:13:35.000000000 +0000 @@ -34,14 +34,17 @@ Send and receive operations must complete in 100 seconds. REQUEST FORMAT - Each request specifies a command, a lookup key, and possibly a lookup - result. + The tcp_table protocol supports only the lookup request. The request + has the following form: get SPACE key NEWLINE Look up data under the specified key. - put SPACE key SPACE value NEWLINE - This request is currently not implemented. + Postfix will not generate partial search keys such as domain names + without one or more subdomains, network addresses without one or more + least-significant octets, or email addresses without the localpart, + address extension or domain portion. This behavior is also found with + cidr:, pcre:, and regexp: tables. REPLY FORMAT Each reply specifies a status code and text. Replies must be no longer @@ -49,8 +52,7 @@ 500 SPACE text NEWLINE In case of a lookup request, the requested data does not exist. - In case of an update request, the request was rejected. The - text describes the nature of the problem. + The text describes the nature of the problem. 400 SPACE text NEWLINE This indicates an error condition. The text describes the nature @@ -61,24 +63,24 @@ text contains an encoded version of the requested data. ENCODING - In request and reply parameters, the character %, each non-printing + In request and reply parameters, the character %, each non-printing character, and each whitespace character must be replaced by %XX, where XX is the corresponding ASCII hexadecimal character value. The hexadec- imal codes can be specified in any case (upper, lower, mixed). - The Postfix client always encodes a request. The server may omit the - encoding as long as the reply is guaranteed to not contain the % or + The Postfix client always encodes a request. The server may omit the + encoding as long as the reply is guaranteed to not contain the % or NEWLINE character. SECURITY - Do not use TCP lookup tables for security critical purposes. The + Do not use TCP lookup tables for security critical purposes. The client-server connection is not protected and the server is not authen- ticated. BUGS Only the lookup method is currently implemented. - The client does not hang up when the connection is idle for a long + The client does not hang up when the connection is idle for a long time. SEE ALSO diff -Nru postfix-3.2.5/html/tlsmgr.8.html postfix-3.3.0/html/tlsmgr.8.html --- postfix-3.2.5/html/tlsmgr.8.html 2016-09-17 14:50:59.000000000 +0000 +++ postfix-3.3.0/html/tlsmgr.8.html 2018-01-14 16:48:39.000000000 +0000 @@ -149,6 +149,11 @@ A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + SEE ALSO smtp(8), Postfix SMTP client smtpd(8), Postfix SMTP server diff -Nru postfix-3.2.5/html/tlsproxy.8.html postfix-3.3.0/html/tlsproxy.8.html --- postfix-3.2.5/html/tlsproxy.8.html 2017-05-02 23:24:44.000000000 +0000 +++ postfix-3.3.0/html/tlsproxy.8.html 2018-01-14 16:48:39.000000000 +0000 @@ -194,6 +194,11 @@ A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + SEE ALSO postscreen(8), Postfix zombie blocker smtpd(8), Postfix SMTP server diff -Nru postfix-3.2.5/html/TLS_README.html postfix-3.3.0/html/TLS_README.html --- postfix-3.2.5/html/TLS_README.html 2016-12-17 23:22:21.000000000 +0000 +++ postfix-3.3.0/html/TLS_README.html 2017-03-01 00:55:20.000000000 +0000 @@ -18,15 +18,6 @@
          -

          WARNING

          - -

          By turning on TLS support in Postfix, you not only get the -ability to encrypt mail and to authenticate remote SMTP clients or servers. -You also turn on thousands and thousands of lines of OpenSSL library -code. Assuming that OpenSSL is written as carefully as Wietse's -own code, every 1000 lines introduce one additional bug into -Postfix.

          -

          What Postfix TLS support does for you

          Transport Layer Security (TLS, formerly called SSL) provides @@ -34,13 +25,12 @@ encrypted session protects the information that is transmitted with SMTP mail or with SASL authentication.

          -

          NOTE: This document describes a TLS -user interface that was introduced with Postfix version 2.3. Support -for an older user interface is documented in TLS_LEGACY_README, -which also describes the differences between Postfix and the -third-party patch on which Postfix version 2.2 TLS support was -based.

          +

          NOTE: By turning on TLS support in Postfix, you not only get +the ability to encrypt mail and to authenticate remote SMTP clients +or servers. You also turn on hundreds of thousands of lines of +OpenSSL library code. Assuming that OpenSSL is written as carefully +as Wietse's own code, every 1000 lines introduce one additional bug +into Postfix.

          Topics covered in this document:

          diff -Nru postfix-3.2.5/html/trace.8.html postfix-3.3.0/html/trace.8.html --- postfix-3.2.5/html/trace.8.html 2016-09-17 14:50:57.000000000 +0000 +++ postfix-3.3.0/html/trace.8.html 2018-01-14 16:48:36.000000000 +0000 @@ -148,6 +148,11 @@ Detect that a message requires SMTPUTF8 support for the speci- fied mail origin classes. + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + FILES /var/spool/postfix/bounce/* non-delivery records /var/spool/postfix/defer/* non-delivery records diff -Nru postfix-3.2.5/html/trivial-rewrite.8.html postfix-3.3.0/html/trivial-rewrite.8.html --- postfix-3.2.5/html/trivial-rewrite.8.html 2016-09-17 14:50:58.000000000 +0000 +++ postfix-3.3.0/html/trivial-rewrite.8.html 2018-01-14 16:48:38.000000000 +0000 @@ -298,6 +298,11 @@ Log warnings about problematic configuration settings, and pro- vide helpful suggestions. + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + SEE ALSO postconf(5), configuration parameters transport(5), transport table format diff -Nru postfix-3.2.5/html/verify.8.html postfix-3.3.0/html/verify.8.html --- postfix-3.2.5/html/verify.8.html 2016-11-05 12:01:04.000000000 +0000 +++ postfix-3.3.0/html/verify.8.html 2018-01-14 16:48:38.000000000 +0000 @@ -205,6 +205,11 @@ A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". + Available in Postfix 3.3 and later: + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + SEE ALSO smtpd(8), Postfix SMTP server cleanup(8), enqueue Postfix message diff -Nru postfix-3.2.5/html/virtual.8.html postfix-3.3.0/html/virtual.8.html --- postfix-3.2.5/html/virtual.8.html 2016-09-17 14:50:58.000000000 +0000 +++ postfix-3.3.0/html/virtual.8.html 2018-01-14 16:48:38.000000000 +0000 @@ -205,20 +205,22 @@ removed. RESOURCE AND RATE CONTROLS + virtual_mailbox_limit (51200000) + The maximal size in bytes of an individual virtual(8) mailbox or + maildir file, or zero (no limit). + + Implemented in the qmgr(8) daemon: + virtual_destination_concurrency_limit ($default_destination_concur- rency_limit) - The maximal number of parallel deliveries to the same destina- + The maximal number of parallel deliveries to the same destina- tion via the virtual message delivery transport. virtual_destination_recipient_limit ($default_destination_recipi- ent_limit) - The maximal number of recipients per message for the virtual + The maximal number of recipients per message for the virtual message delivery transport. - virtual_mailbox_limit (51200000) - The maximal size in bytes of an individual virtual(8) mailbox or - maildir file, or zero (no limit). - MISCELLANEOUS CONTROLS config_directory (see 'postconf -d' output) The default location of the Postfix main.cf and master.cf con- @@ -267,6 +269,16 @@ delivery status code or explanatory text of successful or unsuc- cessful deliveries. + Available in Postfix version 3.3 and later: + + enable_original_recipient (yes) + Enable support for the original recipient address after an + address is rewritten to a different address (for example with + aliasing or with canonical mapping). + + service_name (read-only) + The master.cf service name of a Postfix daemon process. + SEE ALSO qmgr(8), queue manager bounce(8), delivery status reports diff -Nru postfix-3.2.5/makedefs postfix-3.3.0/makedefs --- postfix-3.2.5/makedefs 2017-02-12 15:32:10.000000000 +0000 +++ postfix-3.3.0/makedefs 2018-02-03 17:20:46.000000000 +0000 @@ -1,5 +1,8 @@ #!/bin/sh +# To view the formatted manual page of this file, type: +# POSTFIXSOURCE/mantools/srctoman - makedefs | nroff -man + #++ # NAME # makedefs 1 diff -Nru postfix-3.2.5/man/Makefile.in postfix-3.3.0/man/Makefile.in --- postfix-3.2.5/man/Makefile.in 2016-02-06 23:25:06.000000000 +0000 +++ postfix-3.3.0/man/Makefile.in 2017-12-10 00:58:15.000000000 +0000 @@ -253,69 +253,111 @@ echo .so man1/sendmail.1 >$@ man5/access.5: ../proto/access + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/aliases.5: ../proto/aliases + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/bounce.5: ../proto/bounce + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/canonical.5: ../proto/canonical + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/cidr_table.5: ../proto/cidr_table + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/generic.5: ../proto/generic + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/header_checks.5: ../proto/header_checks + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/body_checks.5: ../proto/header_checks echo .so man5/header_checks.5 >$@ man5/ldap_table.5: ../proto/ldap_table + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/lmdb_table.5: ../proto/lmdb_table + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/master.5: ../proto/master + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/memcache_table.5: ../proto/memcache_table + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/mysql_table.5: ../proto/mysql_table + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/socketmap_table.5: ../proto/socketmap_table + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/sqlite_table.5: ../proto/sqlite_table + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/nisplus_table.5: ../proto/nisplus_table + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/pcre_table.5: ../proto/pcre_table + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/pgsql_table.5: ../proto/pgsql_table + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/regexp_table.5: ../proto/regexp_table + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/relocated.5: ../proto/relocated + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/transport.5: ../proto/transport + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/virtual.5: ../proto/virtual + ../mantools/fixman ../proto/postconf.proto $? >junk && \ + (cmp -s junk $? || mv junk $?) && rm -f junk ../mantools/srctoman - $? >$@ man5/postfix-wrapper.5: ../proto/postfix-wrapper diff -Nru postfix-3.2.5/man/man1/postfix.1 postfix-3.3.0/man/man1/postfix.1 --- postfix-3.2.5/man/man1/postfix.1 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/man/man1/postfix.1 2018-02-11 15:17:59.000000000 +0000 @@ -37,6 +37,15 @@ .IP \fBstart\fR Start the Postfix mail system. This also runs the configuration check described above. +.IP \fBstart\-fg\fR +Like \fBstart\fR, but keep the master daemon running in the +foreground. This requires that multi\-instance support is +disabled (i.e. the multi_instance_directories parameter +value must be empty). When running Postfix inside a container, +mount the container host's /dev/log socket inside the +container (example: "docker run \-v /dev/log:/dev/log ...") +and specify a distinct Postfix "syslog_name" prefix that +identifies logging from the Postfix instance. .IP \fBstop\fR Stop the Postfix mail system in an orderly fashion. If possible, running processes are allowed to terminate at @@ -187,8 +196,9 @@ .PP Other configuration parameters: .IP "\fBimport_environment (see 'postconf -d' output)\fR" -The list of environment parameters that a Postfix process will -import from a non\-Postfix parent process. +The list of environment parameters that a privileged Postfix +process will import from a non\-Postfix parent process, or name=value +environment overrides. .IP "\fBsyslog_facility (mail)\fR" The syslog facility of Postfix logging. .IP "\fBsyslog_name (see 'postconf -d' output)\fR" diff -Nru postfix-3.2.5/man/man1/postmulti.1 postfix-3.3.0/man/man1/postmulti.1 --- postfix-3.2.5/man/man1/postmulti.1 2017-05-02 23:29:10.000000000 +0000 +++ postfix-3.3.0/man/man1/postmulti.1 2017-02-19 02:22:29.000000000 +0000 @@ -342,8 +342,9 @@ .IP "\fBdaemon_directory (see 'postconf -d' output)\fR" The directory with Postfix support programs and daemon programs. .IP "\fBimport_environment (see 'postconf -d' output)\fR" -The list of environment parameters that a Postfix process will -import from a non\-Postfix parent process. +The list of environment parameters that a privileged Postfix +process will import from a non\-Postfix parent process, or name=value +environment overrides. .IP "\fBmulti_instance_directories (empty)\fR" An optional list of non\-default Postfix configuration directories; these directories belong to additional Postfix instances that share diff -Nru postfix-3.2.5/man/man1/postqueue.1 postfix-3.3.0/man/man1/postqueue.1 --- postfix-3.2.5/man/man1/postqueue.1 2017-01-29 20:10:55.000000000 +0000 +++ postfix-3.3.0/man/man1/postqueue.1 2018-01-14 15:17:31.000000000 +0000 @@ -181,7 +181,7 @@ .IP "\fBalternate_config_directories (empty)\fR" A list of non\-default Postfix configuration directories that may be specified with "\-c config_directory" on the command line (in the -case of \fBsendmail\fR(1), with "\-C config_directory"), or via the MAIL_CONFIG +case of \fBsendmail\fR(1), with the "\-C" option), or via the MAIL_CONFIG environment parameter. .IP "\fBconfig_directory (see 'postconf -d' output)\fR" The default location of the Postfix main.cf and master.cf @@ -192,8 +192,9 @@ Optional list of destinations that are eligible for per\-destination logfiles with mail that is queued to those destinations. .IP "\fBimport_environment (see 'postconf -d' output)\fR" -The list of environment parameters that a Postfix process will -import from a non\-Postfix parent process. +The list of environment parameters that a privileged Postfix +process will import from a non\-Postfix parent process, or name=value +environment overrides. .IP "\fBqueue_directory (see 'postconf -d' output)\fR" The location of the Postfix top\-level queue directory. .IP "\fBsyslog_facility (mail)\fR" diff -Nru postfix-3.2.5/man/man1/sendmail.1 postfix-3.3.0/man/man1/sendmail.1 --- postfix-3.2.5/man/man1/sendmail.1 2017-02-06 00:05:04.000000000 +0000 +++ postfix-3.3.0/man/man1/sendmail.1 2017-10-28 12:13:42.000000000 +0000 @@ -416,7 +416,7 @@ .IP "\fBalternate_config_directories (empty)\fR" A list of non\-default Postfix configuration directories that may be specified with "\-c config_directory" on the command line (in the -case of \fBsendmail\fR(1), with "\-C config_directory"), or via the MAIL_CONFIG +case of \fBsendmail\fR(1), with the "\-C" option), or via the MAIL_CONFIG environment parameter. .IP "\fBmulti_instance_directories (empty)\fR" An optional list of non\-default Postfix configuration directories; diff -Nru postfix-3.2.5/man/man5/aliases.5 postfix-3.3.0/man/man5/aliases.5 --- postfix-3.2.5/man/man5/aliases.5 2016-02-14 01:39:26.000000000 +0000 +++ postfix-3.3.0/man/man5/aliases.5 2017-12-10 01:07:47.000000000 +0000 @@ -56,9 +56,12 @@ such as whitespace, `#', `:', or `@'. The \fIname\fR is folded to lowercase, in order to make database lookups case insensitive. .PP -In addition, when an alias exists for \fBowner\-\fIname\fR, delivery -diagnostics are directed to that address, instead of to the originator -of the message. +In addition, when an alias exists for \fBowner\-\fIname\fR, +this will override the envelope sender address, so that +delivery diagnostics are directed to \fBowner\-\fIname\fR, +instead of the originator of the message (for details, see +\fBowner_request_special\fR, \fBexpand_owner_alias\fR and +\fBreset_owner_alias\fR). This is typically used to direct delivery errors to the maintainer of a mailing list, who is in a better position to deal with mailing list delivery problems than the originator of the undelivered mail. @@ -155,37 +158,37 @@ The following \fBmain.cf\fR parameters are especially relevant. The text below provides only a parameter summary. See \fBpostconf\fR(5) for more details including examples. -.IP \fBalias_database\fR -List of alias databases that are updated by the -\fBnewaliases\fR(1) command. -.IP \fBalias_maps\fR -List of alias databases queried by the \fBlocal\fR(8) delivery agent. -.IP \fBallow_mail_to_commands\fR -Restrict the usage of mail delivery to external command. -.IP \fBallow_mail_to_files\fR -Restrict the usage of mail delivery to external file. -.IP \fBexpand_owner_alias\fR -When delivering to an alias that has an \fBowner\-\fR companion alias, -set the envelope sender address to the right\-hand side of the -owner alias, instead using of the left\-hand side address. -.IP \fBpropagate_unmatched_extensions\fR -A list of address rewriting or forwarding mechanisms that -propagate an address extension from the original address -to the result. Specify zero or more of \fBcanonical\fR, -\fBvirtual\fR, \fBalias\fR, \fBforward\fR, \fBinclude\fR, -or \fBgeneric\fR. -.IP \fBowner_request_special\fR -Give special treatment to \fBowner\-\fIlistname\fR and -\fIlistname\fB\-request\fR -addresses. -.IP \fBrecipient_delimiter\fR -Delimiter that separates recipients from address extensions. +.IP "\fBalias_database (see 'postconf -d' output)\fR" +The alias databases for \fBlocal\fR(8) delivery that are updated with +"\fBnewaliases\fR" or with "\fBsendmail \-bi\fR". +.IP "\fBalias_maps (see 'postconf -d' output)\fR" +The alias databases that are used for \fBlocal\fR(8) delivery. +.IP "\fBallow_mail_to_commands (alias, forward)\fR" +Restrict \fBlocal\fR(8) mail delivery to external commands. +.IP "\fBallow_mail_to_files (alias, forward)\fR" +Restrict \fBlocal\fR(8) mail delivery to external files. +.IP "\fBexpand_owner_alias (no)\fR" +When delivering to an alias "\fIaliasname\fR" that has an +"owner\-\fIaliasname\fR" companion alias, set the envelope sender +address to the expansion of the "owner\-\fIaliasname\fR" alias. +.IP "\fBpropagate_unmatched_extensions (canonical, virtual)\fR" +What address lookup tables copy an address extension from the lookup +key to the lookup result. +.IP "\fBowner_request_special (yes)\fR" +Enable special treatment for owner\-\fIlistname\fR entries in the +\fBaliases\fR(5) file, and don't split owner\-\fIlistname\fR and +\fIlistname\fR\-request address localparts when the recipient_delimiter +is set to "\-". +.IP "\fBrecipient_delimiter (empty)\fR" +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). .PP Available in Postfix version 2.3 and later: -.IP \fBfrozen_delivered_to\fR -Update the local(8) delivery agent's Delivered\-To: address -(see prepend_delivered_header) only once, at the start of -a delivery; do not update the Delivered\-To: address while +.IP "\fBfrozen_delivered_to (yes)\fR" +Update the \fBlocal\fR(8) delivery agent's idea of the Delivered\-To: +address (see prepend_delivered_header) only once, at the start of +a delivery attempt; do not update the Delivered\-To: address while expanding aliases or .forward files. .SH "STANDARDS" .na diff -Nru postfix-3.2.5/man/man5/master.5 postfix-3.3.0/man/man5/master.5 --- postfix-3.2.5/man/man5/master.5 2016-09-08 11:02:51.000000000 +0000 +++ postfix-3.3.0/man/man5/master.5 2017-12-27 17:28:45.000000000 +0000 @@ -139,7 +139,7 @@ place. .sp The files in the examples/chroot\-setup subdirectory of the -Postfix source archive show set up a Postfix chroot environment +Postfix source show how to set up a Postfix chroot environment on a variety of systems. See also BASIC_CONFIGURATION_README for issues related to running daemons chrooted. .IP "\fBWake up time (default: 0)\fR" diff -Nru postfix-3.2.5/man/man5/pgsql_table.5 postfix-3.3.0/man/man5/pgsql_table.5 --- postfix-3.2.5/man/man5/pgsql_table.5 2016-12-31 18:48:22.000000000 +0000 +++ postfix-3.3.0/man/man5/pgsql_table.5 2017-12-27 16:42:19.000000000 +0000 @@ -54,24 +54,22 @@ .ad .fi .IP "\fBhosts\fR" -The hosts that Postfix will try to connect to and query from. -Specify \fIunix:\fR for UNIX\-domain sockets, \fIinet:\fR for TCP -connections (default). Example: +The hosts that Postfix will try to connect to and query +from. Besides a \fBpostgresql://\fR connection URI, this +setting supports the historical forms \fBunix:/\fIpathname\fR +for UNIX\-domain sockets and \fBinet:\fIhost:port\fR for TCP +connections, where the \fBunix:\fR and \fBinet:\fR prefixes +are accepted and ignored for backwards compatibility. +Examples: .nf + hosts = postgresql://username@example.com/tablename?sslmode=require hosts = host1.some.domain host2.some.domain:port hosts = unix:/file/name .fi -The hosts are tried in random order, with all connections over -UNIX domain sockets being tried before those over TCP. The -connections are automatically closed after being idle for about -1 minute, and are re\-opened as necessary. - -NOTE: the \fIunix:\fR and \fIinet:\fR prefixes are accepted for -backwards compatibility reasons, but are actually ignored. -The PostgreSQL client library will always try to connect to an -UNIX socket if the name starts with a slash, and will try a TCP -connection otherwise. +The hosts are tried in random order. The connections are +automatically closed after being idle for about 1 minute, +and are re\-opened as necessary. .IP "\fBuser, password\fR" The user name and password to log into the pgsql server. Example: diff -Nru postfix-3.2.5/man/man5/postconf.5 postfix-3.3.0/man/man5/postconf.5 --- postfix-3.2.5/man/man5/postconf.5 2017-02-08 00:40:28.000000000 +0000 +++ postfix-3.3.0/man/man5/postconf.5 2018-02-04 15:40:51.000000000 +0000 @@ -2007,22 +2007,38 @@ .PP This feature is available in Postfix 2.9 and later. .SH enable_original_recipient (default: yes) -Enable support for the X\-Original\-To message header. This header -is needed for multi\-recipient mailboxes. +Enable support for the original recipient address after an +address is rewritten to a different address (for example with +aliasing or with canonical mapping). +.PP +The original recipient address is used as follows: +.IP "Final delivery" +With "enable_original_recipient = +yes", the original recipient address is stored in the \fBX\-Original\-To\fR +message header. This header may be used to distinguish between +different recipients that share the same mailbox. +.br +.IP "Recipient deduplication" +With "enable_original_recipient += yes", the \fBcleanup\fR(8) daemon performs duplicate recipient elimination +based on the content of (original recipient, maybe\-rewritten +recipient) pairs. Otherwise, the \fBcleanup\fR(8) daemon performs duplicate +recipient elimination based only on the maybe\-rewritten recipient +address. +.br +.br .PP -When this parameter is set to yes, the \fBcleanup\fR(8) daemon performs -duplicate elimination on distinct pairs of (original recipient, -rewritten recipient), and generates non\-empty original recipient -queue file records. -.PP -When this parameter is set to no, the \fBcleanup\fR(8) daemon performs -duplicate elimination on the rewritten recipient address only, and -generates empty original recipient queue file records. -.PP -This feature is available in Postfix 2.1 and later. With Postfix -version 2.0, support for the X\-Original\-To message header is always turned -on. Postfix versions before 2.0 have no support for the X\-Original\-To -message header. +Note: with Postfix <= 3.2 the "setting enable_original_recipient += \fBno\fR" breaks address verification for addresses that are +aliased or otherwise rewritten (Postfix is unable to store the +address verification result under the original probe destination +address; instead, it can store the result only under the rewritten +address). +.PP +This feature is available in Postfix 2.1 and later. Postfix +version 2.0 behaves as if this parameter is always set to \fByes\fR. +Postfix versions before 2.0 have no support for the original recipient +address. .SH error_notice_recipient (default: postmaster) The recipient of postmaster notifications about mail delivery problems that are caused by policy, resource, software or protocol @@ -2040,10 +2056,11 @@ .PP This feature is available in Postfix 2.2 and later. .SH expand_owner_alias (default: no) -When delivering to an alias "aliasname" that has an "owner\-aliasname" -companion alias, set the envelope sender address to the expansion -of the "owner\-aliasname" alias. Normally, Postfix sets the envelope -sender address to the name of the "owner\-aliasname" alias. +When delivering to an alias "\fIaliasname\fR" that has an +"owner\-\fIaliasname\fR" companion alias, set the envelope sender +address to the expansion of the "owner\-\fIaliasname\fR" alias. +Normally, Postfix sets the envelope sender address to the name of +the "owner\-\fIaliasname\fR" alias. .SH export_environment (default: see "postconf \-d" output) The list of environment variables that a Postfix process will export to non\-Postfix processes. The TZ variable is needed for sane @@ -2286,6 +2303,42 @@ .SH header_checks (default: empty) Optional lookup tables for content inspection of primary non\-MIME message headers, as specified in the \fBheader_checks\fR(5) manual page. +.SH header_from_format (default: standard) +The format of the Postfix\-generated \fBFrom:\fR header. This +setting affects the appearance of 'full name' information when a +local program such as /bin/mail submits a message without From: +header through the Postfix \fBsendmail\fR(1) command. +.PP +Specify one of the following: +.IP "\fBstandard\fR (default)" +Produce a header formatted +as "\fBFrom:\fR \fIname\fR\fB <\fR\fIaddress\fR\fB>\fR". +This is the default as of Postfix 3.3. +.br +.IP "\fBobsolete\fR" +Produce a header formatted as "\fBFrom:\fR +\fIaddress\fR \fB(\fR\fIname\fR\fB)\fR". This is the behavior +prior to Postfix 3.3. +.br +.br +.PP +Notes: +.IP \(bu +Postfix generates the format "\fBFrom:\fR \fIaddress\fR" +when \fIname\fR information is unavailable or the envelope sender +address is empty. This is the same behavior as prior to Postfix +3.3. +.IP \(bu +In the \fBstandard\fR form, the \fIname\fR will be quoted +if it contains \fBspecials\fR as defined in RFC 5322, or the "!%" +address operators. +.IP \(bu +The Postfix \fBsendmail\fR(1) command gets \fIname\fR information +from the \fB\-F\fR command\-line option, from the \fBNAME\fR +environment variable, or from the UNIX password file. +.br +.PP +This feature is available in Postfix 3.3 and later. .SH header_size_limit (default: 102400) The maximal amount of memory in bytes for storing a message header. If a header is larger, the excess is discarded. The limit is @@ -2561,6 +2614,11 @@ notifications instead of "relayed". The default setting is backwards compatible to avoid the infinitesimal possibility of breaking existing LMTP\-based content filters. +.SH lmtp_balance_inet_protocols (default: yes) +The LMTP\-specific version of the smtp_balance_inet_protocols +configuration parameter. See there for details. +.PP +This feature is available in Postfix 3.3 and later. .SH lmtp_bind_address (default: empty) The LMTP\-specific version of the smtp_bind_address configuration parameter. See there for details. @@ -4496,10 +4554,10 @@ .PP This feature is available in Postfix 3.1 and later. .SH owner_request_special (default: yes) -Give special treatment to owner\-listname and listname\-request -address localparts: don't split such addresses when the -recipient_delimiter is set to "\-". This feature is useful for -mailing lists. +Enable special treatment for owner\-\fIlistname\fR entries in the +\fBaliases\fR(5) file, and don't split owner\-\fIlistname\fR and +\fIlistname\fR\-request address localparts when the recipient_delimiter +is set to "\-". This feature is useful for mailing lists. .SH parent_domain_matches_subdomains (default: see "postconf \-d" output) A list of Postfix features where the pattern "example.com" also matches subdomains of example.com, @@ -5941,7 +5999,8 @@ "yes". .PP As documented in \fBaliases\fR(5), when an alias \fIname\fR has a -companion alias named owner\-\fIname\fR, delivery errors will be +companion alias named owner\-\fIname\fR, this will replace the +envelope sender address, so that delivery errors will be reported to the owner alias instead of the sender. This configuration is recommended for mailing lists. .PP @@ -5971,7 +6030,9 @@ .PP Unfortunately, older Postfix releases reset the owner\-alias attribute when delivering mail to a child alias that does not have -its own owner alias. The \fBlocal\fR(8) delivery agent then attempts to +its own owner alias. To be precise, this resets only the decision +to create a new queue file, not the decision to override the envelope +sender address. The \fBlocal\fR(8) delivery agent then attempts to deliver local addresses as soon as they come out of child alias expansion. If delivery to any address from child alias expansion fails with a temporary error condition, the entire mailing list may @@ -6177,6 +6238,36 @@ A Sendmail compatibility feature that specifies the location of the Postfix \fBsendmail\fR(1) command. This command can be used to submit mail into the Postfix queue. +.SH service_name (read\-only) +The master.cf service name of a Postfix daemon process. This +can be used to distinguish the logging from different services that +use the same program name. +.PP +Example master.cf entries: +.PP +.nf +.na +.ft C +# Distinguish inbound MTA logging from submission and smtps logging. +smtp inet n \- n \- \- smtpd +submission inet n \- n \- \- smtpd + \-o syslog_name=postfix/$service_name +smtps inet n \- n \- \- smtpd + \-o syslog_name=postfix/$service_name +.fi +.ad +.ft R +.PP +.nf +.na +.ft C +# Distinguish outbound MTA logging from inbound relay logging. +smtp unix \- \- n \- \- smtp +relay unix \- \- n \- \- smtp + \-o syslog_name=postfix/$service_name +.fi +.ad +.ft R .SH service_throttle_time (default: 60s) How long the Postfix \fBmaster\fR(8) waits before forking a server that appears to be malfunctioning. @@ -6306,6 +6397,17 @@ EHLO only when the word "ESMTP" appears in the server greeting banner (example: 220 spike.porcupine.org ESMTP Postfix). +.SH smtp_balance_inet_protocols (default: yes) +When a remote destination resolves to a combination of IPv4 and +IPv6 addresses, ensure that the Postfix SMTP client can try both +address types before it runs into the smtp_mx_address_limit. +.PP +This avoids an interoperability problem when a destination resolves +to primarily IPv6 addresses, the smtp_address_limit feature eliminates +most or all IPv4 addresses, and the destination is not reachable over +IPv6. +.PP +This feature is available in Postfix 3.3 and later. .SH smtp_bind_address (default: empty) An optional numerical network address that the Postfix SMTP client should bind to when making an IPv4 connection. @@ -10238,8 +10340,10 @@ after address probe failure due to a temporary problem (default: defer_if_permit). .br -This feature is available in Postfix 2.1 -and later. +This feature breaks for aliased addresses +with "enable_original_recipient = no" (Postfix <= 3.2). +.br +This feature is available in Postfix 2.1 and later. .br .br .PP @@ -10818,8 +10922,11 @@ specifies the action after address probe failure due to a temporary problem (default: defer_if_permit). .br -This feature is available -in Postfix 2.1 and later. +This feature breaks for +aliased addresses with "enable_original_recipient = no" (Postfix +<= 3.2). +.br +This feature is available in Postfix 2.1 and later. .br .br .PP diff -Nru postfix-3.2.5/man/man5/socketmap_table.5 postfix-3.3.0/man/man5/socketmap_table.5 --- postfix-3.2.5/man/man5/socketmap_table.5 2016-02-14 01:39:26.000000000 +0000 +++ postfix-3.3.0/man/man5/socketmap_table.5 2018-01-28 16:18:00.000000000 +0000 @@ -33,7 +33,7 @@ .fi Socketmaps use a simple protocol: the client sends one request, and the server sends one reply. Each request and -reply are sent as one netstring object. +each reply are sent as one netstring object. .SH "REQUEST FORMAT" .na .nf diff -Nru postfix-3.2.5/man/man5/tcp_table.5 postfix-3.3.0/man/man5/tcp_table.5 --- postfix-3.2.5/man/man5/tcp_table.5 2016-02-14 01:39:26.000000000 +0000 +++ postfix-3.3.0/man/man5/tcp_table.5 2018-01-28 16:13:35.000000000 +0000 @@ -41,12 +41,17 @@ .nf .ad .fi -Each request specifies a command, a lookup key, and possibly a -lookup result. +The tcp_table protocol supports only the lookup request. +The request has the following form: .IP "\fBget\fR SPACE \fIkey\fR NEWLINE" Look up data under the specified key. -.IP "\fBput\fR SPACE \fIkey\fR SPACE \fIvalue\fR NEWLINE" -This request is currently not implemented. +.PP +Postfix will not generate partial search keys such as domain +names without one or more subdomains, network addresses +without one or more least\-significant octets, or email +addresses without the localpart, address extension or domain +portion. This behavior is also found with cidr:, pcre:, and +regexp: tables. .SH "REPLY FORMAT" .na .nf @@ -56,7 +61,6 @@ longer than 4096 characters including the newline terminator. .IP "\fB500\fR SPACE \fItext\fR NEWLINE" In case of a lookup request, the requested data does not exist. -In case of an update request, the request was rejected. The text describes the nature of the problem. .IP "\fB400\fR SPACE \fItext\fR NEWLINE" This indicates an error condition. The text describes the nature of diff -Nru postfix-3.2.5/man/man8/anvil.8 postfix-3.3.0/man/man8/anvil.8 --- postfix-3.2.5/man/man8/anvil.8 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/man/man8/anvil.8 2018-01-14 16:48:36.000000000 +0000 @@ -255,6 +255,10 @@ .IP "\fBsyslog_name (see 'postconf -d' output)\fR" A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "SEE ALSO" .na .nf diff -Nru postfix-3.2.5/man/man8/bounce.8 postfix-3.3.0/man/man8/bounce.8 --- postfix-3.2.5/man/man8/bounce.8 2016-09-17 14:50:55.000000000 +0000 +++ postfix-3.3.0/man/man8/bounce.8 2018-01-14 16:48:35.000000000 +0000 @@ -131,6 +131,10 @@ .IP "\fBsmtputf8_autodetect_classes (sendmail, verify)\fR" Detect that a message requires SMTPUTF8 support for the specified mail origin classes. +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "FILES" .na .nf diff -Nru postfix-3.2.5/man/man8/cleanup.8 postfix-3.3.0/man/man8/cleanup.8 --- postfix-3.2.5/man/man8/cleanup.8 2016-11-05 12:01:03.000000000 +0000 +++ postfix-3.3.0/man/man8/cleanup.8 2018-01-14 16:48:35.000000000 +0000 @@ -424,7 +424,13 @@ .PP Available in Postfix version 2.1 and later: .IP "\fBenable_original_recipient (yes)\fR" -Enable support for the X\-Original\-To message header. +Enable support for the original recipient address after an +address is rewritten to a different address (for example with +aliasing or with canonical mapping). +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "FILES" .na .nf diff -Nru postfix-3.2.5/man/man8/discard.8 postfix-3.3.0/man/man8/discard.8 --- postfix-3.2.5/man/man8/discard.8 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/man/man8/discard.8 2018-01-14 16:48:36.000000000 +0000 @@ -90,6 +90,10 @@ .IP "\fBsyslog_name (see 'postconf -d' output)\fR" A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "SEE ALSO" .na .nf diff -Nru postfix-3.2.5/man/man8/dnsblog.8 postfix-3.3.0/man/man8/dnsblog.8 --- postfix-3.2.5/man/man8/dnsblog.8 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/man/man8/dnsblog.8 2018-01-14 16:48:36.000000000 +0000 @@ -70,6 +70,10 @@ .IP "\fBsyslog_name (see 'postconf -d' output)\fR" A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "SEE ALSO" .na .nf diff -Nru postfix-3.2.5/man/man8/error.8 postfix-3.3.0/man/man8/error.8 --- postfix-3.2.5/man/man8/error.8 2016-09-17 14:50:55.000000000 +0000 +++ postfix-3.3.0/man/man8/error.8 2018-01-14 16:48:35.000000000 +0000 @@ -100,6 +100,10 @@ .IP "\fBsyslog_name (see 'postconf -d' output)\fR" A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "SEE ALSO" .na .nf diff -Nru postfix-3.2.5/man/man8/flush.8 postfix-3.3.0/man/man8/flush.8 --- postfix-3.2.5/man/man8/flush.8 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/man/man8/flush.8 2018-01-14 16:48:36.000000000 +0000 @@ -130,6 +130,10 @@ .IP "\fBsyslog_name (see 'postconf -d' output)\fR" A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "FILES" .na .nf diff -Nru postfix-3.2.5/man/man8/local.8 postfix-3.3.0/man/man8/local.8 --- postfix-3.2.5/man/man8/local.8 2016-09-17 14:50:55.000000000 +0000 +++ postfix-3.3.0/man/man8/local.8 2018-01-14 16:48:35.000000000 +0000 @@ -395,13 +395,14 @@ .IP "\fBbiff (yes)\fR" Whether or not to use the local biff service. .IP "\fBexpand_owner_alias (no)\fR" -When delivering to an alias "aliasname" that has an "owner\-aliasname" -companion alias, set the envelope sender address to the expansion -of the "owner\-aliasname" alias. +When delivering to an alias "\fIaliasname\fR" that has an +"owner\-\fIaliasname\fR" companion alias, set the envelope sender +address to the expansion of the "owner\-\fIaliasname\fR" alias. .IP "\fBowner_request_special (yes)\fR" -Give special treatment to owner\-listname and listname\-request -address localparts: don't split such addresses when the -recipient_delimiter is set to "\-". +Enable special treatment for owner\-\fIlistname\fR entries in the +\fBaliases\fR(5) file, and don't split owner\-\fIlistname\fR and +\fIlistname\fR\-request address localparts when the recipient_delimiter +is set to "\-". .IP "\fBsun_mailtool_compatibility (no)\fR" Obsolete SUN mailtool compatibility feature. .PP @@ -500,6 +501,11 @@ The maximal number of addresses remembered by the address duplicate filter for \fBaliases\fR(5) or \fBvirtual\fR(5) alias expansion, or for \fBshowq\fR(8) queue displays. +.IP "\fBmailbox_size_limit (51200000)\fR" +The maximal size of any \fBlocal\fR(8) individual mailbox or maildir +file, or zero (no limit). +.PP +Implemented in the qmgr(8) daemon: .IP "\fBlocal_destination_concurrency_limit (2)\fR" The maximal number of parallel deliveries via the local mail delivery transport to the same recipient (when @@ -509,9 +515,6 @@ .IP "\fBlocal_destination_recipient_limit (1)\fR" The maximal number of recipients per message delivery via the local mail delivery transport. -.IP "\fBmailbox_size_limit (51200000)\fR" -The maximal size of any \fBlocal\fR(8) individual mailbox or maildir -file, or zero (no limit). .SH "SECURITY CONTROLS" .na .nf @@ -592,6 +595,14 @@ .IP "\fBsyslog_name (see 'postconf -d' output)\fR" A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". +.PP +Available in Postfix version 3.3 and later: +.IP "\fBenable_original_recipient (yes)\fR" +Enable support for the original recipient address after an +address is rewritten to a different address (for example with +aliasing or with canonical mapping). +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "FILES" .na .nf diff -Nru postfix-3.2.5/man/man8/master.8 postfix-3.3.0/man/man8/master.8 --- postfix-3.2.5/man/man8/master.8 2016-09-17 14:50:55.000000000 +0000 +++ postfix-3.3.0/man/man8/master.8 2018-01-14 16:48:35.000000000 +0000 @@ -144,8 +144,9 @@ The Internet protocols Postfix will attempt to use when making or accepting connections. .IP "\fBimport_environment (see 'postconf -d' output)\fR" -The list of environment parameters that a Postfix process will -import from a non\-Postfix parent process. +The list of environment parameters that a privileged Postfix +process will import from a non\-Postfix parent process, or name=value +environment overrides. .IP "\fBmail_owner (postfix)\fR" The UNIX system account that owns the Postfix queue and most Postfix daemon processes. @@ -160,6 +161,10 @@ .IP "\fBsyslog_name (see 'postconf -d' output)\fR" A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "FILES" .na .nf diff -Nru postfix-3.2.5/man/man8/oqmgr.8 postfix-3.3.0/man/man8/oqmgr.8 --- postfix-3.2.5/man/man8/oqmgr.8 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/man/man8/oqmgr.8 2018-01-14 16:48:35.000000000 +0000 @@ -218,31 +218,44 @@ .IP "\fBdefault_destination_concurrency_limit (20)\fR" The default maximal number of parallel deliveries to the same destination. -.IP "\fItransport\fB_destination_concurrency_limit ($default_destination_concurrency_limit)\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_destination_concurrency_limit ($default_destination_concurrency_limit)\fR" +A transport\-specific override for the +default_destination_concurrency_limit parameter value, where +\fItransport\fR is the master.cf name of the message delivery +transport. .PP Available in Postfix version 2.5 and later: -.IP "\fItransport\fB_initial_destination_concurrency ($initial_destination_concurrency)\fR" -Initial concurrency for delivery via the named message -\fItransport\fR. +.IP "\fBtransport_initial_destination_concurrency ($initial_destination_concurrency)\fR" +A transport\-specific override for the initial_destination_concurrency +parameter value, where \fItransport\fR is the master.cf name of +the message delivery transport. .IP "\fBdefault_destination_concurrency_failed_cohort_limit (1)\fR" How many pseudo\-cohorts must suffer connection or handshake failure before a specific destination is considered unavailable (and further delivery is suspended). -.IP "\fItransport\fB_destination_concurrency_failed_cohort_limit ($default_destination_concurrency_failed_cohort_limit)\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_destination_concurrency_failed_cohort_limit ($default_destination_concurrency_failed_cohort_limit)\fR" +A transport\-specific override for the +default_destination_concurrency_failed_cohort_limit parameter value, +where \fItransport\fR is the master.cf name of the message delivery +transport. .IP "\fBdefault_destination_concurrency_negative_feedback (1)\fR" The per\-destination amount of delivery concurrency negative feedback, after a delivery completes with a connection or handshake failure. -.IP "\fItransport\fB_destination_concurrency_negative_feedback ($default_destination_concurrency_negative_feedback)\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_destination_concurrency_negative_feedback ($default_destination_concurrency_negative_feedback)\fR" +A transport\-specific override for the +default_destination_concurrency_negative_feedback parameter value, +where \fItransport\fR is the master.cf name of the message delivery +transport. .IP "\fBdefault_destination_concurrency_positive_feedback (1)\fR" The per\-destination amount of delivery concurrency positive feedback, after a delivery completes without connection or handshake failure. -.IP "\fItransport\fB_destination_concurrency_positive_feedback ($default_destination_concurrency_positive_feedback)\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_destination_concurrency_positive_feedback ($default_destination_concurrency_positive_feedback)\fR" +A transport\-specific override for the +default_destination_concurrency_positive_feedback parameter value, +where \fItransport\fR is the master.cf name of the message delivery +transport. .IP "\fBdestination_concurrency_feedback_debug (no)\fR" Make the queue manager's feedback algorithm verbose for performance analysis purposes. @@ -253,8 +266,11 @@ .fi .IP "\fBdefault_destination_recipient_limit (50)\fR" The default maximal number of recipients per message delivery. -.IP \fItransport\fB_destination_recipient_limit\fR -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_destination_recipient_limit ($default_destination_recipient_limit)\fR" +A transport\-specific override for the +default_destination_recipient_limit parameter value, where +\fItransport\fR is the master.cf name of the message delivery +transport. .SH "OTHER RESOURCE AND RATE CONTROLS" .na .nf @@ -287,16 +303,20 @@ The default amount of delay that is inserted between individual deliveries to the same destination; the resulting behavior depends on the value of the corresponding per\-destination recipient limit. -.IP "\fItransport\fB_destination_rate_delay $default_destination_rate_delay\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_destination_rate_delay ($default_destination_rate_delay)\fR" +A transport\-specific override for the default_destination_rate_delay +parameter value, where \fItransport\fR is the master.cf name of +the message delivery transport. .PP Available in Postfix version 3.1 and later: .IP "\fBdefault_transport_rate_delay (0s)\fR" The default amount of delay that is inserted between individual deliveries over the same message delivery transport, regardless of destination. -.IP "\fItransport\fB_transport_rate_delay $default_transport_rate_delay\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_transport_rate_delay ($default_transport_rate_delay)\fR" +A transport\-specific override for the default_transport_rate_delay +parameter value, where the initial \fItransport\fR in the parameter +name is the master.cf name of the message delivery transport. .SH "SAFETY CONTROLS" .na .nf @@ -346,6 +366,10 @@ .IP "\fBconfirm_delay_cleared (no)\fR" After sending a "your message is delayed" notification, inform the sender when the delay clears up. +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "FILES" .na .nf diff -Nru postfix-3.2.5/man/man8/pickup.8 postfix-3.3.0/man/man8/pickup.8 --- postfix-3.2.5/man/man8/pickup.8 2016-09-17 14:50:55.000000000 +0000 +++ postfix-3.3.0/man/man8/pickup.8 2018-01-14 16:48:35.000000000 +0000 @@ -100,6 +100,10 @@ .IP "\fBsyslog_name (see 'postconf -d' output)\fR" A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "SEE ALSO" .na .nf diff -Nru postfix-3.2.5/man/man8/pipe.8 postfix-3.3.0/man/man8/pipe.8 --- postfix-3.2.5/man/man8/pipe.8 2017-01-14 21:33:36.000000000 +0000 +++ postfix-3.3.0/man/man8/pipe.8 2018-01-14 16:48:35.000000000 +0000 @@ -374,22 +374,22 @@ .fi In the text below, \fItransport\fR is the first field in a \fBmaster.cf\fR entry. -.IP "\fItransport\fB_destination_concurrency_limit ($default_destination_concurrency_limit)\fR" -Limit the number of parallel deliveries to the same destination, -for delivery via the named \fItransport\fR. -The limit is enforced by the Postfix queue manager. -.IP "\fItransport\fB_destination_recipient_limit ($default_destination_recipient_limit)\fR" -Limit the number of recipients per message delivery, for delivery -via the named \fItransport\fR. -The limit is enforced by the Postfix queue manager. -.IP "\fItransport\fB_time_limit ($command_time_limit)\fR" -Limit the time for delivery to external command, for delivery via -the named \fItransport\fR. -The limit is enforced by the pipe delivery agent. - -Postfix 2.4 and later support a suffix that specifies the -time unit: s (seconds), m (minutes), h (hours), d (days), -w (weeks). The default time unit is seconds. +.IP "\fBtransport_time_limit ($command_time_limit)\fR" +A transport\-specific override for the command_time_limit parameter +value, where \fItransport\fR is the master.cf name of the message +delivery transport. +.PP +Implemented in the qmgr(8) daemon: +.IP "\fBtransport_destination_concurrency_limit ($default_destination_concurrency_limit)\fR" +A transport\-specific override for the +default_destination_concurrency_limit parameter value, where +\fItransport\fR is the master.cf name of the message delivery +transport. +.IP "\fBtransport_destination_recipient_limit ($default_destination_recipient_limit)\fR" +A transport\-specific override for the +default_destination_recipient_limit parameter value, where +\fItransport\fR is the master.cf name of the message delivery +transport. .SH "MISCELLANEOUS CONTROLS" .na .nf @@ -440,6 +440,14 @@ Optional filter for the \fBpipe\fR(8) delivery agent to change the delivery status code or explanatory text of successful or unsuccessful deliveries. +.PP +Available in Postfix version 3.3 and later: +.IP "\fBenable_original_recipient (yes)\fR" +Enable support for the original recipient address after an +address is rewritten to a different address (for example with +aliasing or with canonical mapping). +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "SEE ALSO" .na .nf diff -Nru postfix-3.2.5/man/man8/postscreen.8 postfix-3.3.0/man/man8/postscreen.8 --- postfix-3.2.5/man/man8/postscreen.8 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/man/man8/postscreen.8 2018-01-14 16:48:36.000000000 +0000 @@ -399,6 +399,10 @@ .IP "\fBsyslog_name (see 'postconf -d' output)\fR" A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "SEE ALSO" .na .nf diff -Nru postfix-3.2.5/man/man8/proxymap.8 postfix-3.3.0/man/man8/proxymap.8 --- postfix-3.2.5/man/man8/proxymap.8 2016-02-14 01:32:48.000000000 +0000 +++ postfix-3.3.0/man/man8/proxymap.8 2018-01-14 16:48:36.000000000 +0000 @@ -197,6 +197,10 @@ .IP "\fBproxy_write_maps (see 'postconf -d' output)\fR" The lookup tables that the \fBproxymap\fR(8) server is allowed to access for the read\-write service. +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "SEE ALSO" .na .nf diff -Nru postfix-3.2.5/man/man8/qmgr.8 postfix-3.3.0/man/man8/qmgr.8 --- postfix-3.2.5/man/man8/qmgr.8 2016-09-17 14:50:55.000000000 +0000 +++ postfix-3.3.0/man/man8/qmgr.8 2018-01-14 16:48:35.000000000 +0000 @@ -212,24 +212,32 @@ .IP "\fBdefault_recipient_limit (20000)\fR" The default per\-transport upper limit on the number of in\-memory recipients. -.IP "\fItransport\fB_recipient_limit ($default_recipient_limit)\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_recipient_limit ($default_recipient_limit)\fR" +A transport\-specific override for the default_recipient_limit +parameter value, where \fItransport\fR is the master.cf name of +the message delivery transport. .IP "\fBdefault_extra_recipient_limit (1000)\fR" The default value for the extra per\-transport limit imposed on the number of in\-memory recipients. -.IP "\fItransport\fB_extra_recipient_limit ($default_extra_recipient_limit)\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_extra_recipient_limit ($default_extra_recipient_limit)\fR" +A transport\-specific override for the default_extra_recipient_limit +parameter value, where \fItransport\fR is the master.cf name of +the message delivery transport. .PP Available in Postfix version 2.4 and later: .IP "\fBdefault_recipient_refill_limit (100)\fR" The default per\-transport limit on the number of recipients refilled at once. -.IP "\fItransport\fB_recipient_refill_limit ($default_recipient_refill_limit)\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_recipient_refill_limit ($default_recipient_refill_limit)\fR" +A transport\-specific override for the default_recipient_refill_limit +parameter value, where \fItransport\fR is the master.cf name of +the message delivery transport. .IP "\fBdefault_recipient_refill_delay (5s)\fR" The default per\-transport maximum delay between recipients refills. -.IP "\fItransport\fB_recipient_refill_delay ($default_recipient_refill_delay)\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_recipient_refill_delay ($default_recipient_refill_delay)\fR" +A transport\-specific override for the default_recipient_refill_delay +parameter value, where \fItransport\fR is the master.cf name of +the message delivery transport. .SH "DELIVERY CONCURRENCY CONTROLS" .na .nf @@ -241,31 +249,44 @@ .IP "\fBdefault_destination_concurrency_limit (20)\fR" The default maximal number of parallel deliveries to the same destination. -.IP "\fItransport\fB_destination_concurrency_limit ($default_destination_concurrency_limit)\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_destination_concurrency_limit ($default_destination_concurrency_limit)\fR" +A transport\-specific override for the +default_destination_concurrency_limit parameter value, where +\fItransport\fR is the master.cf name of the message delivery +transport. .PP Available in Postfix version 2.5 and later: -.IP "\fItransport\fB_initial_destination_concurrency ($initial_destination_concurrency)\fR" -Initial concurrency for delivery via the named message -\fItransport\fR. +.IP "\fBtransport_initial_destination_concurrency ($initial_destination_concurrency)\fR" +A transport\-specific override for the initial_destination_concurrency +parameter value, where \fItransport\fR is the master.cf name of +the message delivery transport. .IP "\fBdefault_destination_concurrency_failed_cohort_limit (1)\fR" How many pseudo\-cohorts must suffer connection or handshake failure before a specific destination is considered unavailable (and further delivery is suspended). -.IP "\fItransport\fB_destination_concurrency_failed_cohort_limit ($default_destination_concurrency_failed_cohort_limit)\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_destination_concurrency_failed_cohort_limit ($default_destination_concurrency_failed_cohort_limit)\fR" +A transport\-specific override for the +default_destination_concurrency_failed_cohort_limit parameter value, +where \fItransport\fR is the master.cf name of the message delivery +transport. .IP "\fBdefault_destination_concurrency_negative_feedback (1)\fR" The per\-destination amount of delivery concurrency negative feedback, after a delivery completes with a connection or handshake failure. -.IP "\fItransport\fB_destination_concurrency_negative_feedback ($default_destination_concurrency_negative_feedback)\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_destination_concurrency_negative_feedback ($default_destination_concurrency_negative_feedback)\fR" +A transport\-specific override for the +default_destination_concurrency_negative_feedback parameter value, +where \fItransport\fR is the master.cf name of the message delivery +transport. .IP "\fBdefault_destination_concurrency_positive_feedback (1)\fR" The per\-destination amount of delivery concurrency positive feedback, after a delivery completes without connection or handshake failure. -.IP "\fItransport\fB_destination_concurrency_positive_feedback ($default_destination_concurrency_positive_feedback)\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_destination_concurrency_positive_feedback ($default_destination_concurrency_positive_feedback)\fR" +A transport\-specific override for the +default_destination_concurrency_positive_feedback parameter value, +where \fItransport\fR is the master.cf name of the message delivery +transport. .IP "\fBdestination_concurrency_feedback_debug (no)\fR" Make the queue manager's feedback algorithm verbose for performance analysis purposes. @@ -276,8 +297,11 @@ .fi .IP "\fBdefault_destination_recipient_limit (50)\fR" The default maximal number of recipients per message delivery. -.IP "\fItransport\fB_destination_recipient_limit ($default_destination_recipient_limit)\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_destination_recipient_limit ($default_destination_recipient_limit)\fR" +A transport\-specific override for the +default_destination_recipient_limit parameter value, where +\fItransport\fR is the master.cf name of the message delivery +transport. .SH "MESSAGE SCHEDULING CONTROLS" .na .nf @@ -286,23 +310,31 @@ .IP "\fBdefault_delivery_slot_cost (5)\fR" How often the Postfix queue manager's scheduler is allowed to preempt delivery of one message with another. -.IP "\fItransport\fB_delivery_slot_cost ($default_delivery_slot_cost)\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_delivery_slot_cost ($default_delivery_slot_cost)\fR" +A transport\-specific override for the default_delivery_slot_cost +parameter value, where \fItransport\fR is the master.cf name of +the message delivery transport. .IP "\fBdefault_minimum_delivery_slots (3)\fR" How many recipients a message must have in order to invoke the Postfix queue manager's scheduling algorithm at all. -.IP "\fItransport\fB_minimum_delivery_slots ($default_minimum_delivery_slots)\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_minimum_delivery_slots ($default_minimum_delivery_slots)\fR" +A transport\-specific override for the default_minimum_delivery_slots +parameter value, where \fItransport\fR is the master.cf name of +the message delivery transport. .IP "\fBdefault_delivery_slot_discount (50)\fR" The default value for transport\-specific _delivery_slot_discount settings. -.IP "\fItransport\fB_delivery_slot_discount ($default_delivery_slot_discount)\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_delivery_slot_discount ($default_delivery_slot_discount)\fR" +A transport\-specific override for the default_delivery_slot_discount +parameter value, where \fItransport\fR is the master.cf name of +the message delivery transport. .IP "\fBdefault_delivery_slot_loan (3)\fR" The default value for transport\-specific _delivery_slot_loan settings. -.IP "\fItransport\fB_delivery_slot_loan ($default_delivery_slot_loan)\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_delivery_slot_loan ($default_delivery_slot_loan)\fR" +A transport\-specific override for the default_delivery_slot_loan +parameter value, where \fItransport\fR is the master.cf name of +the message delivery transport. .SH "OTHER RESOURCE AND RATE CONTROLS" .na .nf @@ -335,16 +367,20 @@ The default amount of delay that is inserted between individual deliveries to the same destination; the resulting behavior depends on the value of the corresponding per\-destination recipient limit. -.IP "\fItransport\fB_destination_rate_delay $default_destination_rate_delay\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_destination_rate_delay ($default_destination_rate_delay)\fR" +A transport\-specific override for the default_destination_rate_delay +parameter value, where \fItransport\fR is the master.cf name of +the message delivery transport. .PP Available in Postfix version 3.1 and later: .IP "\fBdefault_transport_rate_delay (0s)\fR" The default amount of delay that is inserted between individual deliveries over the same message delivery transport, regardless of destination. -.IP "\fItransport\fB_transport_rate_delay $default_transport_rate_delay\fR" -Idem, for delivery via the named message \fItransport\fR. +.IP "\fBtransport_transport_rate_delay ($default_transport_rate_delay)\fR" +A transport\-specific override for the default_transport_rate_delay +parameter value, where the initial \fItransport\fR in the parameter +name is the master.cf name of the message delivery transport. .SH "SAFETY CONTROLS" .na .nf @@ -394,6 +430,10 @@ .IP "\fBconfirm_delay_cleared (no)\fR" After sending a "your message is delayed" notification, inform the sender when the delay clears up. +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "FILES" .na .nf diff -Nru postfix-3.2.5/man/man8/qmqpd.8 postfix-3.3.0/man/man8/qmqpd.8 --- postfix-3.2.5/man/man8/qmqpd.8 2016-11-05 12:01:03.000000000 +0000 +++ postfix-3.3.0/man/man8/qmqpd.8 2018-01-14 16:48:36.000000000 +0000 @@ -164,6 +164,10 @@ .IP "\fBqmqpd_client_port_logging (no)\fR" Enable logging of the remote QMQP client port in addition to the hostname and IP address. +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "SEE ALSO" .na .nf diff -Nru postfix-3.2.5/man/man8/scache.8 postfix-3.3.0/man/man8/scache.8 --- postfix-3.2.5/man/man8/scache.8 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/man/man8/scache.8 2018-01-14 16:48:36.000000000 +0000 @@ -131,6 +131,10 @@ .IP "\fBsyslog_name (see 'postconf -d' output)\fR" A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "SEE ALSO" .na .nf diff -Nru postfix-3.2.5/man/man8/showq.8 postfix-3.3.0/man/man8/showq.8 --- postfix-3.2.5/man/man8/showq.8 2016-09-17 14:50:55.000000000 +0000 +++ postfix-3.3.0/man/man8/showq.8 2018-01-14 16:48:35.000000000 +0000 @@ -86,6 +86,10 @@ Available in Postfix version 2.9 and later: .IP "\fBenable_long_queue_ids (no)\fR" Enable long, non\-repeating, queue IDs (queue file names). +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "FILES" .na .nf diff -Nru postfix-3.2.5/man/man8/smtp.8 postfix-3.3.0/man/man8/smtp.8 --- postfix-3.2.5/man/man8/smtp.8 2016-12-04 20:55:06.000000000 +0000 +++ postfix-3.3.0/man/man8/smtp.8 2018-01-14 16:48:35.000000000 +0000 @@ -285,6 +285,12 @@ deliveries. .IP "\fBsmtp_dns_reply_filter (empty)\fR" Optional filter for Postfix SMTP client DNS lookup results. +.PP +Available in Postfix version 3.3 and later: +.IP "\fBsmtp_balance_inet_protocols (yes)\fR" +When a remote destination resolves to a combination of IPv4 and +IPv6 addresses, ensure that the Postfix SMTP client can try both +address types before it runs into the smtp_mx_address_limit. .SH "MIME PROCESSING CONTROLS" .na .nf @@ -531,12 +537,6 @@ .nf .ad .fi -.IP "\fBsmtp_destination_concurrency_limit ($default_destination_concurrency_limit)\fR" -The maximal number of parallel deliveries to the same destination -via the smtp message delivery transport. -.IP "\fBsmtp_destination_recipient_limit ($default_destination_recipient_limit)\fR" -The maximal number of recipients per message for the smtp -message delivery transport. .IP "\fBsmtp_connect_timeout (30s)\fR" The Postfix SMTP client time limit for completing a TCP connection, or zero (use the operating system built\-in time limit). @@ -617,6 +617,18 @@ When SMTP connection caching is enabled, the number of times that an SMTP session may be reused before it is closed, or zero (no limit). +.PP +Implemented in the qmgr(8) daemon: +.IP "\fBtransport_destination_concurrency_limit ($default_destination_concurrency_limit)\fR" +A transport\-specific override for the +default_destination_concurrency_limit parameter value, where +\fItransport\fR is the master.cf name of the message delivery +transport. +.IP "\fBtransport_destination_recipient_limit ($default_destination_recipient_limit)\fR" +A transport\-specific override for the +default_destination_recipient_limit parameter value, where +\fItransport\fR is the master.cf name of the message delivery +transport. .SH "SMTPUTF8 CONTROLS" .na .nf @@ -753,6 +765,10 @@ Available with Postfix 3.2 and later: .IP "\fBsmtp_tcp_port (smtp)\fR" The default TCP port that the Postfix SMTP client connects to. +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "SEE ALSO" .na .nf diff -Nru postfix-3.2.5/man/man8/smtpd.8 postfix-3.3.0/man/man8/smtpd.8 --- postfix-3.2.5/man/man8/smtpd.8 2017-05-02 23:24:43.000000000 +0000 +++ postfix-3.3.0/man/man8/smtpd.8 2018-01-14 16:48:35.000000000 +0000 @@ -1110,6 +1110,10 @@ .IP "\fBsmtpd_client_port_logging (no)\fR" Enable logging of the remote SMTP client port in addition to the hostname and IP address. +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "SEE ALSO" .na .nf diff -Nru postfix-3.2.5/man/man8/spawn.8 postfix-3.3.0/man/man8/spawn.8 --- postfix-3.2.5/man/man8/spawn.8 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/man/man8/spawn.8 2018-01-14 16:48:36.000000000 +0000 @@ -84,13 +84,10 @@ .nf .ad .fi -.IP "\fItransport\fB_time_limit ($command_time_limit)\fR" -The amount of time the command is allowed to run before it is -terminated. - -Postfix 2.4 and later support a suffix that specifies the -time unit: s (seconds), m (minutes), h (hours), d (days), -w (weeks). The default time unit is seconds. +.IP "\fBtransport_time_limit ($command_time_limit)\fR" +A transport\-specific override for the command_time_limit parameter +value, where \fItransport\fR is the master.cf name of the message +delivery transport. .SH "MISCELLANEOUS" .na .nf @@ -128,6 +125,10 @@ .IP "\fBsyslog_name (see 'postconf -d' output)\fR" A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "SEE ALSO" .na .nf diff -Nru postfix-3.2.5/man/man8/tlsmgr.8 postfix-3.3.0/man/man8/tlsmgr.8 --- postfix-3.2.5/man/man8/tlsmgr.8 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/man/man8/tlsmgr.8 2018-01-14 16:48:36.000000000 +0000 @@ -152,6 +152,10 @@ .IP "\fBsyslog_name (see 'postconf -d' output)\fR" A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "SEE ALSO" .na .nf diff -Nru postfix-3.2.5/man/man8/tlsproxy.8 postfix-3.3.0/man/man8/tlsproxy.8 --- postfix-3.2.5/man/man8/tlsproxy.8 2017-05-02 23:24:43.000000000 +0000 +++ postfix-3.3.0/man/man8/tlsproxy.8 2018-01-14 16:48:36.000000000 +0000 @@ -190,6 +190,10 @@ .IP "\fBsyslog_name (see 'postconf -d' output)\fR" A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "SEE ALSO" .na .nf diff -Nru postfix-3.2.5/man/man8/trivial-rewrite.8 postfix-3.3.0/man/man8/trivial-rewrite.8 --- postfix-3.2.5/man/man8/trivial-rewrite.8 2016-09-17 14:50:55.000000000 +0000 +++ postfix-3.3.0/man/man8/trivial-rewrite.8 2018-01-14 16:48:35.000000000 +0000 @@ -281,6 +281,10 @@ .IP "\fBhelpful_warnings (yes)\fR" Log warnings about problematic configuration settings, and provide helpful suggestions. +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "SEE ALSO" .na .nf diff -Nru postfix-3.2.5/man/man8/verify.8 postfix-3.3.0/man/man8/verify.8 --- postfix-3.2.5/man/man8/verify.8 2016-11-05 12:01:03.000000000 +0000 +++ postfix-3.3.0/man/man8/verify.8 2018-01-14 16:48:36.000000000 +0000 @@ -208,6 +208,10 @@ .IP "\fBsyslog_name (see 'postconf -d' output)\fR" A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". +.PP +Available in Postfix 3.3 and later: +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "SEE ALSO" .na .nf diff -Nru postfix-3.2.5/man/man8/virtual.8 postfix-3.3.0/man/man8/virtual.8 --- postfix-3.2.5/man/man8/virtual.8 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/man/man8/virtual.8 2018-01-14 16:48:36.000000000 +0000 @@ -238,15 +238,17 @@ .nf .ad .fi +.IP "\fBvirtual_mailbox_limit (51200000)\fR" +The maximal size in bytes of an individual \fBvirtual\fR(8) mailbox or +maildir file, or zero (no limit). +.PP +Implemented in the qmgr(8) daemon: .IP "\fBvirtual_destination_concurrency_limit ($default_destination_concurrency_limit)\fR" The maximal number of parallel deliveries to the same destination via the virtual message delivery transport. .IP "\fBvirtual_destination_recipient_limit ($default_destination_recipient_limit)\fR" The maximal number of recipients per message for the virtual message delivery transport. -.IP "\fBvirtual_mailbox_limit (51200000)\fR" -The maximal size in bytes of an individual \fBvirtual\fR(8) mailbox or -maildir file, or zero (no limit). .SH "MISCELLANEOUS CONTROLS" .na .nf @@ -287,6 +289,14 @@ Optional filter for the \fBvirtual\fR(8) delivery agent to change the delivery status code or explanatory text of successful or unsuccessful deliveries. +.PP +Available in Postfix version 3.3 and later: +.IP "\fBenable_original_recipient (yes)\fR" +Enable support for the original recipient address after an +address is rewritten to a different address (for example with +aliasing or with canonical mapping). +.IP "\fBservice_name (read\-only)\fR" +The master.cf service name of a Postfix daemon process. .SH "SEE ALSO" .na .nf diff -Nru postfix-3.2.5/mantools/fixman postfix-3.3.0/mantools/fixman --- postfix-3.2.5/mantools/fixman 2015-01-30 00:54:34.000000000 +0000 +++ postfix-3.3.0/mantools/fixman 2017-06-10 15:36:56.000000000 +0000 @@ -230,6 +230,14 @@ next; } + if ($incomment == 2 && /^(\/\*|#) +\.IP +"?\\fI([a-zA-Z0-9_]+)\\fB([a-zA-Z0-9_]+)( +\((.*)\))?/) { + emit_text($1) if ($name ne ""); + $name = "$2$3"; + $defval = $4; + $text = ""; + next; + } + if ($incomment == 2 && /^(\/\*|#) +([A-Z][A-Z][A-Z]+|\.[A-Z][A-Z])/) { emit_text($1) if ($name ne ""); $incomment = 0 if /^(\/\*|#) +(SEE +ALSO|README +FILES|LICENSE|AUTHOR)/; diff -Nru postfix-3.2.5/mantools/postlink postfix-3.3.0/mantools/postlink --- postfix-3.2.5/mantools/postlink 2016-12-17 23:22:04.000000000 +0000 +++ postfix-3.3.0/mantools/postlink 2018-01-14 16:48:00.000000000 +0000 @@ -227,6 +227,7 @@ s;\blmtp_reply_filter\b;$&;g; s;\blmtp_sasl_password_maps\b;$&;g; s;\blmtp_send_dummy_mail_auth\b;$&;g; + s;\blmtp_balance_inet_protocols\b;$&;g; s;\blmtp_sender_dependent_authentication\b;$&;g; s;\blmtp_bind_address\b;$&;g; s;\blmtp_bind_address6\b;$&;g; @@ -390,6 +391,7 @@ s;\bqmgr_daemon_timeout\b;$&;g; s;\bqmgr_ipc_timeout\b;$&;g; s;\bqmqpd_authorized_clients\b;$&;g; + s;\bservice_name\b;$&;g; s;\bdefault_desti[-]*\n* *[]*na[-]*\n* *[]*tion_concur[-]*\n* *[]*rency_negative_feedback\b;$&;g; s;\bdefault_desti[-]*\n* *[]*na[-]*\n* *[]*tion_concur[-]*\n* *[]*rency_positive_feedback\b;$&;g; @@ -687,6 +689,7 @@ s;\bsmtp_address_preference\b;$&;g; s;\bsmtp_per_record_deadline\b;$&;g; s;\bsmtp_send_dummy_mail_auth\b;$&;g; + s;\bsmtp_balance_inet_protocols\b;$&;g; s;\bsmtpd_enforce_tls\b;$&;g; s;\bsmtpd_sasl_tls_security_options\b;$&;g; s;\bsmtpd_sasl_type\b;$&;g; diff -Nru postfix-3.2.5/proto/ADDRESS_VERIFICATION_README.html postfix-3.3.0/proto/ADDRESS_VERIFICATION_README.html --- postfix-3.2.5/proto/ADDRESS_VERIFICATION_README.html 2015-01-29 22:33:24.000000000 +0000 +++ postfix-3.3.0/proto/ADDRESS_VERIFICATION_README.html 2017-07-29 23:06:38.000000000 +0000 @@ -298,6 +298,12 @@ ... # Postfix 2.6 and later privacy feature. # unverified_recipient_reject_reason = Address lookup failed + + # Postfix 3.2 and earlier workaround. + # Do not set enable_original_recipient=no. This prevents Postfix + # from saving the recipient address verification result under + # the original address, when the address verification probe + # message goes through address aliasing or canonical mapping.
      @@ -348,6 +354,12 @@ # Note 1: Be sure to read the "Caching" section below! # Note 2: Avoid hash files here. Use btree or lmdb instead. address_verify_map = btree:/var/lib/postfix/verify + + # Postfix 3.2 and earlier workaround. + # Do not set enable_original_recipient=no. This prevents Postfix + # from saving the sender address verification result under the + # original address, when the address verification probe message + # goes through address aliasing or canonical mapping. /etc/postfix/sender_access: # Don't do this when you handle lots of email. diff -Nru postfix-3.2.5/proto/aliases postfix-3.3.0/proto/aliases --- postfix-3.2.5/proto/aliases 2016-02-14 01:38:56.000000000 +0000 +++ postfix-3.3.0/proto/aliases 2017-12-10 01:07:44.000000000 +0000 @@ -50,9 +50,12 @@ # such as whitespace, `#', `:', or `@'. The \fIname\fR is folded to # lowercase, in order to make database lookups case insensitive. # .PP -# In addition, when an alias exists for \fBowner-\fIname\fR, delivery -# diagnostics are directed to that address, instead of to the originator -# of the message. +# In addition, when an alias exists for \fBowner-\fIname\fR, +# this will override the envelope sender address, so that +# delivery diagnostics are directed to \fBowner-\fIname\fR, +# instead of the originator of the message (for details, see +# \fBowner_request_special\fR, \fBexpand_owner_alias\fR and +# \fBreset_owner_alias\fR). # This is typically used to direct delivery errors to the maintainer of # a mailing list, who is in a better position to deal with mailing # list delivery problems than the originator of the undelivered mail. @@ -139,37 +142,37 @@ # The following \fBmain.cf\fR parameters are especially relevant. # The text below provides only a parameter summary. See # \fBpostconf\fR(5) for more details including examples. -# .IP \fBalias_database\fR -# List of alias databases that are updated by the -# \fBnewaliases\fR(1) command. -# .IP \fBalias_maps\fR -# List of alias databases queried by the \fBlocal\fR(8) delivery agent. -# .IP \fBallow_mail_to_commands\fR -# Restrict the usage of mail delivery to external command. -# .IP \fBallow_mail_to_files\fR -# Restrict the usage of mail delivery to external file. -# .IP \fBexpand_owner_alias\fR -# When delivering to an alias that has an \fBowner-\fR companion alias, -# set the envelope sender address to the right-hand side of the -# owner alias, instead using of the left-hand side address. -# .IP \fBpropagate_unmatched_extensions\fR -# A list of address rewriting or forwarding mechanisms that -# propagate an address extension from the original address -# to the result. Specify zero or more of \fBcanonical\fR, -# \fBvirtual\fR, \fBalias\fR, \fBforward\fR, \fBinclude\fR, -# or \fBgeneric\fR. -# .IP \fBowner_request_special\fR -# Give special treatment to \fBowner-\fIlistname\fR and -# \fIlistname\fB-request\fR -# addresses. -# .IP \fBrecipient_delimiter\fR -# Delimiter that separates recipients from address extensions. +# .IP "\fBalias_database (see 'postconf -d' output)\fR" +# The alias databases for \fBlocal\fR(8) delivery that are updated with +# "\fBnewaliases\fR" or with "\fBsendmail -bi\fR". +# .IP "\fBalias_maps (see 'postconf -d' output)\fR" +# The alias databases that are used for \fBlocal\fR(8) delivery. +# .IP "\fBallow_mail_to_commands (alias, forward)\fR" +# Restrict \fBlocal\fR(8) mail delivery to external commands. +# .IP "\fBallow_mail_to_files (alias, forward)\fR" +# Restrict \fBlocal\fR(8) mail delivery to external files. +# .IP "\fBexpand_owner_alias (no)\fR" +# When delivering to an alias "\fIaliasname\fR" that has an +# "owner-\fIaliasname\fR" companion alias, set the envelope sender +# address to the expansion of the "owner-\fIaliasname\fR" alias. +# .IP "\fBpropagate_unmatched_extensions (canonical, virtual)\fR" +# What address lookup tables copy an address extension from the lookup +# key to the lookup result. +# .IP "\fBowner_request_special (yes)\fR" +# Enable special treatment for owner-\fIlistname\fR entries in the +# \fBaliases\fR(5) file, and don't split owner-\fIlistname\fR and +# \fIlistname\fR-request address localparts when the recipient_delimiter +# is set to "-". +# .IP "\fBrecipient_delimiter (empty)\fR" +# 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). # .PP # Available in Postfix version 2.3 and later: -# .IP \fBfrozen_delivered_to\fR -# Update the local(8) delivery agent's Delivered-To: address -# (see prepend_delivered_header) only once, at the start of -# a delivery; do not update the Delivered-To: address while +# .IP "\fBfrozen_delivered_to (yes)\fR" +# Update the \fBlocal\fR(8) delivery agent's idea of the Delivered-To: +# address (see prepend_delivered_header) only once, at the start of +# a delivery attempt; do not update the Delivered-To: address while # expanding aliases or .forward files. # STANDARDS # RFC 822 (ARPA Internet Text Messages) diff -Nru postfix-3.2.5/proto/COMPATIBILITY_README.html postfix-3.3.0/proto/COMPATIBILITY_README.html --- postfix-3.2.5/proto/COMPATIBILITY_README.html 2015-02-20 21:43:45.000000000 +0000 +++ postfix-3.3.0/proto/COMPATIBILITY_README.html 2018-01-06 23:12:50.000000000 +0000 @@ -48,7 +48,7 @@ can decide if any backwards-compatible settings need to be made permanent in main.cf or master.cf, before turning off the backwards-compatibility safety net as described at the -end of this document.

      +end of this document.

      The following messages may be logged:

      @@ -60,6 +60,9 @@
    • Using backwards-compatible default setting chroot=y

      +
    • Using backwards-compatible +default setting smtpd_relay_restrictions = (empty)

      +
    • Using backwards-compatible default setting mynetworks_style=subnet

      @@ -79,15 +82,19 @@

      When no more backwards-compatible settings need to be made permanent, the system administrator should turn off the backwards-compatibility safety net as described at the -end of this document.

      +end of this document.

      Using backwards-compatible default setting append_dot_mydomain=yes

      The append_dot_mydomain default value has changed from "yes" -to "no". As long as the append_dot_mydomain parameter is left at -its implicit default value, and the backwards-compatible default -setting is turned on, Postfix may log one of the following messages:

      +to "no". This could result in unexpected non-delivery of email after +Postfix is updated from an older version. The backwards-compatibility +safety net is designed to prevent such surprises.

      + +

      As long as the append_dot_mydomain parameter is left at +its implicit default value, and the compatibility_level setting is +less than 1, Postfix may log one of the following messages:

        @@ -136,9 +143,16 @@ setting chroot=y

        The master.cf chroot default value has changed from "y" (yes) -to "n" (no). As long as a master.cf chroot field is left at its -implicit default value, and the backwards-compatible default setting -is turned on, Postfix may log the following message while it +to "n" (no). The new default avoids the need for copies of system +files under the Postfix queue directory. However, sites with strict +security requirements may want to keep the chroot feature enabled +after updating Postfix from an older version. The backwards-compatibility +safety net is designed allow the administrator to choose if they +want to keep the old behavior.

        + +

        As long as a master.cf chroot field is left at its +implicit default value, and the compatibility_level setting +is less than 1, Postfix may log the following message while it reads the master.cf file:

        @@ -160,15 +174,58 @@
        +

        Using backwards-compatible default +setting smtpd_relay_restrictions = (empty)

        + +

        The smtpd_relay_restrictions feature was introduced with Postfix +version 2.10, as a safety mechanism for configuration errors in +smtpd_recipient_restrictions that could make Postfix an open relay. +

        + +

        The smtpd_relay_restrictions implicit default setting forbids +mail to remote destinations from clients that don't match +permit_mynetworks or permit_sasl_authenticated. This could result +in unexpected 'Relay access denied' errors after Postfix is updated +from an older Postfix version. The backwards-compatibility safety +net is designed to prevent such surprises.

        + +

        When the compatibility_level less than 1, and the +smtpd_relay_restrictions parameter is left at its implicit default +setting, Postfix may log the following message:

        + +
        +
        +postfix/smtpd[38463]: using backwards-compatible default setting
        +    "smtpd_relay_restrictions = (empty)" to avoid "Relay access
        +    denied" error for recipient "user@example.com" from client
        +    "host.example.net[10.0.0.2]"
        +
        +
        + +

        If this request should not be blocked, then the system +administrator should make the backwards-compatible setting +"smtpd_relay_restrictions=" (i.e. empty) permanent in main.cf: + +

        +
        +# postconf smtpd_relay_restrictions=
        +# postfix reload
        +
        +
        +

        Using backwards-compatible default setting mynetworks_style=subnet

        The mynetworks_style default value has changed from "subnet" to "host". This parameter is used to implement the "permit_mynetworks" -feature. As long as the mynetworks and mynetworks_style parameters -are left at their implicit default values, and the backwards-compatible -default setting is turned on, the Postfix SMTP server may log one -of the following messages:

        +feature. The change could in unexpected 'access denied' errors after +Postfix is updated from an older version. The backwards-compatibility +safety net is designed to prevent such surprises.

        + +

        As long as the mynetworks and mynetworks_style parameters are +left at their implicit default values, and the compatibility_level +setting is less than 2, the Postfix SMTP server may log one of the +following messages:

        @@ -201,10 +258,14 @@
         setting relay_domains=$mydestination  
         
         

        The relay_domains default value has changed from "$mydestination" -to the empty value. As long as the relay_domains parameter is left -at its implicit default value, and the backwards-compatible default -setting is turned on, Postfix may log one of the following messages. -

        +to the empty value. This could result in unexpected 'Relay access +denied' errors or ETRN errors after Postfix is updated from an older +version. The backwards-compatibility safety net is designed to +prevent such surprises.

        + +

        As long as the relay_domains parameter is left at its implicit +default value, and the compatibility_level setting is less than 2, +Postfix may log one of the following messages.

          @@ -268,13 +329,13 @@

          The smtputf8_enable default value has changed from "no" to "yes. With the new "yes" setting, the Postfix SMTP server rejects non-ASCII -addresses from clients that don't request SMTPUTF8 support. With -the old "no" setting, Postfix will accept such addresses, even if -such addresses are not permitted by traditional SMTP standards.

          +addresses from clients that don't request SMTPUTF8 support, after +Postfix is updated from an older version. The backwards-compatibility +safety net is designed to prevent such surprises.

          As long as the smtputf8_enable parameter is left at its implicit -default value, and the backwards-compatible default setting is -turned on, Postfix logs a warning each time an SMTP command uses a +default value, and the compatibility_level setting is +less than 1, Postfix logs a warning each time an SMTP command uses a non-ASCII address localpart without requesting SMTPUTF8 support:

          diff -Nru postfix-3.2.5/proto/FORWARD_SECRECY_README.html postfix-3.3.0/proto/FORWARD_SECRECY_README.html --- postfix-3.2.5/proto/FORWARD_SECRECY_README.html 2017-12-26 15:48:34.000000000 +0000 +++ postfix-3.3.0/proto/FORWARD_SECRECY_README.html 2018-02-04 15:27:43.000000000 +0000 @@ -270,7 +270,7 @@ if the server's long-term authentication keys are later compromised.

          -

          Postfix ≥ 3.2 supports the curve negotitation API of OpenSSL +

          Postfix ≥ 3.2 supports the curve negotiation API of OpenSSL ≥ 1.0.2. The list of candidate curves can be changed via the "tls_eecdh_auto_curves" configuration parameter, which can be used to select a prioritized list of supported curves (most preferred diff -Nru postfix-3.2.5/proto/master postfix-3.3.0/proto/master --- postfix-3.2.5/proto/master 2016-09-08 11:02:49.000000000 +0000 +++ postfix-3.3.0/proto/master 2017-12-27 17:28:27.000000000 +0000 @@ -133,7 +133,7 @@ # place. # .sp # The files in the examples/chroot-setup subdirectory of the -# Postfix source archive show set up a Postfix chroot environment +# Postfix source show how to set up a Postfix chroot environment # on a variety of systems. See also BASIC_CONFIGURATION_README # for issues related to running daemons chrooted. # .IP "\fBWake up time (default: 0)\fR" diff -Nru postfix-3.2.5/proto/pgsql_table postfix-3.3.0/proto/pgsql_table --- postfix-3.2.5/proto/pgsql_table 2016-12-28 14:44:32.000000000 +0000 +++ postfix-3.3.0/proto/pgsql_table 2017-12-27 16:28:59.000000000 +0000 @@ -44,24 +44,22 @@ # .ad # .fi # .IP "\fBhosts\fR" -# The hosts that Postfix will try to connect to and query from. -# Specify \fIunix:\fR for UNIX-domain sockets, \fIinet:\fR for TCP -# connections (default). Example: +# The hosts that Postfix will try to connect to and query +# from. Besides a \fBpostgresql://\fR connection URI, this +# setting supports the historical forms \fBunix:/\fIpathname\fR +# for UNIX-domain sockets and \fBinet:\fIhost:port\fR for TCP +# connections, where the \fBunix:\fR and \fBinet:\fR prefixes +# are accepted and ignored for backwards compatibility. +# Examples: # .nf +# hosts = postgresql://username@example.com/tablename?sslmode=require # hosts = host1.some.domain host2.some.domain:port # hosts = unix:/file/name # .fi # -# The hosts are tried in random order, with all connections over -# UNIX domain sockets being tried before those over TCP. The -# connections are automatically closed after being idle for about -# 1 minute, and are re-opened as necessary. -# -# NOTE: the \fIunix:\fR and \fIinet:\fR prefixes are accepted for -# backwards compatibility reasons, but are actually ignored. -# The PostgreSQL client library will always try to connect to an -# UNIX socket if the name starts with a slash, and will try a TCP -# connection otherwise. +# The hosts are tried in random order. The connections are +# automatically closed after being idle for about 1 minute, +# and are re-opened as necessary. # .IP "\fBuser, password\fR" # The user name and password to log into the pgsql server. # Example: diff -Nru postfix-3.2.5/proto/postconf.proto postfix-3.3.0/proto/postconf.proto --- postfix-3.2.5/proto/postconf.proto 2017-02-08 00:34:24.000000000 +0000 +++ postfix-3.3.0/proto/postconf.proto 2018-02-04 15:40:28.000000000 +0000 @@ -1402,22 +1402,39 @@ %PARAM enable_original_recipient yes -

          Enable support for the X-Original-To message header. This header -is needed for multi-recipient mailboxes.

          +

          Enable support for the original recipient address after an +address is rewritten to a different address (for example with +aliasing or with canonical mapping).

          -

          When this parameter is set to yes, the cleanup(8) daemon performs -duplicate elimination on distinct pairs of (original recipient, -rewritten recipient), and generates non-empty original recipient -queue file records.

          - -

          When this parameter is set to no, the cleanup(8) daemon performs -duplicate elimination on the rewritten recipient address only, and -generates empty original recipient queue file records.

          - -

          This feature is available in Postfix 2.1 and later. With Postfix -version 2.0, support for the X-Original-To message header is always turned -on. Postfix versions before 2.0 have no support for the X-Original-To -message header.

          +

          The original recipient address is used as follows:

          + +
          + +
          Final delivery
          With "enable_original_recipient = +yes", the original recipient address is stored in the X-Original-To +message header. This header may be used to distinguish between +different recipients that share the same mailbox.
          + +
          Recipient deduplication
          With "enable_original_recipient += yes", the cleanup(8) daemon performs duplicate recipient elimination +based on the content of (original recipient, maybe-rewritten +recipient) pairs. Otherwise, the cleanup(8) daemon performs duplicate +recipient elimination based only on the maybe-rewritten recipient +address.
          + +
          + +

          Note: with Postfix ≤ 3.2 the "setting enable_original_recipient += no" breaks address verification for addresses that are +aliased or otherwise rewritten (Postfix is unable to store the +address verification result under the original probe destination +address; instead, it can store the result only under the rewritten +address).

          + +

          This feature is available in Postfix 2.1 and later. Postfix +version 2.0 behaves as if this parameter is always set to yes. +Postfix versions before 2.0 have no support for the original recipient +address.

          %PARAM export_environment see "postconf -d" output @@ -6121,8 +6138,9 @@ temporary problem (default: 450).
          The unverified_recipient_tempfail_action parameter specifies the action after address probe failure due to a temporary problem (default: -defer_if_permit).
          This feature is available in Postfix 2.1 -and later. +defer_if_permit).
          This feature breaks for aliased addresses +with "enable_original_recipient = no" (Postfix ≤ 3.2).
          +This feature is available in Postfix 2.1 and later. @@ -6590,8 +6608,10 @@ code when an address probe failed due to a temporary problem (default: 450).
          The unverified_sender_tempfail_action parameter specifies the action after address probe failure due to a temporary -problem (default: defer_if_permit).
          This feature is available -in Postfix 2.1 and later. +problem (default: defer_if_permit).
          This feature breaks for +aliased addresses with "enable_original_recipient = no" (Postfix +≤ 3.2).
          This feature is available in Postfix 2.1 and later. + @@ -7700,10 +7720,11 @@ %PARAM expand_owner_alias no

          -When delivering to an alias "aliasname" that has an "owner-aliasname" -companion alias, set the envelope sender address to the expansion -of the "owner-aliasname" alias. Normally, Postfix sets the envelope -sender address to the name of the "owner-aliasname" alias. +When delivering to an alias "aliasname" that has an +"owner-aliasname" companion alias, set the envelope sender +address to the expansion of the "owner-aliasname" alias. +Normally, Postfix sets the envelope sender address to the name of +the "owner-aliasname" alias.

          %PARAM fallback_transport @@ -8047,10 +8068,10 @@ %PARAM owner_request_special yes

          -Give special treatment to owner-listname and listname-request -address localparts: don't split such addresses when the -recipient_delimiter is set to "-". This feature is useful for -mailing lists. +Enable special treatment for owner-listname entries in the +aliases(5) file, and don't split owner-listname and +listname-request address localparts when the recipient_delimiter +is set to "-". This feature is useful for mailing lists.

          %PARAM permit_mx_backup_networks @@ -8108,6 +8129,30 @@ The process name of a Postfix command or daemon process.

          +%PARAM service_name read-only + +

          The master.cf service name of a Postfix daemon process. This +can be used to distinguish the logging from different services that +use the same program name.

          + +

          Example master.cf entries:

          + +
          +# Distinguish inbound MTA logging from submission and smtps logging.
          +smtp      inet  n       -       n       -       -       smtpd
          +submission inet n       -       n       -       -       smtpd
          +    -o syslog_name=postfix/$service_name
          +smtps     inet  n       -       n       -       -       smtpd
          +    -o syslog_name=postfix/$service_name
          +
          + +
          +# Distinguish outbound MTA logging from inbound relay logging.
          +smtp      unix  -       -       n       -       -       smtp
          +relay     unix  -       -       n       -       -       smtp
          +    -o syslog_name=postfix/$service_name
          +
          + %PARAM process_id read-only

          @@ -11044,7 +11089,7 @@ authentication and DNSSEC support is available with Postfix 2.11 and later. -

          fingerprint
          +
          fingerprint
          Certificate fingerprint verification. Available with Postfix 2.5 and later. At this security level, there are no trusted Certification Authorities. The certificate @@ -11443,7 +11488,7 @@ (DANE) TLS authentication is available with Postfix 2.11 and later.
          -
          fingerprint
          +
          fingerprint
          Certificate fingerprint verification. At this security level, there are no trusted Certification Authorities. The certificate trust chain, expiration date, etc., are @@ -14703,7 +14748,8 @@ "yes".

          As documented in aliases(5), when an alias name has a -companion alias named owner-name, delivery errors will be +companion alias named owner-name, this will replace the +envelope sender address, so that delivery errors will be reported to the owner alias instead of the sender. This configuration is recommended for mailing lists.

          @@ -14733,7 +14779,9 @@

          Unfortunately, older Postfix releases reset the owner-alias attribute when delivering mail to a child alias that does not have -its own owner alias. The local(8) delivery agent then attempts to +its own owner alias. To be precise, this resets only the decision +to create a new queue file, not the decision to override the envelope +sender address. The local(8) delivery agent then attempts to deliver local addresses as soon as they come out of child alias expansion. If delivery to any address from child alias expansion fails with a temporary error condition, the entire mailing list may @@ -16685,3 +16733,65 @@

          This feature is available in Postfix 3.2 and later.

          + +%PARAM smtp_balance_inet_protocols yes + +

          When a remote destination resolves to a combination of IPv4 and +IPv6 addresses, ensure that the Postfix SMTP client can try both +address types before it runs into the smtp_mx_address_limit.

          + +

          This avoids an interoperability problem when a destination resolves +to primarily IPv6 addresses, the smtp_address_limit feature eliminates +most or all IPv4 addresses, and the destination is not reachable over +IPv6.

          + +

          This feature is available in Postfix 3.3 and later.

          + +%PARAM lmtp_balance_inet_protocols yes + +

          The LMTP-specific version of the smtp_balance_inet_protocols +configuration parameter. See there for details.

          + +

          This feature is available in Postfix 3.3 and later.

          + +%PARAM header_from_format standard + +

          The format of the Postfix-generated From: header. This +setting affects the appearance of 'full name' information when a +local program such as /bin/mail submits a message without From: +header through the Postfix sendmail(1) command.

          + +

          Specify one of the following:

          + +
          + +
          standard (default)
          Produce a header formatted +as "From: name <address>". +This is the default as of Postfix 3.3.
          + +
          obsolete
          Produce a header formatted as "From: +address (name)". This is the behavior +prior to Postfix 3.3.
          + +
          + +

          Notes:

          + +
            + +
          • Postfix generates the format "From: address" +when name information is unavailable or the envelope sender +address is empty. This is the same behavior as prior to Postfix +3.3.

            + +
          • In the standard form, the name will be quoted +if it contains specials as defined in RFC 5322, or the "!%" +address operators.

            + +
          • The Postfix sendmail(1) command gets name information +from the -F command-line option, from the NAME +environment variable, or from the UNIX password file.

            + +
          + +

          This feature is available in Postfix 3.3 and later.

          diff -Nru postfix-3.2.5/proto/SASL_README.html postfix-3.3.0/proto/SASL_README.html --- postfix-3.2.5/proto/SASL_README.html 2015-07-26 13:44:36.000000000 +0000 +++ postfix-3.3.0/proto/SASL_README.html 2017-03-01 00:52:43.000000000 +0000 @@ -15,15 +15,6 @@
          -

          Warning

          - -

          People who go to the trouble of installing Postfix may have the -expectation that Postfix is more secure than some other mailers. -The Cyrus SASL library contains a lot of code. With this, Postfix -becomes as secure as other mail systems that use the Cyrus SASL -library. Dovecot provides an alternative that may be worth -considering.

          -

          How Postfix uses SASL authentication

          SMTP servers need to decide whether an SMTP client is authorized @@ -47,6 +38,13 @@ implementation that Postfix will use. This document covers both the Postfix and non-Postfix configuration.

          +

          NOTE: People who go to the trouble of installing Postfix may +have the expectation that Postfix is more secure than some other +mailers. The Cyrus SASL library contains a lot of code. With this, +Postfix becomes as secure as other mail systems that use the Cyrus +SASL library. Dovecot provides an alternative that may be worth +considering.

          +

          You can read more about the following topics:

            diff -Nru postfix-3.2.5/proto/socketmap_table postfix-3.3.0/proto/socketmap_table --- postfix-3.2.5/proto/socketmap_table 2016-02-14 01:38:56.000000000 +0000 +++ postfix-3.3.0/proto/socketmap_table 2018-01-28 16:17:57.000000000 +0000 @@ -25,7 +25,7 @@ # .fi # Socketmaps use a simple protocol: the client sends one # request, and the server sends one reply. Each request and -# reply are sent as one netstring object. +# each reply are sent as one netstring object. # REQUEST FORMAT # .ad # .fi diff -Nru postfix-3.2.5/proto/tcp_table postfix-3.3.0/proto/tcp_table --- postfix-3.2.5/proto/tcp_table 2016-02-14 01:38:56.000000000 +0000 +++ postfix-3.3.0/proto/tcp_table 2018-01-28 16:13:32.000000000 +0000 @@ -8,16 +8,16 @@ # # \fBpostmap -q - tcp:\fIhost:port\fB <\fIinputfile\fR # DESCRIPTION -# The Postfix mail system uses optional tables for address -# rewriting or mail routing. These tables are usually in -# \fBdbm\fR or \fBdb\fR format. Alternatively, table lookups -# can be directed to a TCP server. +# The Postfix mail system uses optional tables for address +# rewriting or mail routing. These tables are usually in +# \fBdbm\fR or \fBdb\fR format. Alternatively, table lookups +# can be directed to a TCP server. # -# To find out what types of lookup tables your Postfix system -# supports use the "\fBpostconf -m\fR" command. +# To find out what types of lookup tables your Postfix system +# supports use the "\fBpostconf -m\fR" command. # -# To test lookup tables, use the "\fBpostmap -q\fR" command as -# described in the SYNOPSIS above. +# To test lookup tables, use the "\fBpostmap -q\fR" command as +# described in the SYNOPSIS above. # PROTOCOL DESCRIPTION # .ad # .fi @@ -31,12 +31,17 @@ # REQUEST FORMAT # .ad # .fi -# Each request specifies a command, a lookup key, and possibly a -# lookup result. +# The tcp_table protocol supports only the lookup request. +# The request has the following form: # .IP "\fBget\fR SPACE \fIkey\fR NEWLINE" # Look up data under the specified key. -# .IP "\fBput\fR SPACE \fIkey\fR SPACE \fIvalue\fR NEWLINE" -# This request is currently not implemented. +# .PP +# Postfix will not generate partial search keys such as domain +# names without one or more subdomains, network addresses +# without one or more least-significant octets, or email +# addresses without the localpart, address extension or domain +# portion. This behavior is also found with cidr:, pcre:, and +# regexp: tables. # REPLY FORMAT # .ad # .fi @@ -44,7 +49,6 @@ # longer than 4096 characters including the newline terminator. # .IP "\fB500\fR SPACE \fItext\fR NEWLINE" # In case of a lookup request, the requested data does not exist. -# In case of an update request, the request was rejected. # The text describes the nature of the problem. # .IP "\fB400\fR SPACE \fItext\fR NEWLINE" # This indicates an error condition. The text describes the nature of diff -Nru postfix-3.2.5/proto/TLS_README.html postfix-3.3.0/proto/TLS_README.html --- postfix-3.2.5/proto/TLS_README.html 2016-12-17 23:22:04.000000000 +0000 +++ postfix-3.3.0/proto/TLS_README.html 2017-03-01 00:55:17.000000000 +0000 @@ -18,15 +18,6 @@
            -

            WARNING

            - -

            By turning on TLS support in Postfix, you not only get the -ability to encrypt mail and to authenticate remote SMTP clients or servers. -You also turn on thousands and thousands of lines of OpenSSL library -code. Assuming that OpenSSL is written as carefully as Wietse's -own code, every 1000 lines introduce one additional bug into -Postfix.

            -

            What Postfix TLS support does for you

            Transport Layer Security (TLS, formerly called SSL) provides @@ -34,13 +25,12 @@ encrypted session protects the information that is transmitted with SMTP mail or with SASL authentication.

            -

            NOTE: This document describes a TLS -user interface that was introduced with Postfix version 2.3. Support -for an older user interface is documented in TLS_LEGACY_README, -which also describes the differences between Postfix and the -third-party patch on which Postfix version 2.2 TLS support was -based.

            +

            NOTE: By turning on TLS support in Postfix, you not only get +the ability to encrypt mail and to authenticate remote SMTP clients +or servers. You also turn on hundreds of thousands of lines of +OpenSSL library code. Assuming that OpenSSL is written as carefully +as Wietse's own code, every 1000 lines introduce one additional bug +into Postfix.

            Topics covered in this document:

            diff -Nru postfix-3.2.5/README_FILES/ADDRESS_VERIFICATION_README postfix-3.3.0/README_FILES/ADDRESS_VERIFICATION_README --- postfix-3.2.5/README_FILES/ADDRESS_VERIFICATION_README 2015-01-29 22:33:49.000000000 +0000 +++ postfix-3.3.0/README_FILES/ADDRESS_VERIFICATION_README 2017-07-29 23:06:47.000000000 +0000 @@ -47,11 +47,9 @@ Probe messages are like normal mail, except that they are never delivered, deferred or bounced; probe messages are always discarded. - probe Postfix message -> mail - queue - Postfix Postfix -> + Postfix Postfix -> queue Internet -> SMTP <-> verify server server | v @@ -62,7 +60,6 @@ ^ | v - Address verification @@ -167,6 +164,12 @@ # Postfix 2.6 and later privacy feature. # unverified_recipient_reject_reason = Address lookup failed + # Postfix 3.2 and earlier workaround. + # Do not set enable_original_recipient=no. This prevents Postfix + # from saving the recipient address verification result under + # the original address, when the address verification probe + # message goes through address aliasing or canonical mapping. + The "reject_unknown_recipient_domain" restriction blocks mail for non-existent domains. Putting this before "reject_unverified_recipient" avoids the overhead of generating unnecessary probe messages. @@ -207,6 +210,12 @@ # Note 2: Avoid hash files here. Use btree or lmdb instead. address_verify_map = btree:/var/lib/postfix/verify + # Postfix 3.2 and earlier workaround. + # Do not set enable_original_recipient=no. This prevents Postfix + # from saving the sender address verification result under the + # original address, when the address verification probe message + # goes through address aliasing or canonical mapping. + /etc/postfix/sender_access: # Don't do this when you handle lots of email. aol.com reject_unverified_sender diff -Nru postfix-3.2.5/README_FILES/COMPATIBILITY_README postfix-3.3.0/README_FILES/COMPATIBILITY_README --- postfix-3.2.5/README_FILES/COMPATIBILITY_README 2015-02-20 21:43:51.000000000 +0000 +++ postfix-3.3.0/README_FILES/COMPATIBILITY_README 2018-01-06 23:15:54.000000000 +0000 @@ -33,6 +33,9 @@ * Using backwards-compatible default setting chroot=y + * Using backwards-compatible default setting smtpd_relay_restrictions = + (empty) + * Using backwards-compatible default setting mynetworks_style=subnet * Using backwards-compatible default setting relay_domains=$mydestination @@ -49,10 +52,14 @@ UUssiinngg bbaacckkwwaarrddss--ccoommppaattiibbllee ddeeffaauulltt sseettttiinngg aappppeenndd__ddoott__mmyyddoommaaiinn==yyeess -The append_dot_mydomain default value has changed from "yes" to "no". As long -as the append_dot_mydomain parameter is left at its implicit default value, and -the backwards-compatible default setting is turned on, Postfix may log one of -the following messages: +The append_dot_mydomain default value has changed from "yes" to "no". This +could result in unexpected non-delivery of email after Postfix is updated from +an older version. The backwards-compatibility safety net is designed to prevent +such surprises. + +As long as the append_dot_mydomain parameter is left at its implicit default +value, and the compatibility_level setting is less than 1, Postfix may log one +of the following messages: * Messages about missing "localhost" in mydestination or other address class: @@ -81,10 +88,16 @@ UUssiinngg bbaacckkwwaarrddss--ccoommppaattiibbllee ddeeffaauulltt sseettttiinngg cchhrroooott==yy -The master.cf chroot default value has changed from "y" (yes) to "n" (no). As -long as a master.cf chroot field is left at its implicit default value, and the -backwards-compatible default setting is turned on, Postfix may log the -following message while it reads the master.cf file: +The master.cf chroot default value has changed from "y" (yes) to "n" (no). The +new default avoids the need for copies of system files under the Postfix queue +directory. However, sites with strict security requirements may want to keep +the chroot feature enabled after updating Postfix from an older version. The +backwards-compatibility safety net is designed allow the administrator to +choose if they want to keep the old behavior. + +As long as a master.cf chroot field is left at its implicit default value, and +the compatibility_level setting is less than 1, Postfix may log the following +message while it reads the master.cf file: postfix/master[27664]: /etc/postfix/master.cf: line 72: using backwards-compatible default setting chroot=y @@ -96,13 +109,45 @@ # ppoossttccoonnff --FF ssmmttpp//iinneett//cchhrroooott==yy # ppoossttffiixx rreellooaadd +UUssiinngg bbaacckkwwaarrddss--ccoommppaattiibbllee ddeeffaauulltt sseettttiinngg ssmmttppdd__rreellaayy__rreessttrriiccttiioonnss == ((eemmppttyy)) + +The smtpd_relay_restrictions feature was introduced with Postfix version 2.10, +as a safety mechanism for configuration errors in smtpd_recipient_restrictions +that could make Postfix an open relay. + +The smtpd_relay_restrictions implicit default setting forbids mail to remote +destinations from clients that don't match permit_mynetworks or +permit_sasl_authenticated. This could result in unexpected 'Relay access +denied' errors after Postfix is updated from an older Postfix version. The +backwards-compatibility safety net is designed to prevent such surprises. + +When the compatibility_level less than 1, and the smtpd_relay_restrictions +parameter is left at its implicit default setting, Postfix may log the +following message: + + postfix/smtpd[38463]: using backwards-compatible default setting + "smtpd_relay_restrictions = (empty)" to avoid "Relay access + denied" error for recipient "user@example.com" from client + "host.example.net[10.0.0.2]" + +If this request should not be blocked, then the system administrator should +make the backwards-compatible setting "smtpd_relay_restrictions=" (i.e. empty) +permanent in main.cf: + + # ppoossttccoonnff ssmmttppdd__rreellaayy__rreessttrriiccttiioonnss== + # ppoossttffiixx rreellooaadd + UUssiinngg bbaacckkwwaarrddss--ccoommppaattiibbllee ddeeffaauulltt sseettttiinngg mmyynneettwwoorrkkss__ssttyyllee==ssuubbnneett The mynetworks_style default value has changed from "subnet" to "host". This -parameter is used to implement the "permit_mynetworks" feature. As long as the -mynetworks and mynetworks_style parameters are left at their implicit default -values, and the backwards-compatible default setting is turned on, the Postfix -SMTP server may log one of the following messages: +parameter is used to implement the "permit_mynetworks" feature. The change +could in unexpected 'access denied' errors after Postfix is updated from an +older version. The backwards-compatibility safety net is designed to prevent +such surprises. + +As long as the mynetworks and mynetworks_style parameters are left at their +implicit default values, and the compatibility_level setting is less than 2, +the Postfix SMTP server may log one of the following messages: postfix/smtpd[17375]: using backwards-compatible default setting mynetworks_style=subnet to permit request from client @@ -122,9 +167,13 @@ UUssiinngg bbaacckkwwaarrddss--ccoommppaattiibbllee ddeeffaauulltt sseettttiinngg rreellaayy__ddoommaaiinnss==$$mmyyddeessttiinnaattiioonn The relay_domains default value has changed from "$mydestination" to the empty -value. As long as the relay_domains parameter is left at its implicit default -value, and the backwards-compatible default setting is turned on, Postfix may -log one of the following messages. +value. This could result in unexpected 'Relay access denied' errors or ETRN +errors after Postfix is updated from an older version. The backwards- +compatibility safety net is designed to prevent such surprises. + +As long as the relay_domains parameter is left at its implicit default value, +and the compatibility_level setting is less than 2, Postfix may log one of the +following messages. * Messages about accepting mail for a remote domain: @@ -163,14 +212,14 @@ The smtputf8_enable default value has changed from "no" to "yes. With the new "yes" setting, the Postfix SMTP server rejects non-ASCII addresses from clients -that don't request SMTPUTF8 support. With the old "no" setting, Postfix will -accept such addresses, even if such addresses are not permitted by traditional -SMTP standards. +that don't request SMTPUTF8 support, after Postfix is updated from an older +version. The backwards-compatibility safety net is designed to prevent such +surprises. As long as the smtputf8_enable parameter is left at its implicit default value, -and the backwards-compatible default setting is turned on, Postfix logs a -warning each time an SMTP command uses a non-ASCII address localpart without -requesting SMTPUTF8 support: +and the compatibility_level setting is less than 1, Postfix logs a warning each +time an SMTP command uses a non-ASCII address localpart without requesting +SMTPUTF8 support: postfix/smtpd[27560]: using backwards-compatible default setting smtputf8_enable=no to accept non-ASCII sender address diff -Nru postfix-3.2.5/README_FILES/FORWARD_SECRECY_README postfix-3.3.0/README_FILES/FORWARD_SECRECY_README --- postfix-3.2.5/README_FILES/FORWARD_SECRECY_README 2018-01-28 02:25:11.000000000 +0000 +++ postfix-3.3.0/README_FILES/FORWARD_SECRECY_README 2018-02-04 15:27:52.000000000 +0000 @@ -195,8 +195,8 @@ between the server and client will resist decryption even if the server's long- term authentication keys are later compromised. -Postfix >= 3.2 supports the curve negotitation API of OpenSSL >= 1.0.2. The -list of candidate curves can be changed via the "tls_eecdh_auto_curves" +Postfix >= 3.2 supports the curve negotiation API of OpenSSL >= 1.0.2. The list +of candidate curves can be changed via the "tls_eecdh_auto_curves" configuration parameter, which can be used to select a prioritized list of supported curves (most preferred first) on both the Postfix SMTP server and SMTP client. The default list is suitable for most users. diff -Nru postfix-3.2.5/README_FILES/MILTER_README postfix-3.3.0/README_FILES/MILTER_README --- postfix-3.2.5/README_FILES/MILTER_README 2018-01-28 02:23:50.000000000 +0000 +++ postfix-3.3.0/README_FILES/MILTER_README 2017-12-26 15:47:13.000000000 +0000 @@ -1,8 +1,8 @@ -Postfix before-queue Milter support +PPoossttffiixx bbeeffoorree--qquueeuuee MMiilltteerr ssuuppppoorrtt ------------------------------------------------------------------------------- -Introduction +IInnttrroodduuccttiioonn Postfix implements support for the Sendmail version 8 Milter (mail filter) protocol. This protocol is used by applications that run outside the MTA to @@ -30,7 +30,7 @@ * Workarounds * Limitations -How Milter applications plug into Postfix +HHooww MMiilltteerr aapppplliiccaattiioonnss pplluugg iinnttoo PPoossttffiixx The Postfix Milter implementation uses two different lists of mail filters: one list of filters for SMTP mail only, and one list of filters for non-SMTP mail. @@ -80,7 +80,7 @@ Local -> sendmail(1) -Building Milter applications +BBuuiillddiinngg MMiilltteerr aapppplliiccaattiioonnss Milter applications have been written in C, JAVA and Perl, but this document deals with C applications only. For these, you need an object library that @@ -94,25 +94,25 @@ Once libmilter is installed, applications such as OpenDKIM and OpenDMARC build out of the box without requiring any tinkering: - $ gzcat opendkim-x.y.z.tar.gz | tar xf - - $ cd opendkim-x.y.z - $ ./configure ...options... - $ make + $ ggzzccaatt ooppeennddkkiimm--xx..yy..zz..ttaarr..ggzz || ttaarr xxff -- + $ ccdd ooppeennddkkiimm--xx..yy..zz + $ ..//ccoonnffiigguurree ......ooppttiioonnss...... + $ mmaakkee [...lots of output omitted...] - $ make install + $ mmaakkee iinnssttaallll -Running Milter applications +RRuunnnniinngg MMiilltteerr aapppplliiccaattiioonnss To run a Milter application, see the documentation of the filter for options. A typical command looks like this: - # /some/where/opendkim -l -u userid -p inet:portnumber@localhost ...other - options... + # //ssoommee//wwhheerree//ooppeennddkkiimm --ll --uu uusseerriidd --pp iinneett::ppoorrttnnuummbbeerr@@llooccaallhhoosstt ......ootthheerr + ooppttiioonnss...... Please specify a userid value that isn't used for other applications (not "postfix", not "www", etc.). -Configuring Postfix +CCoonnffiigguurriinngg PPoossttffiixx Like Sendmail, Postfix has a lot of configuration options that control how it talks to Milter applications. Besides global options that apply to all Milter @@ -131,7 +131,7 @@ * Sendmail macro emulation * What macros will Postfix send to Milters? -SMTP-Only Milter applications +SSMMTTPP--OOnnllyy MMiilltteerr aapppplliiccaattiioonnss The SMTP-only Milter applications handle mail that arrives via the Postfix smtpd(8) server. They are typically used to filter unwanted mail, and to sign @@ -159,23 +159,23 @@ The general syntax for listening sockets is as follows: - unix:pathname + uunniixx::pathname Connect to the local UNIX-domain server that is bound to the specified pathname. If the smtpd(8) or cleanup(8) process runs chrooted, an absolute pathname is interpreted relative to the Postfix queue directory. - inet:host:port + iinneett::host::port Connect to the specified TCP port on the specified local or remote host. The host and port can be specified in numeric or symbolic form. NOTE: Postfix syntax differs from Milter syntax which has the form - inet:port@host. + iinneett::port@@host. For advanced configuration see "Different settings for different SMTP clients" and "Different settings for different Milter applications". -Non-SMTP Milter applications +NNoonn--SSMMTTPP MMiilltteerr aapppplliiccaattiioonnss The non-SMTP Milter applications handle mail that arrives via the Postfix sendmail(1) command-line or via the Postfix qmqpd(8) server. They are typically @@ -226,7 +226,7 @@ non_smtpd_milters application REJECTs or TEMPFAILs a recipient, Postfix will report a configuration error, and mail will stay in the queue. -Signing internally-generated bounce messages +SSiiggnniinngg iinntteerrnnaallllyy--ggeenneerraatteedd bboouunnccee mmeessssaaggeess Postfix normally does not apply content filters to mail that is generated internally such as bounces or Postmaster notifications. Filtering internally- @@ -243,7 +243,7 @@ 4 header_checks = don't reject internally-generated bounces 5 body_checks = don't reject internally-generated bounces -Milter error handling +MMiilltteerr eerrrroorr hhaannddlliinngg The milter_default_action parameter specifies how Postfix handles Milter application errors. The default action is to respond with a temporary error @@ -260,16 +260,16 @@ See "Different settings for different Milter applications" for advanced configuration options. -Milter protocol version +MMiilltteerr pprroottooccooll vveerrssiioonn As Postfix is not built with the Sendmail libmilter library, you may need to configure the Milter protocol version that Postfix should use. The default version is 6 (before Postfix 2.6 the default version is 2). /etc/postfix/main.cf: - # Postfix ≥ 2.6 + # Postfix >= 2.6 milter_protocol = 6 - # 2.3 ≤ Postfix ≤ 2.5 + # 2.3 <= Postfix <= 2.5 milter_protocol = 2 If the Postfix milter_protocol setting specifies a too low version, the @@ -298,21 +298,21 @@ See "Different settings for different Milter applications" for advanced configuration options. -Milter protocol timeouts +MMiilltteerr pprroottooccooll ttiimmeeoouuttss Postfix uses different time limits at different Milter protocol stages. The table shows the timeout settings and the corresponding protocol stages (EOH = end of headers; EOM = end of message). - _________________________________________________________________ - |Postfix parameter |Time limit|Milter protocol stage | - |______________________|__________|_______________________________| + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + |PPoossttffiixx ppaarraammeetteerr |TTiimmee lliimmiitt|MMiilltteerr pprroottooccooll ssttaaggee | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |milter_connect_timeout|30s |CONNECT | - |______________________|__________|_______________________________| + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |milter_command_timeout|30s |HELO, MAIL, RCPT, DATA, UNKNOWN| - |______________________|__________|_______________________________| + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |milter_content_timeout|300s |HEADER, EOH, BODY, EOM | - |______________________|__________|_______________________________| + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | Beware: 30s may be too short for Milter applications that do lots of DNS lookups. However, if you increase the above timeouts too much, remote SMTP @@ -322,7 +322,7 @@ See "Different settings for different Milter applications" for advanced configuration options. -Different settings for different Milter applications +DDiiffffeerreenntt sseettttiinnggss ffoorr ddiiffffeerreenntt MMiilltteerr aapppplliiccaattiioonnss The previous sections list a number of Postfix main.cf parameters that control time limits and other settings for all Postfix Milter clients. This is @@ -349,11 +349,11 @@ content_timeout, default_action, and protocol. 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 or -comma within a value or around "=". +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 oorr +ccoommmmaa wwiitthhiinn aa vvaalluuee oorr aarroouunndd ""=="". -Different settings for different SMTP clients +DDiiffffeerreenntt sseettttiinnggss ffoorr ddiiffffeerreenntt SSMMTTPP cclliieennttss The smtpd_milter_maps feature supports different Milter settings for different client IP addresses. Lookup results override the the global smtpd_milters @@ -373,7 +373,7 @@ This feature is available with Postfix 3.2 and later. -Sendmail macro emulation +SSeennddmmaaiill mmaaccrroo eemmuullaattiioonn Postfix emulates a limited number of Sendmail macros, as shown in the table. Some macro values depend on whether a recipient is rejected (rejected @@ -382,70 +382,92 @@ EOM = end-of-message); their availability is not always the same as in Sendmail. See the workarounds section below for solutions. - _________________________________________________________________________________________________________________________________________ - |Sendmail macro |Milter protocol stage |Description | - |____________________|_______________________________________________|____________________________________________________________________| - |i |DATA, EOH, EOM |Queue ID, also Postfix queue file name | - |____________________|_______________________________________________|____________________________________________________________________| - |j |Always |Value of myhostname | - |____________________|_______________________________________________|____________________________________________________________________| - |_ |Always |The validated client name and address | - |____________________|_______________________________________________|____________________________________________________________________| - |{auth_authen} |MAIL, DATA, EOH, EOM |SASL login name | - |____________________|_______________________________________________|____________________________________________________________________| - |{auth_author} |MAIL, DATA, EOH, EOM |SASL sender | - |____________________|_______________________________________________|____________________________________________________________________| - |{auth_type} |MAIL, DATA, EOH, EOM |SASL login method | - |____________________|_______________________________________________|____________________________________________________________________| - |{client_addr} |Always |Remote client IP address | - |____________________|_______________________________________________|____________________________________________________________________| - |{client_connections}|CONNECT |Connection concurrency for this client (zero if the client is | - | | |excluded from all smtpd_client_* limits). | - |____________________|_______________________________________________|____________________________________________________________________| - | | |Remote client hostname | - |{client_name} |Always |When address → name lookup or name → address verification fails:| - | | |"unknown" | - |____________________|_______________________________________________|____________________________________________________________________| - |{client_port} |Always (Postfix ≥2.5) |Remote client TCP port | - |____________________|_______________________________________________|____________________________________________________________________| - |{client_ptr} |CONNECT, HELO, MAIL, DATA |Client name from address → name lookup | - | | |When address → name lookup fails: "unknown" | - |____________________|_______________________________________________|____________________________________________________________________| - |{cert_issuer} |HELO, MAIL, DATA, EOH, EOM |TLS client certificate issuer | - |____________________|_______________________________________________|____________________________________________________________________| - |{cert_subject} |HELO, MAIL, DATA, EOH, EOM |TLS client certificate subject | - |____________________|_______________________________________________|____________________________________________________________________| - |{cipher_bits} |HELO, MAIL, DATA, EOH, EOM |TLS session key size | - |____________________|_______________________________________________|____________________________________________________________________| - |{cipher} |HELO, MAIL, DATA, EOH, EOM |TLS cipher | - |____________________|_______________________________________________|____________________________________________________________________| - |{daemon_addr} |Always (Postfix ≥3.2) |Local server IP address | - |____________________|_______________________________________________|____________________________________________________________________| - |{daemon_name} |Always |value of milter_macro_daemon_name | - |____________________|_______________________________________________|____________________________________________________________________| - |{daemon_port} |Always (Postfix ≥3.2) |Local server TCP port | - |____________________|_______________________________________________|____________________________________________________________________| - |{mail_addr} |MAIL |Sender address | - |____________________|_______________________________________________|____________________________________________________________________| - |{mail_host} |MAIL (Postfix ≥ 2.6, only with smtpd_milters)|Sender next-hop destination | - |____________________|_______________________________________________|____________________________________________________________________| - |{mail_mailer} |MAIL (Postfix ≥ 2.6, only with smtpd_milters)|Sender mail delivery transport | - |____________________|_______________________________________________|____________________________________________________________________| - |{rcpt_addr} |RCPT |Recipient address | - | | |With rejected recipient: descriptive text | - |____________________|_______________________________________________|____________________________________________________________________| - |{rcpt_host} |RCPT (Postfix ≥ 2.6, only with smtpd_milters)|Recipient next-hop destination | - | | |With rejected recipient: enhanced status code | - |____________________|_______________________________________________|____________________________________________________________________| - |{rcpt_mailer} |RCPT (Postfix ≥ 2.6, only with smtpd_milters)|Recipient mail delivery transport | - | | |With rejected recipient: "error" | - |____________________|_______________________________________________|____________________________________________________________________| - |{tls_version} |HELO, MAIL, DATA, EOH, EOM |TLS protocol version | - |____________________|_______________________________________________|____________________________________________________________________| - |v |Always |value of milter_macro_v | - |____________________|_______________________________________________|____________________________________________________________________| + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + |SSeennddmmaaiill mmaaccrroo |MMiilltteerr pprroottooccooll ssttaaggee |DDeessccrriippttiioonn | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |i |DATA, EOH, EOM |Queue ID, also Postfix | + | | |queue file name | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |j |Always |Value of myhostname | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |_ |Always |The validated client name | + | | |and address | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |{auth_authen} |MAIL, DATA, EOH, EOM |SASL login name | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |{auth_author} |MAIL, DATA, EOH, EOM |SASL sender | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |{auth_type} |MAIL, DATA, EOH, EOM |SASL login method | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |{client_addr} |Always |Remote client IP address | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + | | |Connection concurrency for| + | | |this client (zero if the | + |{client_connections}|CONNECT |client is excluded from | + | | |all smtpd_client_* | + | | |limits). | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + | | |Remote client hostname | + | | |When address -> name | + |{client_name} |Always |lookup or name -> address | + | | |verification fails: | + | | |"unknown" | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |{client_port} |Always (Postfix >=2.5) |Remote client TCP port | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + | | |Client name from address -| + |{client_ptr} |CONNECT, HELO, MAIL, DATA|> name lookup | + | | |When address -> name | + | | |lookup fails: "unknown" | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |{cert_issuer} |HELO, MAIL, DATA, EOH, |TLS client certificate | + | |EOM |issuer | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |{cert_subject} |HELO, MAIL, DATA, EOH, |TLS client certificate | + | |EOM |subject | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |{cipher_bits} |HELO, MAIL, DATA, EOH, |TLS session key size | + | |EOM | | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |{cipher} |HELO, MAIL, DATA, EOH, |TLS cipher | + | |EOM | | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |{daemon_addr} |Always (Postfix >=3.2) |Local server IP address | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |{daemon_name} |Always |value of | + | | |milter_macro_daemon_name | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |{daemon_port} |Always (Postfix >=3.2) |Local server TCP port | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |{mail_addr} |MAIL |Sender address | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |{mail_host} |MAIL (Postfix >= 2.6, |Sender next-hop | + | |only with smtpd_milters) |destination | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |{mail_mailer} |MAIL (Postfix >= 2.6, |Sender mail delivery | + | |only with smtpd_milters) |transport | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + | | |Recipient address | + |{rcpt_addr} |RCPT |With rejected recipient: | + | | |descriptive text | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + | | |Recipient next-hop | + |{rcpt_host} |RCPT (Postfix >= 2.6, |destination | + | |only with smtpd_milters) |With rejected recipient: | + | | |enhanced status code | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + | | |Recipient mail delivery | + |{rcpt_mailer} |RCPT (Postfix >= 2.6, |transport | + | |only with smtpd_milters) |With rejected recipient: | + | | |"error" | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |{tls_version} |HELO, MAIL, DATA, EOH, |TLS protocol version | + | |EOM | | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |v |Always |value of milter_macro_v | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | -What macros will Postfix send to Milters? +WWhhaatt mmaaccrrooss wwiillll PPoossttffiixx sseenndd ttoo MMiilltteerrss?? Postfix sends specific sets of macros at different Milter protocol stages. The sets are configured with the parameters as shown in the table below (EOH = end @@ -456,26 +478,26 @@ receive at different Milter protocol stages. An application-specified list takes precedence over a Postfix-specified list. - ___________________________________________________________________ - |Postfix parameter |Milter protocol|Milter protocol stage| - | |version | | - |_____________________________|_______________|_____________________| + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + |PPoossttffiixx ppaarraammeetteerr |MMiilltteerr pprroottooccooll|MMiilltteerr pprroottooccooll ssttaaggee| + | |vveerrssiioonn | | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |milter_connect_macros |2 or higher |CONNECT | - |_____________________________|_______________|_____________________| + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |milter_helo_macros |2 or higher |HELO/EHLO | - |_____________________________|_______________|_____________________| + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |milter_mail_macros |2 or higher |MAIL FROM | - |_____________________________|_______________|_____________________| + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |milter_rcpt_macros |2 or higher |RCPT TO | - |_____________________________|_______________|_____________________| + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |milter_data_macros |4 or higher |DATA | - |_____________________________|_______________|_____________________| + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |milter_end_of_header_macros |6 or higher |EOH | - |_____________________________|_______________|_____________________| + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |milter_end_of_data_macros |2 or higher |EOM | - |_____________________________|_______________|_____________________| + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |milter_unknown_command_macros|3 or higher |unknown command | - |_____________________________|_______________|_____________________| + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | By default, Postfix will send only macros whose values have been updated with information from main.cf or master.cf, from an SMTP session (for example; SASL @@ -487,7 +509,7 @@ zero or more name=value pairs separated by comma or whitespace; you may even specify macro names that Postfix does know about! -Workarounds +WWoorrkkaarroouunnddss * To avoid breaking DKIM etc. signatures with an SMTP-based content filter, update the before-filter SMTP client in master.cf, and add a line with "- @@ -506,7 +528,7 @@ * Some Milter applications use the "{if_addr}" macro to recognize local mail; this macro does not exist in Postfix. Workaround: use the "{daemon_addr}" - (Postfix ≥ 3.2) or "{client_addr}" macro instead. + (Postfix >= 3.2) or "{client_addr}" macro instead. * Some Milter applications log a warning that looks like this: @@ -535,19 +557,19 @@ o Edit the filter source file (typically named xxx-filter/xxx-filter.c or similar). - o Look up the mlfi_eom() function and add code near the top shown as bold + o Look up the mlfi_eom() function and add code near the top shown as bboolldd text below: dfc = cc->cctx_msg; assert(dfc != NULL); - /* Determine the job ID for logging. */ - if (dfc->mctx_jobid == 0 || strcmp(dfc->mctx_jobid, JOBIDUNKNOWN) == 0) - { - char *jobid = smfi_getsymval(ctx, "i"); - if (jobid != 0) - dfc->mctx_jobid = jobid; - } + //** DDeetteerrmmiinnee tthhee jjoobb IIDD ffoorr llooggggiinngg.. **// + iiff ((ddffcc-->>mmccttxx__jjoobbiidd ==== 00 |||| ssttrrccmmpp((ddffcc-->>mmccttxx__jjoobbiidd,, JJOOBBIIDDUUNNKKNNOOWWNN)) ==== 00)) + {{ + cchhaarr **jjoobbiidd == ssmmffii__ggeettssyymmvvaall((ccttxx,, ""ii""));; + iiff ((jjoobbiidd !!== 00)) + ddffcc-->>mmccttxx__jjoobbiidd == jjoobbiidd;; + }} NOTES: @@ -559,7 +581,7 @@ o This change fixes only the ugly message header, but not the WARNING message. Fortunately, many Milters log that message only once. -Limitations +LLiimmiittaattiioonnss This section lists limitations of the Postfix Milter implementation. Some limitations will be removed as the implementation is extended over time. Of @@ -569,22 +591,22 @@ * The Milter protocol has evolved over time. Therefore, different Postfix versions implement different feature sets. - ________________________________________________________________________ - |Postfix|Supported Milter requests | - |_______|________________________________________________________________| + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + |PPoossttffiixx|SSuuppppoorrtteedd MMiilltteerr rreeqquueessttss | + |_ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | | 2.6 |All Milter requests of Sendmail 8.14.0 (see notes below). | - |_______|________________________________________________________________| + |_ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | | |All Milter requests of Sendmail 8.14.0, except: | | |SMFIP_RCPT_REJ (report rejected recipients to the mail filter), | | 2.5 |SMFIR_CHGFROM (replace sender, with optional ESMTP parameters), | | |SMFIR_ADDRCPT_PAR (add recipient, with optional ESMTP | | |parameters). | - |_______|________________________________________________________________| + |_ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | | 2.4 |All Milter requests of Sendmail 8.13.0. | - |_______|________________________________________________________________| + |_ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | | 2.3 |All Milter requests of Sendmail 8.13.0, except: | | |SMFIR_REPLBODY (replace message body). | - |_______|________________________________________________________________| + |_ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | * For Milter applications that are written in C, you need to use the Sendmail libmilter library. diff -Nru postfix-3.2.5/README_FILES/RELEASE_NOTES postfix-3.3.0/README_FILES/RELEASE_NOTES --- postfix-3.2.5/README_FILES/RELEASE_NOTES 2018-01-28 01:09:29.000000000 +0000 +++ postfix-3.3.0/README_FILES/RELEASE_NOTES 2018-02-11 16:09:16.000000000 +0000 @@ -1,190 +1,124 @@ -This is the Postfix 3.2 (stable) release. +This is the Postfix 3.3 (stable) release. -The stable Postfix release is called postfix-3.2.x where 3=major -release number, 2=minor release number, x=patchlevel. The stable +The stable Postfix release is called postfix-3.3.x where 3=major +release number, 3=minor release number, x=patchlevel. The stable release never changes except for patches that address bugs or emergencies. Patches change the patchlevel and the release date. New features are developed in snapshot releases. These are called -postfix-3.3-yyyymmdd where yyyymmdd is the release date (yyyy=year, -mm=month, dd=day). Patches are never issued for snapshot releases; +postfix-3.4-yyyymmdd where yyyymmdd is the release date (yyyy=year, +mm=month, dd=day). Patches are never issued for snapshot releases; instead, a new snapshot is released. The mail_release_date configuration parameter (format: yyyymmdd) specifies the release date of a stable release or snapshot release. -If you upgrade from Postfix 3.0 or earlier, read RELEASE_NOTES-3.1 +If you upgrade from Postfix 3.1 or earlier, read RELEASE_NOTES-3.2 before proceeding. -License change with Postfix 3.2.5 +License change +--------------- + +This software is distributed with a dual license: in addition to the +historical IBM Public License 1.0, it is now also distributed with the +more recent Eclipse Public License 2.0. Recipients can choose to take +the software under the license of their choice. Those who are more +comfortable with the IPL can continue with that license. + +Major changes - compatibility safety net +---------------------------------------- + +[20180106] With compatibility_level < 1, the Postfix SMTP server +now warns for mail that would be blocked by the Postfix 2.10 +smtpd_relay_restrictions feature, without blocking that mail. This +extends the compatibility safety net for sites that upgrade from +earlier Postfix versions (questions on the postfix-users list show +there is a steady trickle). See COMPATIBILITY_README for details. + +Major changes - configuration +----------------------------- + +[20170617] The postconf command now warns about unknown parameter +names in a Postfix database configuration file. As with other unknown +parameter names, these warnings can help to find typos early. + +[20180113] New read-only service_name parameter that contains the +master.cf service name of a Postfix daemon process (it that is empty +in a non-daemon process). This can make Postfix SMTP server logging +logging distinct by setting the syslog_name in master.cf with "-o +syslog_name=postfix/$service_name" for the "submission" and "smtps" +services, and can make Postfix SMTP client distinct by setting "-o +syslog_name=postfix/$service_name" for the "relay" service. + +Major changes - container support --------------------------------- -Starting with Postfix 3.2.5, this software is distributed with a -dual license: in addition to the historical IBM Public License 1.0, -it is now also distributed with the more recent Eclipse Public -License 2.0. Recipients can choose to take the software under the -license of their choice. Those who are more comfortable with the -IPL can continue with that license. - -Invisible changes ------------------ - -In addition to the visible changes described below, there is an -ongoing overhaul of low-level code. With each change come updated -tests to ensure that future changes will not 'break' compatibility -with past behavior. - -Major changes - address mapping -------------------------------- - -[Feature 20170128] Postfix 3.2 fixes the handling of address -extensions with email addresses that contain spaces. For example, -the virtual_alias_maps, canonical_maps, and smtp_generic_maps -features now correctly propagate an address extension from "aa -bb+ext"@example.com to "cc dd+ext"@other.example, instead of -producing broken output. - -Major changes - header/body_checks ----------------------------------- - -[Feature 20161008] "PASS" and "STRIP" actions in header/body_checks. -"STRIP" is similar to "IGNORE" but also logs the action, and "PASS" -disables header, body, and Milter inspection for the remainder of -the message content. Contributed by Hobbit. - -Major changes - log analysis ----------------------------- - -[Feature 20160330] The collate.pl script by Viktor Dukhovni for -grouping Postfix logfile records into "sessions" based on queue ID -and process ID information. It's in the auxiliary/collate directory -of the Postfix source tree. - -Major changes - maps support ----------------------------- - -[Feature 20160527] Postfix 3.2 cidr tables support if/endif and -negation (by prepending ! to a pattern), just like regexp and pcre -tables. The primarily purpose is to improve readability of complex -tables. See the cidr_table(5) manpage for syntax details. - -[Incompat 20160925] In the Postfix MySQL database client, the default -option_group value has changed to "client", to enable reading of -"client" option group settings in the MySQL options file. This fixes -a "not found" problem with Postfix queries that contain UTF8-encoded -non-ASCII text. Specify an empty option_group value (option_group -=) to get backwards-compatible behavior. - -[Feature 20161217] Stored-procedure support for MySQL databases. -Contributed by John Fawcett. See mysql_table(5) for instructions. - -[Feature 20170128] The postmap command, and the inline: and texthash: -maps now support spaces in left-hand field of the lookup table -"source text". Use double quotes (") around a left-hand field that -contains spaces, and use backslash (\) to protect embedded quotes -in a left-hand field. There is no change in the processing of the -right-hand field. +[20171218] Preliminary support to run Postfix in the foreground, +with "postfix start-fg". This requires that Postfix multi-instance +support is disabled. To receive Postfix syslog information on the +container's host, mount the host's /dev/log socket inside the +container (example: "docker run -v /dev/log:/dev/log ..."), and +specify a distinct Postfix "syslog_name" prefix that identifies the +logging from the Postfix instance. Postfix does not log systemd +events. + +Major changes - database support +--------------------------------- + +[20170617] The postconf command warns about unknown parameter names +in a Postfix database configuration file. + +[20171227] The pgsql_table(5) hosts parameter now supports the +postgresql:// URI syntax. Contributed by Magosányi Árpád. + +Major changes - header format +----------------------------- + +[20180010] This release changes the format of 'full name' information +in Postfix-generated From: headers, when a local program such as +/bin/mail submits a message without From: header. + +Postfix-generated From: headers with 'full name' information are +now formatted as "From: name
            " by default. Specify +"header_from_format = obsolete" to get the earlier form "From: +address (name)". See the postconf(5) manpage for more details. + +Major changes - invisible changes +--------------------------------- + +[20170617] Additional paranoia in the VSTRING implementation: a +null byte after the end of vstring buffers (this is a safety net +so that C-style string operations won't scribble past the end); +earlier detection of bad length and precision format string specifiers +(these are the result of programming error, as Postfix format strings +cannot be specified externally). Major changes - milter support ------------------------------ -[Feature 20160611] The Postfix SMTP server local IP address and -port are available in the policy delegation protocol (attribute -names: server_address, server_port), in the Milter protocol (macro -names: {daemon_addr}, {daemon_port}), and in the XCLIENT protocol -(attribute names: DESTADDR, DESTPORT). - -[Feature 20161024] smtpd_milter_maps support for per-client Milter -configuration that overrides smtpd_milters, and that has the same -syntax. A lookup result of "DISABLE" turns off Milter support. See -MILTER_README.html for details. +[20171223] Milter applications can now send RET and ENVID parameters +in SMFIR_CHGFROM (change envelope sender) requests. -Major changes - policy delegation ---------------------------------- +Major changes - mixed IPv6/IPv4 support +--------------------------------------- -[Feature 20160611] The Postfix SMTP server local IP address and -port are available in the policy delegation protocol (attribute -names: server_address, server_port), in the Milter protocol (macro -names: {daemon_addr}, {daemon_port}), and in the XCLIENT protocol -(attribute names: DESTADDR, DESTPORT). - -Major changes - postqueue -------------------------- - -[Incompat 20170129] The postqueue command no longer forces all -message arrival times to be reported in UTC. To get the old behavior, -set TZ=UTC in main.cf:import_environment (this override is not -recommended, as it affects all Postfix utities and daemons). - -Major changes - safety ----------------------- - -[Incompat 20161227] For safety reasons, the sendmail -C option must -specify an authorized directory: the default configuration directory, -a directory that is listed in the default main.cf file with -alternate_config_directories or multi_instance_directories, or the -command must be invoked with root privileges (UID 0 and EUID 0). -This mitigates a recurring problem with the PHP mail() function. - -Major changes - sasl --------------------- - -[Feature 20160625] The Postfix SMTP server now passes remote client -and local server network address and port information to the Cyrus -SASL library. Build with ``make makefiles "CCARGS=$CCARGS --DNO_IP_CYRUS_SASL_AUTH"'' for backwards compatibility. - -Major changes - smtputf8 ------------------------- - -[Feature 20161103] Postfix 3.2 disables the 'transitional' compatibility -between the IDNA2003 and IDNA2008 standards for internationalized -domain names (domain names beyond the limits of US-ASCII). - -This change makes Postfix behavior consistent with contemporary web -browsers. It affects the handling of some corner cases such as -German sz and Greek zeta. See http://unicode.org/cldr/utility/idna.jsp -for more examples. - -Specify "enable_idna2003_compatibility = yes" to restore historical -behavior (but keep in mind that the rest of the world may not make -that same choice). - -Major changes - tls -------------------- - -[Feature 20160828] Fixes for deprecated OpenSSL 1.1.0 API features, -so that Postfix will build without depending on backwards-compatibility -support. - -[Incompat 20161204] Postfix 3.2 removes tentative features that -were implemented before the DANE spec was finalized: - -- Support for certificate usage PKIX-EE(1), - -- The ability to disable digest agility (Postfix now behaves as if - "tls_dane_digest_agility = on"), and - -- The ability to disable support for "TLSA 2 [01] [12]" records - that specify the digest of a trust anchor (Postfix now behaves - as if "tls_dane_trust_anchor_digest_enable = yes). - -[Feature 20161217] Postfix 3.2 enables elliptic curve negotiation -with OpenSSL >= 1.0.2. This changes the default smtpd_tls_eecdh_grade -setting to "auto", and introduces a new parameter tls_eecdh_auto_curves -with the names of curves that may be negotiated. - -The default tls_eecdh_auto_curves setting is determined at compile -time, and depends on the Postfix and OpenSSL versions. At runtime, -Postfix will skip curve names that aren't supported by the OpenSSL -library. +[20170505] Workaround for mail delivery problems when 1) both Postfix +IPv6 and IPv4 support are enabled, 2) some destination announces +more primary IPv6 MX addresses than primary IPv4 MX addresses, 3) +the destination is unreachable over IPv6, and 4) Postfix runs into +the smtp_mx_address_limit before it can try to deliver over IPv4. + +When both Postfix IPv6 and IPv4 support are enabled, the Postfix +SMTP client will now relax MX preferences so that it can schedule +similar numbers of IPv4 and IPv6 destination addresses. This ensures +that an IPv6 connectivity problem will not prevent mail from being +delivered over IPv4 (and vice versa). Specify "smtp_balance_inet_protocols += no" to disable this workaround. Major changes - xclient ----------------------- -[Feature 20160611] The Postfix SMTP server local IP address and -port are available in the policy delegation protocol (attribute -names: server_address, server_port), in the Milter protocol (macro -names: {daemon_addr}, {daemon_port}), and in the XCLIENT protocol -(attribute names: DESTADDR, DESTPORT). +[20171218] The Postfix SMTP server now allows the XCLIENT command +before STARTTLS when TLS is required. This is useful for servers +that run behind a reverse proxy server such as nginx. diff -Nru postfix-3.2.5/README_FILES/SASL_README postfix-3.3.0/README_FILES/SASL_README --- postfix-3.2.5/README_FILES/SASL_README 2015-07-26 13:48:24.000000000 +0000 +++ postfix-3.3.0/README_FILES/SASL_README 2017-03-01 00:53:07.000000000 +0000 @@ -2,14 +2,6 @@ ------------------------------------------------------------------------------- -WWaarrnniinngg - -People who go to the trouble of installing Postfix may have the expectation -that Postfix is more secure than some other mailers. The Cyrus SASL library -contains a lot of code. With this, Postfix becomes as secure as other mail -systems that use the Cyrus SASL library. Dovecot provides an alternative that -may be worth considering. - HHooww PPoossttffiixx uusseess SSAASSLL aauutthheennttiiccaattiioonn SMTP servers need to decide whether an SMTP client is authorized to send mail @@ -30,6 +22,12 @@ belong to the specific SASL implementation that Postfix will use. This document covers both the Postfix and non-Postfix configuration. +NOTE: People who go to the trouble of installing Postfix may have the +expectation that Postfix is more secure than some other mailers. The Cyrus SASL +library contains a lot of code. With this, Postfix becomes as secure as other +mail systems that use the Cyrus SASL library. Dovecot provides an alternative +that may be worth considering. + You can read more about the following topics: * Configuring SASL authentication in the Postfix SMTP server diff -Nru postfix-3.2.5/README_FILES/TLS_README postfix-3.3.0/README_FILES/TLS_README --- postfix-3.2.5/README_FILES/TLS_README 2016-12-17 23:22:24.000000000 +0000 +++ postfix-3.3.0/README_FILES/TLS_README 2017-03-01 00:55:20.000000000 +0000 @@ -2,25 +2,17 @@ ------------------------------------------------------------------------------- -WWAARRNNIINNGG - -By turning on TLS support in Postfix, you not only get the ability to encrypt -mail and to authenticate remote SMTP clients or servers. You also turn on -thousands and thousands of lines of OpenSSL library code. Assuming that OpenSSL -is written as carefully as Wietse's own code, every 1000 lines introduce one -additional bug into Postfix. - WWhhaatt PPoossttffiixx TTLLSS ssuuppppoorrtt ddooeess ffoorr yyoouu Transport Layer Security (TLS, formerly called SSL) provides certificate-based authentication and encrypted sessions. An encrypted session protects the information that is transmitted with SMTP mail or with SASL authentication. - NOTE: This document describes a TLS user interface that was introduced - with Postfix version 2.3. Support for an older user interface is documented - in TLS_LEGACY_README, which also describes the differences between Postfix - and the third-party patch on which Postfix version 2.2 TLS support was - based. +NOTE: By turning on TLS support in Postfix, you not only get the ability to +encrypt mail and to authenticate remote SMTP clients or servers. You also turn +on hundreds of thousands of lines of OpenSSL library code. Assuming that +OpenSSL is written as carefully as Wietse's own code, every 1000 lines +introduce one additional bug into Postfix. Topics covered in this document: diff -Nru postfix-3.2.5/RELEASE_NOTES postfix-3.3.0/RELEASE_NOTES --- postfix-3.2.5/RELEASE_NOTES 2018-01-28 01:09:29.000000000 +0000 +++ postfix-3.3.0/RELEASE_NOTES 2018-02-11 16:09:16.000000000 +0000 @@ -1,190 +1,124 @@ -This is the Postfix 3.2 (stable) release. +This is the Postfix 3.3 (stable) release. -The stable Postfix release is called postfix-3.2.x where 3=major -release number, 2=minor release number, x=patchlevel. The stable +The stable Postfix release is called postfix-3.3.x where 3=major +release number, 3=minor release number, x=patchlevel. The stable release never changes except for patches that address bugs or emergencies. Patches change the patchlevel and the release date. New features are developed in snapshot releases. These are called -postfix-3.3-yyyymmdd where yyyymmdd is the release date (yyyy=year, -mm=month, dd=day). Patches are never issued for snapshot releases; +postfix-3.4-yyyymmdd where yyyymmdd is the release date (yyyy=year, +mm=month, dd=day). Patches are never issued for snapshot releases; instead, a new snapshot is released. The mail_release_date configuration parameter (format: yyyymmdd) specifies the release date of a stable release or snapshot release. -If you upgrade from Postfix 3.0 or earlier, read RELEASE_NOTES-3.1 +If you upgrade from Postfix 3.1 or earlier, read RELEASE_NOTES-3.2 before proceeding. -License change with Postfix 3.2.5 +License change +--------------- + +This software is distributed with a dual license: in addition to the +historical IBM Public License 1.0, it is now also distributed with the +more recent Eclipse Public License 2.0. Recipients can choose to take +the software under the license of their choice. Those who are more +comfortable with the IPL can continue with that license. + +Major changes - compatibility safety net +---------------------------------------- + +[20180106] With compatibility_level < 1, the Postfix SMTP server +now warns for mail that would be blocked by the Postfix 2.10 +smtpd_relay_restrictions feature, without blocking that mail. This +extends the compatibility safety net for sites that upgrade from +earlier Postfix versions (questions on the postfix-users list show +there is a steady trickle). See COMPATIBILITY_README for details. + +Major changes - configuration +----------------------------- + +[20170617] The postconf command now warns about unknown parameter +names in a Postfix database configuration file. As with other unknown +parameter names, these warnings can help to find typos early. + +[20180113] New read-only service_name parameter that contains the +master.cf service name of a Postfix daemon process (it that is empty +in a non-daemon process). This can make Postfix SMTP server logging +logging distinct by setting the syslog_name in master.cf with "-o +syslog_name=postfix/$service_name" for the "submission" and "smtps" +services, and can make Postfix SMTP client distinct by setting "-o +syslog_name=postfix/$service_name" for the "relay" service. + +Major changes - container support --------------------------------- -Starting with Postfix 3.2.5, this software is distributed with a -dual license: in addition to the historical IBM Public License 1.0, -it is now also distributed with the more recent Eclipse Public -License 2.0. Recipients can choose to take the software under the -license of their choice. Those who are more comfortable with the -IPL can continue with that license. - -Invisible changes ------------------ - -In addition to the visible changes described below, there is an -ongoing overhaul of low-level code. With each change come updated -tests to ensure that future changes will not 'break' compatibility -with past behavior. - -Major changes - address mapping -------------------------------- - -[Feature 20170128] Postfix 3.2 fixes the handling of address -extensions with email addresses that contain spaces. For example, -the virtual_alias_maps, canonical_maps, and smtp_generic_maps -features now correctly propagate an address extension from "aa -bb+ext"@example.com to "cc dd+ext"@other.example, instead of -producing broken output. - -Major changes - header/body_checks ----------------------------------- - -[Feature 20161008] "PASS" and "STRIP" actions in header/body_checks. -"STRIP" is similar to "IGNORE" but also logs the action, and "PASS" -disables header, body, and Milter inspection for the remainder of -the message content. Contributed by Hobbit. - -Major changes - log analysis ----------------------------- - -[Feature 20160330] The collate.pl script by Viktor Dukhovni for -grouping Postfix logfile records into "sessions" based on queue ID -and process ID information. It's in the auxiliary/collate directory -of the Postfix source tree. - -Major changes - maps support ----------------------------- - -[Feature 20160527] Postfix 3.2 cidr tables support if/endif and -negation (by prepending ! to a pattern), just like regexp and pcre -tables. The primarily purpose is to improve readability of complex -tables. See the cidr_table(5) manpage for syntax details. - -[Incompat 20160925] In the Postfix MySQL database client, the default -option_group value has changed to "client", to enable reading of -"client" option group settings in the MySQL options file. This fixes -a "not found" problem with Postfix queries that contain UTF8-encoded -non-ASCII text. Specify an empty option_group value (option_group -=) to get backwards-compatible behavior. - -[Feature 20161217] Stored-procedure support for MySQL databases. -Contributed by John Fawcett. See mysql_table(5) for instructions. - -[Feature 20170128] The postmap command, and the inline: and texthash: -maps now support spaces in left-hand field of the lookup table -"source text". Use double quotes (") around a left-hand field that -contains spaces, and use backslash (\) to protect embedded quotes -in a left-hand field. There is no change in the processing of the -right-hand field. +[20171218] Preliminary support to run Postfix in the foreground, +with "postfix start-fg". This requires that Postfix multi-instance +support is disabled. To receive Postfix syslog information on the +container's host, mount the host's /dev/log socket inside the +container (example: "docker run -v /dev/log:/dev/log ..."), and +specify a distinct Postfix "syslog_name" prefix that identifies the +logging from the Postfix instance. Postfix does not log systemd +events. + +Major changes - database support +--------------------------------- + +[20170617] The postconf command warns about unknown parameter names +in a Postfix database configuration file. + +[20171227] The pgsql_table(5) hosts parameter now supports the +postgresql:// URI syntax. Contributed by Magosányi Árpád. + +Major changes - header format +----------------------------- + +[20180010] This release changes the format of 'full name' information +in Postfix-generated From: headers, when a local program such as +/bin/mail submits a message without From: header. + +Postfix-generated From: headers with 'full name' information are +now formatted as "From: name
            " by default. Specify +"header_from_format = obsolete" to get the earlier form "From: +address (name)". See the postconf(5) manpage for more details. + +Major changes - invisible changes +--------------------------------- + +[20170617] Additional paranoia in the VSTRING implementation: a +null byte after the end of vstring buffers (this is a safety net +so that C-style string operations won't scribble past the end); +earlier detection of bad length and precision format string specifiers +(these are the result of programming error, as Postfix format strings +cannot be specified externally). Major changes - milter support ------------------------------ -[Feature 20160611] The Postfix SMTP server local IP address and -port are available in the policy delegation protocol (attribute -names: server_address, server_port), in the Milter protocol (macro -names: {daemon_addr}, {daemon_port}), and in the XCLIENT protocol -(attribute names: DESTADDR, DESTPORT). - -[Feature 20161024] smtpd_milter_maps support for per-client Milter -configuration that overrides smtpd_milters, and that has the same -syntax. A lookup result of "DISABLE" turns off Milter support. See -MILTER_README.html for details. +[20171223] Milter applications can now send RET and ENVID parameters +in SMFIR_CHGFROM (change envelope sender) requests. -Major changes - policy delegation ---------------------------------- +Major changes - mixed IPv6/IPv4 support +--------------------------------------- -[Feature 20160611] The Postfix SMTP server local IP address and -port are available in the policy delegation protocol (attribute -names: server_address, server_port), in the Milter protocol (macro -names: {daemon_addr}, {daemon_port}), and in the XCLIENT protocol -(attribute names: DESTADDR, DESTPORT). - -Major changes - postqueue -------------------------- - -[Incompat 20170129] The postqueue command no longer forces all -message arrival times to be reported in UTC. To get the old behavior, -set TZ=UTC in main.cf:import_environment (this override is not -recommended, as it affects all Postfix utities and daemons). - -Major changes - safety ----------------------- - -[Incompat 20161227] For safety reasons, the sendmail -C option must -specify an authorized directory: the default configuration directory, -a directory that is listed in the default main.cf file with -alternate_config_directories or multi_instance_directories, or the -command must be invoked with root privileges (UID 0 and EUID 0). -This mitigates a recurring problem with the PHP mail() function. - -Major changes - sasl --------------------- - -[Feature 20160625] The Postfix SMTP server now passes remote client -and local server network address and port information to the Cyrus -SASL library. Build with ``make makefiles "CCARGS=$CCARGS --DNO_IP_CYRUS_SASL_AUTH"'' for backwards compatibility. - -Major changes - smtputf8 ------------------------- - -[Feature 20161103] Postfix 3.2 disables the 'transitional' compatibility -between the IDNA2003 and IDNA2008 standards for internationalized -domain names (domain names beyond the limits of US-ASCII). - -This change makes Postfix behavior consistent with contemporary web -browsers. It affects the handling of some corner cases such as -German sz and Greek zeta. See http://unicode.org/cldr/utility/idna.jsp -for more examples. - -Specify "enable_idna2003_compatibility = yes" to restore historical -behavior (but keep in mind that the rest of the world may not make -that same choice). - -Major changes - tls -------------------- - -[Feature 20160828] Fixes for deprecated OpenSSL 1.1.0 API features, -so that Postfix will build without depending on backwards-compatibility -support. - -[Incompat 20161204] Postfix 3.2 removes tentative features that -were implemented before the DANE spec was finalized: - -- Support for certificate usage PKIX-EE(1), - -- The ability to disable digest agility (Postfix now behaves as if - "tls_dane_digest_agility = on"), and - -- The ability to disable support for "TLSA 2 [01] [12]" records - that specify the digest of a trust anchor (Postfix now behaves - as if "tls_dane_trust_anchor_digest_enable = yes). - -[Feature 20161217] Postfix 3.2 enables elliptic curve negotiation -with OpenSSL >= 1.0.2. This changes the default smtpd_tls_eecdh_grade -setting to "auto", and introduces a new parameter tls_eecdh_auto_curves -with the names of curves that may be negotiated. - -The default tls_eecdh_auto_curves setting is determined at compile -time, and depends on the Postfix and OpenSSL versions. At runtime, -Postfix will skip curve names that aren't supported by the OpenSSL -library. +[20170505] Workaround for mail delivery problems when 1) both Postfix +IPv6 and IPv4 support are enabled, 2) some destination announces +more primary IPv6 MX addresses than primary IPv4 MX addresses, 3) +the destination is unreachable over IPv6, and 4) Postfix runs into +the smtp_mx_address_limit before it can try to deliver over IPv4. + +When both Postfix IPv6 and IPv4 support are enabled, the Postfix +SMTP client will now relax MX preferences so that it can schedule +similar numbers of IPv4 and IPv6 destination addresses. This ensures +that an IPv6 connectivity problem will not prevent mail from being +delivered over IPv4 (and vice versa). Specify "smtp_balance_inet_protocols += no" to disable this workaround. Major changes - xclient ----------------------- -[Feature 20160611] The Postfix SMTP server local IP address and -port are available in the policy delegation protocol (attribute -names: server_address, server_port), in the Milter protocol (macro -names: {daemon_addr}, {daemon_port}), and in the XCLIENT protocol -(attribute names: DESTADDR, DESTPORT). +[20171218] The Postfix SMTP server now allows the XCLIENT command +before STARTTLS when TLS is required. This is useful for servers +that run behind a reverse proxy server such as nginx. diff -Nru postfix-3.2.5/RELEASE_NOTES-3.2 postfix-3.3.0/RELEASE_NOTES-3.2 --- postfix-3.2.5/RELEASE_NOTES-3.2 1970-01-01 00:00:00.000000000 +0000 +++ postfix-3.3.0/RELEASE_NOTES-3.2 2017-02-12 16:17:41.000000000 +0000 @@ -0,0 +1,180 @@ +This is the Postfix 3.2 (stable) release. + +The stable Postfix release is called postfix-3.2.x where 3=major +release number, 2=minor release number, x=patchlevel. The stable +release never changes except for patches that address bugs or +emergencies. Patches change the patchlevel and the release date. + +New features are developed in snapshot releases. These are called +postfix-3.3-yyyymmdd where yyyymmdd is the release date (yyyy=year, +mm=month, dd=day). Patches are never issued for snapshot releases; +instead, a new snapshot is released. + +The mail_release_date configuration parameter (format: yyyymmdd) +specifies the release date of a stable release or snapshot release. + +If you upgrade from Postfix 3.0 or earlier, read RELEASE_NOTES-3.1 +before proceeding. + +Invisible changes +----------------- + +In addition to the visible changes described below, there is an +ongoing overhaul of low-level code. With each change come updated +tests to ensure that future changes will not 'break' compatibility +with past behavior. + +Major changes - address mapping +------------------------------- + +[Feature 20170128] Postfix 3.2 fixes the handling of address +extensions with email addresses that contain spaces. For example, +the virtual_alias_maps, canonical_maps, and smtp_generic_maps +features now correctly propagate an address extension from "aa +bb+ext"@example.com to "cc dd+ext"@other.example, instead of +producing broken output. + +Major changes - header/body_checks +---------------------------------- + +[Feature 20161008] "PASS" and "STRIP" actions in header/body_checks. +"STRIP" is similar to "IGNORE" but also logs the action, and "PASS" +disables header, body, and Milter inspection for the remainder of +the message content. Contributed by Hobbit. + +Major changes - log analysis +---------------------------- + +[Feature 20160330] The collate.pl script by Viktor Dukhovni for +grouping Postfix logfile records into "sessions" based on queue ID +and process ID information. It's in the auxiliary/collate directory +of the Postfix source tree. + +Major changes - maps support +---------------------------- + +[Feature 20160527] Postfix 3.2 cidr tables support if/endif and +negation (by prepending ! to a pattern), just like regexp and pcre +tables. The primarily purpose is to improve readability of complex +tables. See the cidr_table(5) manpage for syntax details. + +[Incompat 20160925] In the Postfix MySQL database client, the default +option_group value has changed to "client", to enable reading of +"client" option group settings in the MySQL options file. This fixes +a "not found" problem with Postfix queries that contain UTF8-encoded +non-ASCII text. Specify an empty option_group value (option_group +=) to get backwards-compatible behavior. + +[Feature 20161217] Stored-procedure support for MySQL databases. +Contributed by John Fawcett. See mysql_table(5) for instructions. + +[Feature 20170128] The postmap command, and the inline: and texthash: +maps now support spaces in left-hand field of the lookup table +"source text". Use double quotes (") around a left-hand field that +contains spaces, and use backslash (\) to protect embedded quotes +in a left-hand field. There is no change in the processing of the +right-hand field. + +Major changes - milter support +------------------------------ + +[Feature 20160611] The Postfix SMTP server local IP address and +port are available in the policy delegation protocol (attribute +names: server_address, server_port), in the Milter protocol (macro +names: {daemon_addr}, {daemon_port}), and in the XCLIENT protocol +(attribute names: DESTADDR, DESTPORT). + +[Feature 20161024] smtpd_milter_maps support for per-client Milter +configuration that overrides smtpd_milters, and that has the same +syntax. A lookup result of "DISABLE" turns off Milter support. See +MILTER_README.html for details. + +Major changes - policy delegation +--------------------------------- + +[Feature 20160611] The Postfix SMTP server local IP address and +port are available in the policy delegation protocol (attribute +names: server_address, server_port), in the Milter protocol (macro +names: {daemon_addr}, {daemon_port}), and in the XCLIENT protocol +(attribute names: DESTADDR, DESTPORT). + +Major changes - postqueue +------------------------- + +[Incompat 20170129] The postqueue command no longer forces all +message arrival times to be reported in UTC. To get the old behavior, +set TZ=UTC in main.cf:import_environment (this override is not +recommended, as it affects all Postfix utities and daemons). + +Major changes - safety +---------------------- + +[Incompat 20161227] For safety reasons, the sendmail -C option must +specify an authorized directory: the default configuration directory, +a directory that is listed in the default main.cf file with +alternate_config_directories or multi_instance_directories, or the +command must be invoked with root privileges (UID 0 and EUID 0). +This mitigates a recurring problem with the PHP mail() function. + +Major changes - sasl +-------------------- + +[Feature 20160625] The Postfix SMTP server now passes remote client +and local server network address and port information to the Cyrus +SASL library. Build with ``make makefiles "CCARGS=$CCARGS +-DNO_IP_CYRUS_SASL_AUTH"'' for backwards compatibility. + +Major changes - smtputf8 +------------------------ + +[Feature 20161103] Postfix 3.2 disables the 'transitional' compatibility +between the IDNA2003 and IDNA2008 standards for internationalized +domain names (domain names beyond the limits of US-ASCII). + +This change makes Postfix behavior consistent with contemporary web +browsers. It affects the handling of some corner cases such as +German sz and Greek zeta. See http://unicode.org/cldr/utility/idna.jsp +for more examples. + +Specify "enable_idna2003_compatibility = yes" to restore historical +behavior (but keep in mind that the rest of the world may not make +that same choice). + +Major changes - tls +------------------- + +[Feature 20160828] Fixes for deprecated OpenSSL 1.1.0 API features, +so that Postfix will build without depending on backwards-compatibility +support. + +[Incompat 20161204] Postfix 3.2 removes tentative features that +were implemented before the DANE spec was finalized: + +- Support for certificate usage PKIX-EE(1), + +- The ability to disable digest agility (Postfix now behaves as if + "tls_dane_digest_agility = on"), and + +- The ability to disable support for "TLSA 2 [01] [12]" records + that specify the digest of a trust anchor (Postfix now behaves + as if "tls_dane_trust_anchor_digest_enable = yes). + +[Feature 20161217] Postfix 3.2 enables elliptic curve negotiation +with OpenSSL >= 1.0.2. This changes the default smtpd_tls_eecdh_grade +setting to "auto", and introduces a new parameter tls_eecdh_auto_curves +with the names of curves that may be negotiated. + +The default tls_eecdh_auto_curves setting is determined at compile +time, and depends on the Postfix and OpenSSL versions. At runtime, +Postfix will skip curve names that aren't supported by the OpenSSL +library. + +Major changes - xclient +----------------------- + +[Feature 20160611] The Postfix SMTP server local IP address and +port are available in the policy delegation protocol (attribute +names: server_address, server_port), in the Milter protocol (macro +names: {daemon_addr}, {daemon_port}), and in the XCLIENT protocol +(attribute names: DESTADDR, DESTPORT). + diff -Nru postfix-3.2.5/src/anvil/anvil.c postfix-3.3.0/src/anvil/anvil.c --- postfix-3.2.5/src/anvil/anvil.c 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/src/anvil/anvil.c 2018-01-14 16:48:25.000000000 +0000 @@ -231,6 +231,10 @@ /* .IP "\fBsyslog_name (see 'postconf -d' output)\fR" /* A prefix that is prepended to the process name in syslog /* records, so that, for example, "smtpd" becomes "prefix/smtpd". +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* SEE ALSO /* smtpd(8), Postfix SMTP server /* postconf(5), configuration parameters diff -Nru postfix-3.2.5/src/bounce/bounce.c postfix-3.3.0/src/bounce/bounce.c --- postfix-3.2.5/src/bounce/bounce.c 2016-09-17 14:50:55.000000000 +0000 +++ postfix-3.3.0/src/bounce/bounce.c 2018-01-14 16:48:25.000000000 +0000 @@ -119,6 +119,10 @@ /* .IP "\fBsmtputf8_autodetect_classes (sendmail, verify)\fR" /* Detect that a message requires SMTPUTF8 support for the specified /* mail origin classes. +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* FILES /* /var/spool/postfix/bounce/* non-delivery records /* /var/spool/postfix/defer/* non-delivery records diff -Nru postfix-3.2.5/src/bounce/bounce_notify_util.c postfix-3.3.0/src/bounce/bounce_notify_util.c --- postfix-3.2.5/src/bounce/bounce_notify_util.c 2017-06-10 18:47:25.000000000 +0000 +++ postfix-3.3.0/src/bounce/bounce_notify_util.c 2017-12-27 21:53:13.000000000 +0000 @@ -155,6 +155,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/cleanup/cleanup_addr.c postfix-3.3.0/src/cleanup/cleanup_addr.c --- postfix-3.2.5/src/cleanup/cleanup_addr.c 2017-01-22 20:34:02.000000000 +0000 +++ postfix-3.3.0/src/cleanup/cleanup_addr.c 2017-12-27 22:29:44.000000000 +0000 @@ -63,6 +63,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/cleanup/cleanup_body_edit.c postfix-3.3.0/src/cleanup/cleanup_body_edit.c --- postfix-3.2.5/src/cleanup/cleanup_body_edit.c 2017-02-19 01:58:20.000000000 +0000 +++ postfix-3.3.0/src/cleanup/cleanup_body_edit.c 2017-12-27 22:29:44.000000000 +0000 @@ -58,6 +58,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/cleanup/cleanup.c postfix-3.3.0/src/cleanup/cleanup.c --- postfix-3.2.5/src/cleanup/cleanup.c 2016-11-05 12:01:03.000000000 +0000 +++ postfix-3.3.0/src/cleanup/cleanup.c 2018-01-14 16:48:25.000000000 +0000 @@ -392,7 +392,13 @@ /* .PP /* Available in Postfix version 2.1 and later: /* .IP "\fBenable_original_recipient (yes)\fR" -/* Enable support for the X-Original-To message header. +/* Enable support for the original recipient address after an +/* address is rewritten to a different address (for example with +/* aliasing or with canonical mapping). +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* FILES /* /etc/postfix/canonical*, canonical mapping table /* /etc/postfix/virtual*, virtual mapping table diff -Nru postfix-3.2.5/src/cleanup/cleanup_envelope.c postfix-3.3.0/src/cleanup/cleanup_envelope.c --- postfix-3.2.5/src/cleanup/cleanup_envelope.c 2016-03-11 12:53:40.000000000 +0000 +++ postfix-3.3.0/src/cleanup/cleanup_envelope.c 2017-12-27 21:53:13.000000000 +0000 @@ -37,6 +37,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ @@ -406,31 +411,21 @@ return; } if (mapped_type == REC_TYPE_DSN_ENVID) { - /* Allow only one instance. */ - if (state->dsn_envid != 0) { - msg_warn("%s: message rejected: multiple DSN envelope ID records", - state->queue_id); - state->errs |= CLEANUP_STAT_BAD; - return; - } + /* Don't break "postsuper -r" after Milter overrides ENVID. */ if (!allprint(mapped_buf)) { msg_warn("%s: message rejected: bad DSN envelope ID record", state->queue_id); state->errs |= CLEANUP_STAT_BAD; return; } + if (state->dsn_envid != 0) + myfree(state->dsn_envid); state->dsn_envid = mystrdup(mapped_buf); cleanup_out(state, type, buf, len); return; } if (mapped_type == REC_TYPE_DSN_RET) { - /* Allow only one instance. */ - if (state->dsn_ret != 0) { - msg_warn("%s: message rejected: multiple DSN RET records", - state->queue_id); - state->errs |= CLEANUP_STAT_BAD; - return; - } + /* Don't break "postsuper -r" after Milter overrides RET. */ if (!alldig(mapped_buf) || (junk = atoi(mapped_buf)) == 0 || DSN_RET_OK(junk) == 0) { msg_warn("%s: message rejected: bad DSN RET record <%.200s>", diff -Nru postfix-3.2.5/src/cleanup/cleanup.h postfix-3.3.0/src/cleanup/cleanup.h --- postfix-3.2.5/src/cleanup/cleanup.h 2016-06-11 23:28:24.000000000 +0000 +++ postfix-3.3.0/src/cleanup/cleanup.h 2018-01-07 00:29:46.000000000 +0000 @@ -119,6 +119,7 @@ VSTRING *milter_err_text; /* milter call-back reply */ HBC_CHECKS *milter_hbc_checks; /* Milter header checks */ VSTRING *milter_hbc_reply; /* Milter header checks reply */ + VSTRING *milter_dsn_buf; /* Milter DSN parsing buffer */ /* * Support for Milter body replacement requests. @@ -348,6 +349,13 @@ extern int cleanup_body_edit_finish(CLEANUP_STATE *); extern void cleanup_body_edit_free(CLEANUP_STATE *); + /* + * From: header formatting. + */ +#define HFROM_FORMAT_CODE_STD 0 +#define HFROM_FORMAT_CODE_OBS 1 +extern int hfrom_format_code; + /* LICENSE /* .ad /* .fi diff -Nru postfix-3.2.5/src/cleanup/cleanup_init.c postfix-3.3.0/src/cleanup/cleanup_init.c --- postfix-3.2.5/src/cleanup/cleanup_init.c 2016-01-24 00:44:28.000000000 +0000 +++ postfix-3.3.0/src/cleanup/cleanup_init.c 2018-01-07 00:39:23.000000000 +0000 @@ -88,6 +88,7 @@ #include #include +#include #include #include @@ -133,7 +134,6 @@ char *var_nesthdr_checks; /* nested header checks */ char *var_body_checks; /* any body checks */ int var_dup_filter_limit; /* recipient dup filter */ -bool var_enable_orcpt; /* Include orcpt in dup filter? */ char *var_empty_addr; /* destination of bounced bounces */ int var_delay_warn_time; /* delay that triggers warning */ char *var_prop_extension; /* propagate unmatched extension */ @@ -171,6 +171,7 @@ int var_auto_8bit_enc_hdr; /* auto-detect 8bit encoding header */ int var_always_add_hdrs; /* always add missing headers */ int var_virt_addrlen_limit; /* stop exponential growth */ +char *var_hfrom_format; /* header_from_format */ const CONFIG_INT_TABLE cleanup_int_table[] = { VAR_HOPCOUNT_LIMIT, DEF_HOPCOUNT_LIMIT, &var_hopcount_limit, 1, 0, @@ -184,7 +185,6 @@ }; const CONFIG_BOOL_TABLE cleanup_bool_table[] = { - VAR_ENABLE_ORCPT, DEF_ENABLE_ORCPT, &var_enable_orcpt, VAR_VERP_BOUNCE_OFF, DEF_VERP_BOUNCE_OFF, &var_verp_bounce_off, VAR_AUTO_8BIT_ENC_HDR, DEF_AUTO_8BIT_ENC_HDR, &var_auto_8bit_enc_hdr, VAR_ALWAYS_ADD_HDRS, DEF_ALWAYS_ADD_HDRS, &var_always_add_hdrs, @@ -238,6 +238,7 @@ VAR_CLEANUP_MILTERS, DEF_CLEANUP_MILTERS, &var_cleanup_milters, 0, 0, VAR_MILT_HEAD_CHECKS, DEF_MILT_HEAD_CHECKS, &var_milt_head_checks, 0, 0, VAR_MILT_MACRO_DEFLTS, DEF_MILT_MACRO_DEFLTS, &var_milt_macro_deflts, 0, 0, + VAR_HFROM_FORMAT, DEF_HFROM_FORMAT, &var_hfrom_format, 1, 0, 0, }; @@ -277,6 +278,11 @@ */ MILTERS *cleanup_milters; + /* + * From: header format. + */ +int hfrom_format_code; + /* cleanup_all - callback for the runtime error handler */ void cleanup_all(void) @@ -427,6 +433,11 @@ void cleanup_post_jail(char *unused_name, char **unused_argv) { + static const NAME_CODE hfrom_format_table[] = { + HFROM_FORMAT_NAME_STD, HFROM_FORMAT_CODE_STD, + HFROM_FORMAT_NAME_OBS, HFROM_FORMAT_CODE_OBS, + 0, -1, + }; /* * Optionally set the file size resource limit. XXX This limits the @@ -456,4 +467,12 @@ cleanup_strip_chars = vstring_alloc(strlen(var_msg_strip_chars)); unescape(cleanup_strip_chars, var_msg_strip_chars); } + + /* + * From: header formatting. + */ + if ((hfrom_format_code = name_code(hfrom_format_table, + NAME_CODE_FLAG_NONE, var_hfrom_format)) < 0) + msg_fatal("invalid setting: %s = %s", + VAR_HFROM_FORMAT, var_hfrom_format); } diff -Nru postfix-3.2.5/src/cleanup/cleanup_map11.c postfix-3.3.0/src/cleanup/cleanup_map11.c --- postfix-3.2.5/src/cleanup/cleanup_map11.c 2017-01-27 23:12:36.000000000 +0000 +++ postfix-3.3.0/src/cleanup/cleanup_map11.c 2017-12-27 22:29:44.000000000 +0000 @@ -58,6 +58,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/cleanup/cleanup_map1n.c postfix-3.3.0/src/cleanup/cleanup_map1n.c --- postfix-3.2.5/src/cleanup/cleanup_map1n.c 2017-01-09 22:52:41.000000000 +0000 +++ postfix-3.3.0/src/cleanup/cleanup_map1n.c 2017-12-27 22:29:44.000000000 +0000 @@ -39,6 +39,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/cleanup/cleanup_message.c postfix-3.3.0/src/cleanup/cleanup_message.c --- postfix-3.2.5/src/cleanup/cleanup_message.c 2016-10-08 22:19:59.000000000 +0000 +++ postfix-3.3.0/src/cleanup/cleanup_message.c 2018-01-07 16:54:46.000000000 +0000 @@ -39,6 +39,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ @@ -70,6 +75,7 @@ #include #include #include +#include #include #include #include @@ -346,9 +352,9 @@ return (buf); } if (STREQUAL(value, "PASS", command_len)) { - cleanup_act_log(state, "pass", context, buf, optional_text); - state->flags &= ~CLEANUP_FLAG_FILTER_ALL; - return (buf); + cleanup_act_log(state, "pass", context, buf, optional_text); + state->flags &= ~CLEANUP_FLAG_FILTER_ALL; + return (buf); } if (STREQUAL(value, "DISCARD", command_len)) { cleanup_act_log(state, "discard", context, buf, optional_text); @@ -406,7 +412,7 @@ cleanup_act_log(state, "prepend", context, buf, optional_text); temp = vstring_strcpy(vstring_alloc(strlen(optional_text)), - optional_text); + optional_text); cleanup_out_header(state, temp); vstring_free(temp); } @@ -655,6 +661,7 @@ char time_stamp[1024]; /* XXX locale dependent? */ struct tm *tp; TOK822 *token; + TOK822 *dummy_token; time_t tv; /* @@ -742,14 +749,60 @@ HDR_RESENT_FROM : HDR_FROM))) == 0) { quote_822_local(state->temp1, *state->sender ? state->sender : MAIL_ADDR_MAIL_DAEMON); - vstring_sprintf(state->temp2, "%sFrom: %s", - state->resent, vstring_str(state->temp1)); if (*state->sender && state->fullname && *state->fullname) { - vstring_sprintf(state->temp1, "(%s)", state->fullname); - token = tok822_parse(vstring_str(state->temp1)); - vstring_strcat(state->temp2, " "); - tok822_externalize(state->temp2, token, TOK822_STR_NONE); - tok822_free_tree(token); + char *cp; + + /* Enforce some sanity on full name content. */ + while ((cp = strchr(state->fullname, '\r')) != 0 + || (cp = strchr(state->fullname, '\n')) != 0) + *cp = ' '; + + switch (hfrom_format_code) { + + /* + * "From: phrase ". Quote the phrase if it + * contains specials or the "%!" legacy address operators. + */ + case HFROM_FORMAT_CODE_STD: + vstring_sprintf(state->temp2, "%sFrom: ", state->resent); + if (state->fullname[strcspn(state->fullname, + "%!" LEX_822_SPECIALS)] == 0) { + /* Normalize whitespace. */ + token = tok822_scan_limit(state->fullname, &dummy_token, + var_token_limit); + } else { + token = tok822_alloc(TOK822_QSTRING, state->fullname); + } + tok822_externalize(state->temp2, token, TOK822_STR_NONE); + tok822_free(token); + vstring_sprintf_append(state->temp2, " <%s>", + vstring_str(state->temp1)); + break; + + /* + * "From: addr-spec (ctext)". This is the obsolete form. + */ + case HFROM_FORMAT_CODE_OBS: + vstring_sprintf(state->temp2, "%sFrom: %s ", + state->resent, vstring_str(state->temp1)); + vstring_sprintf(state->temp1, "(%s)", state->fullname); + token = tok822_parse(vstring_str(state->temp1)); + tok822_externalize(state->temp2, token, TOK822_STR_NONE); + tok822_free_tree(token); + break; + default: + msg_panic("%s: unknown header format %d", + myname, hfrom_format_code); + } + } + + /* + * "From: addr-spec". This is the form in the absence of full name + * information, also used for mail from mailer-daemon. + */ + else { + vstring_sprintf(state->temp2, "%sFrom: %s", + state->resent, vstring_str(state->temp1)); } CLEANUP_OUT_BUF(state, REC_TYPE_NORM, state->temp2); } diff -Nru postfix-3.2.5/src/cleanup/cleanup_milter.c postfix-3.3.0/src/cleanup/cleanup_milter.c --- postfix-3.2.5/src/cleanup/cleanup_milter.c 2017-02-19 01:58:20.000000000 +0000 +++ postfix-3.3.0/src/cleanup/cleanup_milter.c 2017-12-24 00:13:13.000000000 +0000 @@ -1330,22 +1330,61 @@ { const char *myname = "cleanup_chg_from"; CLEANUP_STATE *state = (CLEANUP_STATE *) context; + off_t new_offset; off_t new_sender_offset; off_t after_sender_offs; int addr_count; TOK822 *tree; TOK822 *tp; VSTRING *int_sender_buf; + int dsn_envid = 0; + int dsn_ret = 0; if (msg_verbose) msg_info("%s: \"%s\" \"%s\"", myname, ext_from, esmtp_args); - if (esmtp_args[0]) - msg_warn("%s: %s: ignoring ESMTP arguments \"%.100s\"", - state->queue_id, myname, esmtp_args); + /* + * ESMTP support is limited to RET and ENVID, i.e. things that are stored + * together with the sender queue file record. + */ + if (esmtp_args[0]) { + ARGV *esmtp_argv; + int i; + const char *arg; + + esmtp_argv = argv_split(esmtp_args, " "); + for (i = 0; i < esmtp_argv->argc; ++i) { + arg = esmtp_argv->argv[i]; + if (strncasecmp(arg, "RET=", 4) == 0) { + if ((dsn_ret = dsn_ret_code(arg + 4)) == 0) { + msg_warn("Ignoring bad ESMTP parameter \"%s\" in " + "SMFI_CHGFROM request", arg); + } else { + state->dsn_ret = dsn_ret; + } + } else if (strncasecmp(arg, "ENVID=", 6) == 0) { + if (state->milter_dsn_buf == 0) + state->milter_dsn_buf = vstring_alloc(20); + dsn_envid = (xtext_unquote(state->milter_dsn_buf, arg + 6) + && allprint(STR(state->milter_dsn_buf))); + if (!dsn_envid) { + msg_warn("Ignoring bad ESMTP parameter \"%s\" in " + "SMFI_CHGFROM request", arg); + } else { + if (state->dsn_envid) + myfree(state->dsn_envid); + state->dsn_envid = mystrdup(STR(state->milter_dsn_buf)); + } + } else { + msg_warn("Ignoring bad ESMTP parameter \"%s\" in " + "SMFI_CHGFROM request", arg); + } + } + argv_free(esmtp_argv); + } /* - * The cleanup server remembers the location of the the original sender + * The cleanup server remembers the file offset of the current sender * address record (offset in sender_pt_offset) and the file offset of the * record that follows the sender address (offset in sender_pt_target). * Short original sender records are padded, so that they can safely be @@ -1357,24 +1396,38 @@ msg_panic("%s: no post-sender record offset", myname); /* - * Allocate space after the end of the queue file, and write the new - * sender record, followed by a reverse pointer record that points to the - * record that follows the original sender address record. No padding is - * needed for a "new" short sender record, since the record is not meant - * to be overwritten. When the "new" sender is replaced, we allocate a - * new record at the end of the queue file. + * Allocate space after the end of the queue file, and write the new {DSN + * envid, DSN ret, sender address, sender BCC} records, followed by a + * reverse pointer record that points to the record that follows the + * original sender record. * * We update the queue file in a safe manner: save the new sender after the * end of the queue file, write the reverse pointer, and only then * overwrite the old sender record with the forward pointer to the new * sender. */ - if ((new_sender_offset = vstream_fseek(state->dst, (off_t) 0, SEEK_END)) < 0) { + if ((new_offset = vstream_fseek(state->dst, (off_t) 0, SEEK_END)) < 0) { msg_warn("%s: seek file %s: %m", myname, cleanup_path); return (cleanup_milter_error(state, errno)); } /* + * Sender DSN attribute records precede the sender record. + */ + if (dsn_envid) + rec_fprintf(state->dst, REC_TYPE_ATTR, "%s=%s", + MAIL_ATTR_DSN_ENVID, STR(state->milter_dsn_buf)); + if (dsn_ret) + rec_fprintf(state->dst, REC_TYPE_ATTR, "%s=%d", + MAIL_ATTR_DSN_RET, dsn_ret); + if (dsn_envid == 0 && dsn_ret == 0) { + new_sender_offset = new_offset; + } else if ((new_sender_offset = vstream_ftell(state->dst)) < 0) { + msg_warn("%s: vstream_ftell file %s: %m", myname, cleanup_path); + return (cleanup_milter_error(state, errno)); + } + + /* * Transform the address from external form to internal form. This also * removes the enclosing <>, if present. * @@ -1402,15 +1455,20 @@ state->sender_pt_target = after_sender_offs; /* - * Overwrite the original sender record with the pointer to the new - * sender address record. + * Overwrite the current sender record with the pointer to the new {DSN + * envid, DSN ret, sender address, sender BCC} records. */ if (vstream_fseek(state->dst, state->sender_pt_offset, SEEK_SET) < 0) { msg_warn("%s: seek file %s: %m", myname, cleanup_path); return (cleanup_milter_error(state, errno)); } cleanup_out_format(state, REC_TYPE_PTR, REC_TYPE_PTR_FORMAT, - (long) new_sender_offset); + (long) new_offset); + + /* + * Remember the location of the new current sender record. + */ + state->sender_pt_offset = new_sender_offset; /* * In case of error while doing record output. @@ -2244,7 +2302,6 @@ MAPS *cleanup_send_canon_maps; int var_dup_filter_limit = DEF_DUP_FILTER_LIMIT; char *var_empty_addr = DEF_EMPTY_ADDR; -int var_enable_orcpt = DEF_ENABLE_ORCPT; MAPS *cleanup_virt_alias_maps; char *var_milt_daemon_name = "host.example.com"; char *var_milt_v = DEF_MILT_V; @@ -2428,6 +2485,7 @@ char *bufp; int istty = isatty(vstream_fileno(VSTREAM_IN)); CLEANUP_STATE *state = cleanup_state_alloc((VSTREAM *) 0); + const char *parens = "{}"; state->queue_id = mystrdup("NOQUEUE"); state->sender = mystrdup("sender"); @@ -2439,6 +2497,7 @@ msg_vstream_init(argv[0], VSTREAM_ERR); var_line_limit = DEF_LINE_LIMIT; var_header_limit = DEF_HEADER_LIMIT; + var_enable_orcpt = DEF_ENABLE_ORCPT; for (;;) { ARGV *argv; @@ -2459,7 +2518,7 @@ } if (*bufp == '#' || *bufp == 0 || allspace(bufp)) continue; - argv = argv_split(bufp, " "); + argv = argv_splitq(bufp, " ", parens); if (argv->argc == 0) { msg_warn("missing command"); } else if (strcmp(argv->argv[0], "?") == 0) { @@ -2539,7 +2598,15 @@ if (argv->argc != 3) { msg_warn("bad chg_from argument count: %ld", (long) argv->argc); } else { - cleanup_chg_from(state, argv->argv[1], argv->argv[2]); + char *arg = argv->argv[2]; + const char *err; + + if (*arg == parens[0] + && (err = extpar(&arg, parens, EXTPAR_FLAG_NONE)) != 0) { + msg_warn("%s in \"%s\"", err, arg); + } else { + cleanup_chg_from(state, argv->argv[1], arg); + } } } else if (strcmp(argv->argv[0], "add_rcpt") == 0) { if (argv->argc != 2) { diff -Nru postfix-3.2.5/src/cleanup/cleanup_milter.in13h postfix-3.3.0/src/cleanup/cleanup_milter.in13h --- postfix-3.2.5/src/cleanup/cleanup_milter.in13h 1970-01-01 00:00:00.000000000 +0000 +++ postfix-3.3.0/src/cleanup/cleanup_milter.in13h 2017-12-23 23:08:42.000000000 +0000 @@ -0,0 +1,8 @@ +#verbose on +open test-queue-file13h.tmp + +# Change the sender. + +chg_from m@porcupine.org { ret=hdrs envid=env-for-m } + +close diff -Nru postfix-3.2.5/src/cleanup/cleanup_milter.in13i postfix-3.3.0/src/cleanup/cleanup_milter.in13i --- postfix-3.2.5/src/cleanup/cleanup_milter.in13i 1970-01-01 00:00:00.000000000 +0000 +++ postfix-3.3.0/src/cleanup/cleanup_milter.in13i 2017-12-23 23:12:00.000000000 +0000 @@ -0,0 +1,9 @@ +#verbose on +open test-queue-file13i.tmp + +# Change the sender. + +chg_from m@porcupine.org { ret=hdrs envid=env-for-m } +chg_from n@porcupine.org { ret=full envid=env-for-n } + +close diff -Nru postfix-3.2.5/src/cleanup/cleanup_milter.ref13c postfix-3.3.0/src/cleanup/cleanup_milter.ref13c --- postfix-3.2.5/src/cleanup/cleanup_milter.ref13c 2016-03-11 13:28:55.000000000 +0000 +++ postfix-3.3.0/src/cleanup/cleanup_milter.ref13c 2017-12-23 23:49:01.000000000 +0000 @@ -4,7 +4,8 @@ 100 create_time: Sun Jan 21 13:33:08 2007 124 named_attribute: rewrite_context=local 147 sender_fullname: Wietse Venema - 162 pointer_record: 607 + 162 pointer_record: 573 + 573 pointer_record: 607 607 sender: n@porcupine.org 624 pointer_record: 590 590 pointer_record: 180 diff -Nru postfix-3.2.5/src/cleanup/cleanup_milter.ref13d postfix-3.3.0/src/cleanup/cleanup_milter.ref13d --- postfix-3.2.5/src/cleanup/cleanup_milter.ref13d 2016-03-11 13:29:33.000000000 +0000 +++ postfix-3.3.0/src/cleanup/cleanup_milter.ref13d 2017-12-23 23:49:12.000000000 +0000 @@ -3,7 +3,8 @@ 81 message_arrival_time: Mon Apr 27 20:41:30 2009 100 create_time: Mon Apr 27 20:41:41 2009 124 named_attribute: rewrite_context=local - 147 pointer_record: 1009 + 147 pointer_record: 975 + 975 pointer_record: 1009 1009 sender: n@porcupine.org 1026 pointer_record: 992 992 pointer_record: 164 diff -Nru postfix-3.2.5/src/cleanup/cleanup_milter.ref13f postfix-3.3.0/src/cleanup/cleanup_milter.ref13f --- postfix-3.2.5/src/cleanup/cleanup_milter.ref13f 2016-03-11 13:25:28.000000000 +0000 +++ postfix-3.3.0/src/cleanup/cleanup_milter.ref13f 2017-12-23 23:49:39.000000000 +0000 @@ -4,7 +4,8 @@ 100 create_time: Sun Jan 21 13:33:08 2007 124 named_attribute: rewrite_context=local 147 sender_fullname: Wietse Venema - 162 pointer_record: 657 + 162 pointer_record: 573 + 573 pointer_record: 657 657 sender: n@porcupine.org 674 pointer_record: 590 590 named_attribute: notify_flags=1 diff -Nru postfix-3.2.5/src/cleanup/cleanup_milter.ref13g postfix-3.3.0/src/cleanup/cleanup_milter.ref13g --- postfix-3.2.5/src/cleanup/cleanup_milter.ref13g 2016-03-11 13:29:55.000000000 +0000 +++ postfix-3.3.0/src/cleanup/cleanup_milter.ref13g 2017-12-23 23:50:18.000000000 +0000 @@ -4,7 +4,9 @@ 100 create_time: Sun Jan 21 13:33:08 2007 124 named_attribute: rewrite_context=local 147 sender_fullname: Wietse Venema - 162 pointer_record: 691 + 162 pointer_record: 573 + 573 pointer_record: 657 + 657 pointer_record: 691 691 sender: o@porcupine.org 708 pointer_record: 674 674 pointer_record: 590 diff -Nru postfix-3.2.5/src/cleanup/cleanup_milter.ref13h postfix-3.3.0/src/cleanup/cleanup_milter.ref13h --- postfix-3.2.5/src/cleanup/cleanup_milter.ref13h 1970-01-01 00:00:00.000000000 +0000 +++ postfix-3.3.0/src/cleanup/cleanup_milter.ref13h 2017-12-23 23:09:56.000000000 +0000 @@ -0,0 +1,29 @@ +*** ENVELOPE RECORDS test-queue-file13h.tmp *** + 0 message_size: 332 182 1 0 332 + 81 message_arrival_time: Sun Jan 21 13:32:59 2007 + 100 create_time: Sun Jan 21 13:33:08 2007 + 124 named_attribute: rewrite_context=local + 147 sender_fullname: Wietse Venema + 162 pointer_record: 573 + 573 named_attribute: envelope_id=env-for-m + 596 named_attribute: ret_flags=2 + 609 sender: m@porcupine.org + 626 pointer_record: 180 + 180 *** MESSAGE CONTENTS test-queue-file13h.tmp *** + 182 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001) + 244 regular_text: id DE040290405; Sun, 21 Jan 2007 13:33:08 -0500 (EST) + 300 regular_text: From: me@porcupine.org + 324 regular_text: To: you@porcupine.org + 347 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org> + 409 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT) + 454 regular_text: Subject: hey! + 469 padding: 0 + 472 pointer_record: 0 + 489 regular_text: + 491 regular_text: text + 497 pointer_record: 0 + 514 *** HEADER EXTRACTED test-queue-file13h.tmp *** + 516 original_recipient: you@porcupine.org + 535 recipient: you@porcupine.org + 554 pointer_record: 0 + 571 *** MESSAGE FILE END test-queue-file13h.tmp *** diff -Nru postfix-3.2.5/src/cleanup/cleanup_milter.ref13i postfix-3.3.0/src/cleanup/cleanup_milter.ref13i --- postfix-3.2.5/src/cleanup/cleanup_milter.ref13i 1970-01-01 00:00:00.000000000 +0000 +++ postfix-3.3.0/src/cleanup/cleanup_milter.ref13i 2017-12-23 23:44:20.000000000 +0000 @@ -0,0 +1,33 @@ +*** ENVELOPE RECORDS test-queue-file13i.tmp *** + 0 message_size: 332 182 1 0 332 + 81 message_arrival_time: Sun Jan 21 13:32:59 2007 + 100 create_time: Sun Jan 21 13:33:08 2007 + 124 named_attribute: rewrite_context=local + 147 sender_fullname: Wietse Venema + 162 pointer_record: 573 + 573 named_attribute: envelope_id=env-for-m + 596 named_attribute: ret_flags=2 + 609 pointer_record: 643 + 643 named_attribute: envelope_id=env-for-n + 666 named_attribute: ret_flags=1 + 679 sender: n@porcupine.org + 696 pointer_record: 626 + 626 pointer_record: 180 + 180 *** MESSAGE CONTENTS test-queue-file13i.tmp *** + 182 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001) + 244 regular_text: id DE040290405; Sun, 21 Jan 2007 13:33:08 -0500 (EST) + 300 regular_text: From: me@porcupine.org + 324 regular_text: To: you@porcupine.org + 347 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org> + 409 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT) + 454 regular_text: Subject: hey! + 469 padding: 0 + 472 pointer_record: 0 + 489 regular_text: + 491 regular_text: text + 497 pointer_record: 0 + 514 *** HEADER EXTRACTED test-queue-file13i.tmp *** + 516 original_recipient: you@porcupine.org + 535 recipient: you@porcupine.org + 554 pointer_record: 0 + 571 *** MESSAGE FILE END test-queue-file13i.tmp *** diff -Nru postfix-3.2.5/src/cleanup/cleanup_out_recipient.c postfix-3.3.0/src/cleanup/cleanup_out_recipient.c --- postfix-3.2.5/src/cleanup/cleanup_out_recipient.c 2015-12-27 22:30:10.000000000 +0000 +++ postfix-3.3.0/src/cleanup/cleanup_out_recipient.c 2017-07-29 23:03:18.000000000 +0000 @@ -53,6 +53,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ @@ -133,8 +138,6 @@ /* * XXX Not elegant, but eliminates complexity in the record reading loop. */ - if (!var_enable_orcpt) - orcpt = ""; if (dsn_orcpt == 0) dsn_orcpt = ""; diff -Nru postfix-3.2.5/src/cleanup/cleanup_state.c postfix-3.3.0/src/cleanup/cleanup_state.c --- postfix-3.2.5/src/cleanup/cleanup_state.c 2016-06-11 20:02:15.000000000 +0000 +++ postfix-3.3.0/src/cleanup/cleanup_state.c 2017-12-27 21:53:13.000000000 +0000 @@ -28,6 +28,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ @@ -130,6 +135,7 @@ state->milter_ext_from = 0; state->milter_ext_rcpt = 0; state->milter_err_text = 0; + state->milter_dsn_buf = 0; state->free_regions = state->body_regions = state->curr_body_region = 0; state->smtputf8 = 0; return (state); @@ -189,6 +195,8 @@ vstring_free(state->milter_ext_rcpt); if (state->milter_err_text) vstring_free(state->milter_err_text); + if (state->milter_dsn_buf) + vstring_free(state->milter_dsn_buf); cleanup_region_done(state); myfree((void *) state); } diff -Nru postfix-3.2.5/src/cleanup/Makefile.in postfix-3.3.0/src/cleanup/Makefile.in --- postfix-3.2.5/src/cleanup/Makefile.in 2017-02-05 23:36:31.000000000 +0000 +++ postfix-3.3.0/src/cleanup/Makefile.in 2018-01-07 00:35:53.000000000 +0000 @@ -79,7 +79,7 @@ cleanup_milter_test10e cleanup_milter_test11 cleanup_milter_test12 \ cleanup_milter_test13a cleanup_milter_test13b cleanup_milter_test13c \ cleanup_milter_test13d cleanup_milter_test13e cleanup_milter_test13f \ - cleanup_milter_test13g \ + cleanup_milter_test13g cleanup_milter_test13h cleanup_milter_test13i \ cleanup_milter_test14a cleanup_milter_test14b cleanup_milter_test14c \ cleanup_milter_test14d cleanup_milter_test14e cleanup_milter_test14f \ cleanup_milter_test14g \ @@ -376,6 +376,24 @@ diff cleanup_milter.ref13g cleanup_milter.tmp rm -f test-queue-file13g.tmp cleanup_milter.tmp +cleanup_milter_test13h: cleanup_milter test-queue-file13h cleanup_milter.in13h \ + cleanup_milter.ref13h ../postcat/postcat + cp test-queue-file13h test-queue-file13h.tmp + chmod u+w test-queue-file13h.tmp + $(SHLIB_ENV) ./cleanup_milter /dev/null >cleanup_milter.tmp + diff cleanup_milter.ref13h cleanup_milter.tmp + rm -f test-queue-file13h.tmp cleanup_milter.tmp + +cleanup_milter_test13i: cleanup_milter test-queue-file13i cleanup_milter.in13i \ + cleanup_milter.ref13i ../postcat/postcat + cp test-queue-file13i test-queue-file13i.tmp + chmod u+w test-queue-file13i.tmp + $(SHLIB_ENV) ./cleanup_milter /dev/null >cleanup_milter.tmp + diff cleanup_milter.ref13i cleanup_milter.tmp + rm -f test-queue-file13i.tmp cleanup_milter.tmp + cleanup_milter_test13f: cleanup_milter test-queue-file13f cleanup_milter.in13f \ cleanup_milter.ref13f ../postcat/postcat cp test-queue-file13f test-queue-file13f.tmp @@ -920,6 +938,7 @@ cleanup_init.o: ../../include/msg.h cleanup_init.o: ../../include/myflock.h cleanup_init.o: ../../include/mymalloc.h +cleanup_init.o: ../../include/name_code.h cleanup_init.o: ../../include/name_mask.h cleanup_init.o: ../../include/nvtable.h cleanup_init.o: ../../include/resolve_clnt.h Binary files /tmp/tmpKMd9VZ/L3UzkWh7KQ/postfix-3.2.5/src/cleanup/test-queue-file13h and /tmp/tmpKMd9VZ/nZ1CQk4zqv/postfix-3.3.0/src/cleanup/test-queue-file13h differ Binary files /tmp/tmpKMd9VZ/L3UzkWh7KQ/postfix-3.2.5/src/cleanup/test-queue-file13i and /tmp/tmpKMd9VZ/nZ1CQk4zqv/postfix-3.3.0/src/cleanup/test-queue-file13i differ diff -Nru postfix-3.2.5/src/discard/discard.c postfix-3.3.0/src/discard/discard.c --- postfix-3.2.5/src/discard/discard.c 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/src/discard/discard.c 2018-01-14 16:48:25.000000000 +0000 @@ -76,6 +76,10 @@ /* .IP "\fBsyslog_name (see 'postconf -d' output)\fR" /* A prefix that is prepended to the process name in syslog /* records, so that, for example, "smtpd" becomes "prefix/smtpd". +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* SEE ALSO /* qmgr(8), queue manager /* bounce(8), delivery status reports diff -Nru postfix-3.2.5/src/dns/dns.h postfix-3.3.0/src/dns/dns.h --- postfix-3.2.5/src/dns/dns.h 2016-02-23 16:17:24.000000000 +0000 +++ postfix-3.3.0/src/dns/dns.h 2017-12-27 22:29:44.000000000 +0000 @@ -314,6 +314,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/dnsblog/dnsblog.c postfix-3.3.0/src/dnsblog/dnsblog.c --- postfix-3.2.5/src/dnsblog/dnsblog.c 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/src/dnsblog/dnsblog.c 2018-01-14 16:48:25.000000000 +0000 @@ -58,6 +58,10 @@ /* .IP "\fBsyslog_name (see 'postconf -d' output)\fR" /* A prefix that is prepended to the process name in syslog /* records, so that, for example, "smtpd" becomes "prefix/smtpd". +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* SEE ALSO /* smtpd(8), Postfix SMTP server /* postconf(5), configuration parameters diff -Nru postfix-3.2.5/src/error/error.c postfix-3.3.0/src/error/error.c --- postfix-3.2.5/src/error/error.c 2016-09-17 14:50:55.000000000 +0000 +++ postfix-3.3.0/src/error/error.c 2018-01-14 16:48:25.000000000 +0000 @@ -86,6 +86,10 @@ /* .IP "\fBsyslog_name (see 'postconf -d' output)\fR" /* A prefix that is prepended to the process name in syslog /* records, so that, for example, "smtpd" becomes "prefix/smtpd". +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* SEE ALSO /* qmgr(8), queue manager /* bounce(8), delivery status reports diff -Nru postfix-3.2.5/src/flush/flush.c postfix-3.3.0/src/flush/flush.c --- postfix-3.2.5/src/flush/flush.c 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/src/flush/flush.c 2018-01-14 16:48:25.000000000 +0000 @@ -116,6 +116,10 @@ /* .IP "\fBsyslog_name (see 'postconf -d' output)\fR" /* A prefix that is prepended to the process name in syslog /* records, so that, for example, "smtpd" becomes "prefix/smtpd". +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* FILES /* /var/spool/postfix/flush, "fast flush" logfiles. /* SEE ALSO diff -Nru postfix-3.2.5/src/global/anvil_clnt.c postfix-3.3.0/src/global/anvil_clnt.c --- postfix-3.2.5/src/global/anvil_clnt.c 2015-10-17 16:07:42.000000000 +0000 +++ postfix-3.3.0/src/global/anvil_clnt.c 2017-12-27 22:29:44.000000000 +0000 @@ -141,6 +141,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/global/anvil_clnt.h postfix-3.3.0/src/global/anvil_clnt.h --- postfix-3.2.5/src/global/anvil_clnt.h 2015-10-17 14:36:46.000000000 +0000 +++ postfix-3.3.0/src/global/anvil_clnt.h 2017-12-27 22:29:44.000000000 +0000 @@ -73,6 +73,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/global/dict_ldap.c postfix-3.3.0/src/global/dict_ldap.c --- postfix-3.2.5/src/global/dict_ldap.c 2015-01-29 12:16:38.000000000 +0000 +++ postfix-3.3.0/src/global/dict_ldap.c 2017-12-27 21:53:13.000000000 +0000 @@ -154,6 +154,11 @@ /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA /* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA +/* /* John Hensley /* john@sunislelodge.com /* @@ -1352,10 +1357,10 @@ * Optionally fold the key. */ if (dict->flags & DICT_FLAG_FOLD_FIX) { - if (dict->fold_buf == 0) - dict->fold_buf = vstring_alloc(10); - vstring_strcpy(dict->fold_buf, name); - name = lowercase(vstring_str(dict->fold_buf)); + if (dict->fold_buf == 0) + dict->fold_buf = vstring_alloc(10); + vstring_strcpy(dict->fold_buf, name); + name = lowercase(vstring_str(dict->fold_buf)); } /* @@ -1770,17 +1775,9 @@ * set. */ dict_ldap->timeout = cfg_get_int(dict_ldap->parser, "timeout", 10, 0, 0); - -#if 0 /* No benefit from changing - * this to match the - * MySQL/PGSQL syntax */ - if ((dict_ldap->query = - cfg_get_str(dict_ldap->parser, "query", 0, 0, 0)) == 0) -#endif - dict_ldap->query = - cfg_get_str(dict_ldap->parser, "query_filter", - "(mailacceptinggeneralid=%s)", 0, 0); - + dict_ldap->query = + cfg_get_str(dict_ldap->parser, "query_filter", + "(mailacceptinggeneralid=%s)", 0, 0); if ((dict_ldap->result_format = cfg_get_str(dict_ldap->parser, "result_format", 0, 0, 0)) == 0) dict_ldap->result_format = diff -Nru postfix-3.2.5/src/global/dict_pgsql.c postfix-3.3.0/src/global/dict_pgsql.c --- postfix-3.2.5/src/global/dict_pgsql.c 2017-02-19 01:58:20.000000000 +0000 +++ postfix-3.3.0/src/global/dict_pgsql.c 2017-12-27 21:53:13.000000000 +0000 @@ -160,7 +160,6 @@ #include "argv.h" #include "vstring.h" #include "split_at.h" -#include "find_inet.h" #include "myrand.h" #include "events.h" #include "stringops.h" @@ -180,6 +179,7 @@ #define TYPEUNIX (1<<0) #define TYPEINET (1<<1) +#define TYPECONNSTRING (1<<2) #define RETRY_CONN_MAX 100 #define RETRY_CONN_INTV 60 /* 1 minute */ @@ -190,7 +190,7 @@ char *hostname; char *name; char *port; - unsigned type; /* TYPEUNIX | TYPEINET */ + unsigned type; /* TYPEUNIX | TYPEINET | TYPECONNSTRING*/ unsigned stat; /* STATUNTRIED | STATFAIL | STATCUR */ time_t ts; /* used for attempting reconnection */ } HOST; @@ -469,7 +469,8 @@ /* try the active connections first; prefer the ones to UNIX sockets */ if ((host = dict_pgsql_find_host(PLDB, STATACTIVE, TYPEUNIX)) != NULL || - (host = dict_pgsql_find_host(PLDB, STATACTIVE, TYPEINET)) != NULL) { + (host = dict_pgsql_find_host(PLDB, STATACTIVE, TYPEINET)) != NULL || + (host = dict_pgsql_find_host(PLDB, STATACTIVE, TYPECONNSTRING)) != NULL) { if (msg_verbose) msg_info("%s: found active connection to host %s", myname, host->hostname); @@ -485,7 +486,9 @@ ((host = dict_pgsql_find_host(PLDB, STATUNTRIED | STATFAIL, TYPEUNIX)) != NULL || (host = dict_pgsql_find_host(PLDB, STATUNTRIED | STATFAIL, - TYPEINET)) != NULL)) { + TYPEINET)) != NULL || + (host = dict_pgsql_find_host(PLDB, STATUNTRIED | STATFAIL, + TYPECONNSTRING)) != NULL)) { if (msg_verbose) msg_info("%s: attempting to connect to host %s", myname, host->hostname); @@ -624,9 +627,13 @@ */ static void plpgsql_connect_single(HOST *host, char *dbname, char *username, char *password) { - if ((host->db = PQsetdbLogin(host->name, host->port, NULL, NULL, - dbname, username, password)) == NULL - || PQstatus(host->db) != CONNECTION_OK) { + if (host->type == TYPECONNSTRING) { + host->db = PQconnectdb(host->name); + } else { + host->db = PQsetdbLogin(host->name, host->port, NULL, NULL, + dbname, username, password); + } + if (host->db == NULL || PQstatus(host->db) != CONNECTION_OK) { msg_warn("connect to pgsql server %s: %s", host->hostname, PQerrorMessage(host->db)); plpgsql_down_host(host); @@ -814,24 +821,37 @@ host->ts = 0; /* - * Ad-hoc parsing code. Expect "unix:pathname" or "inet:host:port", where - * both "inet:" and ":port" are optional. + * Modern syntax: "postgresql://connection-info". */ - if (strncmp(d, "unix:", 5) == 0 || strncmp(d, "inet:", 5) == 0) - d += 5; - host->name = mystrdup(d); - host->port = split_at_right(host->name, ':'); - - /* This is how PgSQL distinguishes between UNIX and INET: */ - if (host->name[0] && host->name[0] != '/') - host->type = TYPEINET; - else - host->type = TYPEUNIX; + if (strncmp(d, "postgresql:", 11) == 0) { + host->type = TYPECONNSTRING; + host->name = mystrdup(d); + host->port = 0; + } + /* + * Historical syntax: "unix:/pathname" and "inet:host:port". Strip the + * "unix:" and "inet:" prefixes. Look at the first character, which is + * how PgSQL historically distinguishes between UNIX and INET. + */ + else { + if (strncmp(d, "unix:", 5) == 0 || strncmp(d, "inet:", 5) == 0) + d += 5; + host->name = mystrdup(d); + if (host->name[0] && host->name[0] != '/') { + host->type = TYPEINET; + host->port = split_at_right(host->name, ':'); + } else { + host->type = TYPEUNIX; + host->port = 0; + } + } if (msg_verbose > 1) msg_info("%s: host=%s, port=%s, type=%s", myname, host->name, host->port ? host->port : "", - host->type == TYPEUNIX ? "unix" : "inet"); + host->type == TYPEUNIX ? "unix" : + host->type == TYPEINET ? "inet" : + "uri"); return host; } diff -Nru postfix-3.2.5/src/global/header_body_checks.c postfix-3.3.0/src/global/header_body_checks.c --- postfix-3.2.5/src/global/header_body_checks.c 2016-10-08 22:19:08.000000000 +0000 +++ postfix-3.3.0/src/global/header_body_checks.c 2017-12-27 22:29:44.000000000 +0000 @@ -154,6 +154,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/global/mail_addr_crunch.c postfix-3.3.0/src/global/mail_addr_crunch.c --- postfix-3.2.5/src/global/mail_addr_crunch.c 2017-06-20 23:40:44.000000000 +0000 +++ postfix-3.3.0/src/global/mail_addr_crunch.c 2017-12-27 21:53:13.000000000 +0000 @@ -54,6 +54,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/global/mail_addr_crunch.h postfix-3.3.0/src/global/mail_addr_crunch.h --- postfix-3.2.5/src/global/mail_addr_crunch.h 2017-01-27 22:36:22.000000000 +0000 +++ postfix-3.3.0/src/global/mail_addr_crunch.h 2017-12-27 22:29:44.000000000 +0000 @@ -42,6 +42,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/global/mail_addr_crunch.ref postfix-3.3.0/src/global/mail_addr_crunch.ref --- postfix-3.2.5/src/global/mail_addr_crunch.ref 2017-01-02 22:39:09.000000000 +0000 +++ postfix-3.3.0/src/global/mail_addr_crunch.ref 2017-06-21 23:25:28.000000000 +0000 @@ -1,7 +1,7 @@ ==== external to internal, with extension |foo+extension@example.com| |foo bar+extension@example.com| -|foo+ext@example.com| +|foo+ext+extension@example.com| ==== external to internal, without extension |foo@example.com| |foo bar@example.com| @@ -9,14 +9,14 @@ ==== external to external, with extension |foo+extension@example.com| |"foo bar+extension"@example.com| -|foo+ext@example.com| +|foo+ext+extension@example.com| ==== external to external, without extension |foo@example.com| |"foo bar"@example.com| |foo+ext@example.com| ==== internal to internal, with extension |foo+extension@example.com| -|foo+ext@example.com| +|foo+ext+extension@example.com| ==== internal to internal, without extension |foo@example.com| |foo+ext@example.com| diff -Nru postfix-3.2.5/src/global/mail_addr_find.c postfix-3.3.0/src/global/mail_addr_find.c --- postfix-3.2.5/src/global/mail_addr_find.c 2017-01-28 21:30:15.000000000 +0000 +++ postfix-3.3.0/src/global/mail_addr_find.c 2017-12-27 21:53:13.000000000 +0000 @@ -147,6 +147,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ @@ -419,6 +424,9 @@ const char *name; const char *next; + if ((strategy & MA_FIND_PDMS) && (strategy & MA_FIND_PDDMDS)) + msg_warn("mail_addr_find_opt: do not specify both " + "MA_FIND_PDMS and MA_FIND_PDDMDS"); for (name = ratsign + 1; *name != 0; name = next) { if ((result = maps_find(path, name, PARTIAL)) != 0 || path->error != 0 diff -Nru postfix-3.2.5/src/global/mail_addr_find.h postfix-3.3.0/src/global/mail_addr_find.h --- postfix-3.2.5/src/global/mail_addr_find.h 2017-01-29 00:54:12.000000000 +0000 +++ postfix-3.3.0/src/global/mail_addr_find.h 2017-12-27 22:29:44.000000000 +0000 @@ -72,6 +72,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/global/mail_addr_map.c postfix-3.3.0/src/global/mail_addr_map.c --- postfix-3.2.5/src/global/mail_addr_map.c 2017-01-29 00:47:49.000000000 +0000 +++ postfix-3.3.0/src/global/mail_addr_map.c 2017-12-27 21:53:13.000000000 +0000 @@ -71,6 +71,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ @@ -256,6 +261,7 @@ #define DO_PROPAGATE_UNMATCHED_EXTENSION 1 #define NO_RECIPIENT_DELIMITER "" #define PLUS_RECIPIENT_DELIMITER "+" +#define DOT_RECIPIENT_DELIMITER "." /* * All these tests must pass, so that we know that mail_addr_map_opt() works @@ -352,6 +358,14 @@ "a@a@example.com", {"\"a@a\"@example.net"}, 1, }, + { + "12 external -external-> external, extension, propagation", + "inline:{ aa@example.com=bb@example.com }", + DO_PROPAGATE_UNMATCHED_EXTENSION, DOT_RECIPIENT_DELIMITER, + MA_FORM_EXTERNAL, MA_FORM_EXTERNAL, MA_FORM_EXTERNAL, + "aa.ext@example.com", + {"bb.ext@example.com"}, 1, + }, 0, }; diff -Nru postfix-3.2.5/src/global/mail_addr_map.h postfix-3.3.0/src/global/mail_addr_map.h --- postfix-3.2.5/src/global/mail_addr_map.h 2017-01-29 00:36:58.000000000 +0000 +++ postfix-3.3.0/src/global/mail_addr_map.h 2017-12-27 22:29:44.000000000 +0000 @@ -41,6 +41,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/global/mail_command_client.c postfix-3.3.0/src/global/mail_command_client.c --- postfix-3.2.5/src/global/mail_command_client.c 2015-02-16 17:49:45.000000000 +0000 +++ postfix-3.3.0/src/global/mail_command_client.c 2017-12-27 22:29:44.000000000 +0000 @@ -41,6 +41,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/global/mail_conf.c postfix-3.3.0/src/global/mail_conf.c --- postfix-3.2.5/src/global/mail_conf.c 2017-02-08 00:41:45.000000000 +0000 +++ postfix-3.3.0/src/global/mail_conf.c 2017-12-27 22:29:44.000000000 +0000 @@ -99,6 +99,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/global/mail_conf.h postfix-3.3.0/src/global/mail_conf.h --- postfix-3.2.5/src/global/mail_conf.h 2016-12-27 14:33:25.000000000 +0000 +++ postfix-3.3.0/src/global/mail_conf.h 2017-12-27 22:29:44.000000000 +0000 @@ -239,6 +239,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/global/mail_copy.c postfix-3.3.0/src/global/mail_copy.c --- postfix-3.2.5/src/global/mail_copy.c 2012-01-25 00:41:08.000000000 +0000 +++ postfix-3.3.0/src/global/mail_copy.c 2017-07-29 23:02:52.000000000 +0000 @@ -52,7 +52,8 @@ /* The address is quoted according to RFC822 rules. /* .IP MAIL_COPY_ORIG_RCPT /* Prepend an X-Original-To: header with the original -/* envelope recipient address. +/* envelope recipient address. This is a NOOP with +/* var_enable_orcpt === 0. /* .IP MAIL_COPY_RETURN_PATH /* Prepend a Return-Path: header with the value of the /* \fIsender\fR attribute. @@ -87,6 +88,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ @@ -197,7 +203,7 @@ * An empty original recipient record almost certainly means that * original recipient processing was disabled. */ - if (*orig_rcpt) { + if (var_enable_orcpt && *orig_rcpt) { quote_822_local(buf, orig_rcpt); vstream_fprintf(dst, "X-Original-To: %s%s", vstring_str(buf), eol); } diff -Nru postfix-3.2.5/src/global/mail_params.c postfix-3.3.0/src/global/mail_params.c --- postfix-3.2.5/src/global/mail_params.c 2016-11-05 20:41:05.000000000 +0000 +++ postfix-3.3.0/src/global/mail_params.c 2018-01-13 14:22:49.000000000 +0000 @@ -36,6 +36,7 @@ /* int var_event_drain; /* int var_bundle_rcpt; /* char *var_procname; +/* char *var_servname; /* int var_pid; /* int var_ipc_timeout; /* char *var_pid_dir; @@ -130,6 +131,7 @@ /* int var_idna2003_compat; /* int var_compat_level; /* char *var_drop_hdrs; +/* bool var_enable_orcpt; /* /* void mail_params_init() /* @@ -138,6 +140,7 @@ /* int warn_compat_break_app_dot_mydomain; /* int warn_compat_break_smtputf8_enable; /* int warn_compat_break_chroot; +/* int warn_compat_break_relay_restrictions; /* /* int warn_compat_break_relay_domains; /* int warn_compat_break_flush_domains; @@ -247,6 +250,7 @@ int var_idle_limit; int var_bundle_rcpt; char *var_procname; +char *var_servname; int var_pid; int var_ipc_timeout; char *var_pid_dir; @@ -342,6 +346,7 @@ int var_idna2003_compat; int var_compat_level; char *var_drop_hdrs; +bool var_enable_orcpt; const char null_format_string[1] = ""; @@ -358,6 +363,7 @@ int warn_compat_break_app_dot_mydomain; int warn_compat_break_smtputf8_enable; int warn_compat_break_chroot; +int warn_compat_break_relay_restrictions; /* check_myhostname - lookup hostname and validate */ @@ -611,6 +617,10 @@ if (mail_conf_lookup(VAR_MYNETWORKS) == 0 && mail_conf_lookup(VAR_MYNETWORKS_STYLE) == 0) warn_compat_break_mynetworks_style = 1; + } else { /* for 'postfix reload' */ + warn_compat_break_relay_domains = 0; + warn_compat_break_flush_domains = 0; + warn_compat_break_mynetworks_style = 0; } /* @@ -629,6 +639,17 @@ if (mail_conf_lookup(VAR_SMTPUTF8_ENABLE) == 0) warn_compat_break_smtputf8_enable = 1; warn_compat_break_chroot = 1; + + /* + * Grandfathered in to help sites migrating from Postfix <2.10. + */ + if (mail_conf_lookup(VAR_RELAY_CHECKS) == 0) + warn_compat_break_relay_restrictions = 1; + } else { /* for 'postfix reload' */ + warn_compat_break_app_dot_mydomain = 0; + warn_compat_break_smtputf8_enable = 0; + warn_compat_break_chroot = 0; + warn_compat_break_relay_restrictions = 0; } } @@ -783,6 +804,7 @@ VAR_MULTI_ENABLE, DEF_MULTI_ENABLE, &var_multi_enable, VAR_LONG_QUEUE_IDS, DEF_LONG_QUEUE_IDS, &var_long_queue_ids, VAR_STRICT_SMTPUTF8, DEF_STRICT_SMTPUTF8, &var_strict_smtputf8, + VAR_ENABLE_ORCPT, DEF_ENABLE_ORCPT, &var_enable_orcpt, 0, }; const char *cp; diff -Nru postfix-3.2.5/src/global/mail_params.h postfix-3.3.0/src/global/mail_params.h --- postfix-3.2.5/src/global/mail_params.h 2017-02-19 01:58:20.000000000 +0000 +++ postfix-3.3.0/src/global/mail_params.h 2018-02-18 13:38:58.000000000 +0000 @@ -55,6 +55,7 @@ extern int warn_compat_break_app_dot_mydomain; extern int warn_compat_break_smtputf8_enable; extern int warn_compat_break_chroot; +extern int warn_compat_break_relay_restrictions; /* Postfix 2.10. */ extern int warn_compat_break_relay_domains; extern int warn_compat_break_flush_domains; @@ -391,6 +392,16 @@ extern char *var_drop_hdrs; /* + * From: header format: we provide canned versions only, no Sendmail-style + * macro expansions. + */ +#define HFROM_FORMAT_NAME_STD "standard" /* From: name
            */ +#define HFROM_FORMAT_NAME_OBS "obsolete" /* From: address (name) */ +#define VAR_HFROM_FORMAT "header_from_format" +#define DEF_HFROM_FORMAT HFROM_FORMAT_NAME_STD +extern char *var_hfrom_format; + + /* * Standards violation: allow/permit RFC 822-style addresses in SMTP * commands. */ @@ -1704,6 +1715,12 @@ #define DEF_SMTP_DUMMY_MAIL_AUTH 0 extern bool var_smtp_dummy_mail_auth; +#define VAR_LMTP_BALANCE_INET_PROTO "lmtp_balance_inet_protocols" +#define DEF_LMTP_BALANCE_INET_PROTO DEF_SMTP_BALANCE_INET_PROTO +#define VAR_SMTP_BALANCE_INET_PROTO "smtp_balance_inet_protocols" +#define DEF_SMTP_BALANCE_INET_PROTO 1 +extern bool var_smtp_balance_inet_proto; + /* * LMTP server. The soft error limit determines how many errors an LMTP * client may make before we start to slow down; the hard error limit @@ -2066,11 +2083,20 @@ extern char *var_mail_checks; #define VAR_RELAY_CHECKS "smtpd_relay_restrictions" -#define DEF_RELAY_CHECKS PERMIT_MYNETWORKS ", " \ +#define DEF_RELAY_CHECKS "${{$compatibility_level} < {1} ? " \ + "{} : {" PERMIT_MYNETWORKS ", " \ PERMIT_SASL_AUTH ", " \ - DEFER_UNAUTH_DEST + DEFER_UNAUTH_DEST "}}" extern char *var_relay_checks; + /* + * For warn_compat_break_relay_domains check. Same as DEF_RELAY_CHECKS + * except that it evaluates to DUNNO instead of REJECT. + */ +#define FAKE_RELAY_CHECKS PERMIT_MYNETWORKS ", " \ + PERMIT_SASL_AUTH ", " \ + PERMIT_AUTH_DEST + #define VAR_RCPT_CHECKS "smtpd_recipient_restrictions" #define DEF_RCPT_CHECKS "" extern char *var_rcpt_checks; @@ -2363,7 +2389,29 @@ " $" VAR_HELO_CHECKS \ " $" VAR_MAIL_CHECKS \ " $" VAR_RELAY_CHECKS \ - " $" VAR_RCPT_CHECKS + " $" VAR_RCPT_CHECKS \ + " $" VAR_VRFY_SND_DEF_XPORT_MAPS \ + " $" VAR_VRFY_RELAY_MAPS \ + " $" VAR_VRFY_XPORT_MAPS \ + " $" VAR_FBCK_TRANSP_MAPS \ + " $" VAR_LMTP_EHLO_DIS_MAPS \ + " $" VAR_LMTP_PIX_BUG_MAPS \ + " $" VAR_LMTP_SASL_PASSWD \ + " $" VAR_LMTP_TLS_POLICY \ + " $" VAR_MAILBOX_CMD_MAPS \ + " $" VAR_MBOX_TRANSP_MAPS \ + " $" VAR_PSC_EHLO_DIS_MAPS \ + " $" VAR_RBL_REPLY_MAPS \ + " $" VAR_SND_DEF_XPORT_MAPS \ + " $" VAR_SND_RELAY_MAPS \ + " $" VAR_SMTP_EHLO_DIS_MAPS \ + " $" VAR_SMTP_PIX_BUG_MAPS \ + " $" VAR_SMTP_SASL_PASSWD \ + " $" VAR_SMTP_TLS_POLICY \ + " $" VAR_SMTPD_EHLO_DIS_MAPS \ + " $" VAR_SMTPD_MILTER_MAPS \ + " $" VAR_VIRT_GID_MAPS \ + " $" VAR_VIRT_UID_MAPS extern char *var_proxy_read_maps; #define VAR_PROXY_WRITE_MAPS "proxy_write_maps" @@ -2387,6 +2435,9 @@ #define VAR_PROCNAME "process_name" extern char *var_procname; +#define VAR_SERVNAME "service_name" +extern char *var_servname; + #define VAR_PID "process_id" extern int var_pid; @@ -3295,6 +3346,7 @@ #define VAR_SMTPD_MILTER_MAPS "smtpd_milter_maps" #define DEF_SMTPD_MILTER_MAPS "" extern char *var_smtpd_milter_maps; + #define SMTPD_MILTERS_DISABLE "DISABLE" #define VAR_CLEANUP_MILTERS "non_smtpd_milters" diff -Nru postfix-3.2.5/src/global/mail_parm_split.c postfix-3.3.0/src/global/mail_parm_split.c --- postfix-3.2.5/src/global/mail_parm_split.c 2017-02-02 13:39:32.000000000 +0000 +++ postfix-3.3.0/src/global/mail_parm_split.c 2017-12-27 22:29:44.000000000 +0000 @@ -36,6 +36,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* diff -Nru postfix-3.2.5/src/global/mail_queue.h postfix-3.3.0/src/global/mail_queue.h --- postfix-3.2.5/src/global/mail_queue.h 2017-02-19 01:58:20.000000000 +0000 +++ postfix-3.3.0/src/global/mail_queue.h 2017-12-27 22:29:44.000000000 +0000 @@ -182,6 +182,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif /* _MAIL_QUEUE_H_INCLUDED_ */ diff -Nru postfix-3.2.5/src/global/mail_version.h postfix-3.3.0/src/global/mail_version.h --- postfix-3.2.5/src/global/mail_version.h 2018-01-27 13:09:29.000000000 +0000 +++ postfix-3.3.0/src/global/mail_version.h 2018-02-22 00:17:21.000000000 +0000 @@ -20,8 +20,8 @@ * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ -#define MAIL_RELEASE_DATE "20180127" -#define MAIL_VERSION_NUMBER "3.2.5" +#define MAIL_RELEASE_DATE "20180221" +#define MAIL_VERSION_NUMBER "3.3.0" #ifdef SNAPSHOT #define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE @@ -99,6 +99,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/global/mime_state.c postfix-3.3.0/src/global/mime_state.c --- postfix-3.2.5/src/global/mime_state.c 2017-02-19 01:58:20.000000000 +0000 +++ postfix-3.3.0/src/global/mime_state.c 2017-12-27 21:53:13.000000000 +0000 @@ -237,6 +237,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ @@ -507,6 +512,7 @@ state->prev_rec_type = 0; state->stack = 0; state->token_buffer = vstring_alloc(1); + state->nesting_level = -1; /* BC Fix 20170512 */ /* Static members. */ state->static_flags = flags; diff -Nru postfix-3.2.5/src/global/post_mail.c postfix-3.3.0/src/global/post_mail.c --- postfix-3.2.5/src/global/post_mail.c 2017-02-19 01:58:20.000000000 +0000 +++ postfix-3.3.0/src/global/post_mail.c 2017-12-27 22:29:44.000000000 +0000 @@ -154,6 +154,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/global/post_mail.h postfix-3.3.0/src/global/post_mail.h --- postfix-3.2.5/src/global/post_mail.h 2015-12-27 21:30:56.000000000 +0000 +++ postfix-3.3.0/src/global/post_mail.h 2017-12-27 22:29:44.000000000 +0000 @@ -51,6 +51,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/global/quote_822_local.c postfix-3.3.0/src/global/quote_822_local.c --- postfix-3.2.5/src/global/quote_822_local.c 2017-01-14 22:34:05.000000000 +0000 +++ postfix-3.3.0/src/global/quote_822_local.c 2017-12-27 22:29:44.000000000 +0000 @@ -59,6 +59,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/global/quote_822_local.h postfix-3.3.0/src/global/quote_822_local.h --- postfix-3.2.5/src/global/quote_822_local.h 2017-01-12 00:20:53.000000000 +0000 +++ postfix-3.3.0/src/global/quote_822_local.h 2017-12-27 22:29:44.000000000 +0000 @@ -38,6 +38,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/global/quote_flags.h postfix-3.3.0/src/global/quote_flags.h --- postfix-3.2.5/src/global/quote_flags.h 2017-01-14 22:27:09.000000000 +0000 +++ postfix-3.3.0/src/global/quote_flags.h 2017-12-27 22:29:44.000000000 +0000 @@ -35,4 +35,9 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ diff -Nru postfix-3.2.5/src/global/record.c postfix-3.3.0/src/global/record.c --- postfix-3.2.5/src/global/record.c 2015-09-13 16:15:45.000000000 +0000 +++ postfix-3.3.0/src/global/record.c 2017-12-27 22:29:44.000000000 +0000 @@ -137,6 +137,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/global/resolve_clnt.c postfix-3.3.0/src/global/resolve_clnt.c --- postfix-3.2.5/src/global/resolve_clnt.c 2016-06-19 18:57:54.000000000 +0000 +++ postfix-3.3.0/src/global/resolve_clnt.c 2017-12-27 22:29:44.000000000 +0000 @@ -99,6 +99,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/global/resolve_clnt.h postfix-3.3.0/src/global/resolve_clnt.h --- postfix-3.2.5/src/global/resolve_clnt.h 2016-06-18 21:30:55.000000000 +0000 +++ postfix-3.3.0/src/global/resolve_clnt.h 2017-12-27 22:29:44.000000000 +0000 @@ -73,6 +73,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/global/scache.h postfix-3.3.0/src/global/scache.h --- postfix-3.2.5/src/global/scache.h 2017-02-19 01:58:20.000000000 +0000 +++ postfix-3.3.0/src/global/scache.h 2017-12-27 22:29:44.000000000 +0000 @@ -155,6 +155,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/global/split_addr.c postfix-3.3.0/src/global/split_addr.c --- postfix-3.2.5/src/global/split_addr.c 2017-01-14 19:56:16.000000000 +0000 +++ postfix-3.3.0/src/global/split_addr.c 2017-12-27 22:29:44.000000000 +0000 @@ -36,6 +36,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/global/split_addr.h postfix-3.3.0/src/global/split_addr.h --- postfix-3.2.5/src/global/split_addr.h 2017-01-10 00:49:08.000000000 +0000 +++ postfix-3.3.0/src/global/split_addr.h 2017-12-27 22:29:44.000000000 +0000 @@ -28,6 +28,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/global/strip_addr.c postfix-3.3.0/src/global/strip_addr.c --- postfix-3.2.5/src/global/strip_addr.c 2017-01-14 20:06:42.000000000 +0000 +++ postfix-3.3.0/src/global/strip_addr.c 2017-12-27 22:29:44.000000000 +0000 @@ -48,6 +48,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/global/strip_addr.h postfix-3.3.0/src/global/strip_addr.h --- postfix-3.2.5/src/global/strip_addr.h 2017-01-10 00:48:27.000000000 +0000 +++ postfix-3.3.0/src/global/strip_addr.h 2017-12-27 22:29:44.000000000 +0000 @@ -26,6 +26,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/global/uxtext.c postfix-3.3.0/src/global/uxtext.c --- postfix-3.2.5/src/global/uxtext.c 2015-10-03 20:42:15.000000000 +0000 +++ postfix-3.3.0/src/global/uxtext.c 2017-12-27 22:29:44.000000000 +0000 @@ -52,6 +52,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/global/verify.c postfix-3.3.0/src/global/verify.c --- postfix-3.2.5/src/global/verify.c 2015-12-27 22:07:28.000000000 +0000 +++ postfix-3.3.0/src/global/verify.c 2017-12-27 21:53:13.000000000 +0000 @@ -61,6 +61,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ @@ -100,11 +105,12 @@ * XXX vrfy_stat is competely redundant because of dsn. */ if (var_verify_neg_cache || vrfy_stat == DEL_RCPT_STAT_OK) { - req_stat = verify_clnt_update(recipient->orig_addr, vrfy_stat, - my_dsn.reason); + if (recipient->orig_addr[0]) + req_stat = verify_clnt_update(recipient->orig_addr, vrfy_stat, + my_dsn.reason); /* Two verify updates for one verify request! */ if (req_stat == VRFY_STAT_OK - && strcasecmp_utf8(recipient->address, recipient->orig_addr) != 0) + && strcmp(recipient->address, recipient->orig_addr) != 0) req_stat = verify_clnt_update(recipient->address, vrfy_stat, my_dsn.reason); } else { diff -Nru postfix-3.2.5/src/global/xtext.c postfix-3.3.0/src/global/xtext.c --- postfix-3.2.5/src/global/xtext.c 2015-10-03 20:43:23.000000000 +0000 +++ postfix-3.3.0/src/global/xtext.c 2017-12-27 22:29:45.000000000 +0000 @@ -49,6 +49,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/local/forward.c postfix-3.3.0/src/local/forward.c --- postfix-3.2.5/src/local/forward.c 2015-02-16 17:18:12.000000000 +0000 +++ postfix-3.3.0/src/local/forward.c 2017-12-27 22:29:45.000000000 +0000 @@ -48,6 +48,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/local/local.c postfix-3.3.0/src/local/local.c --- postfix-3.2.5/src/local/local.c 2016-09-17 14:50:55.000000000 +0000 +++ postfix-3.3.0/src/local/local.c 2018-01-14 16:48:25.000000000 +0000 @@ -361,13 +361,14 @@ /* .IP "\fBbiff (yes)\fR" /* Whether or not to use the local biff service. /* .IP "\fBexpand_owner_alias (no)\fR" -/* When delivering to an alias "aliasname" that has an "owner-aliasname" -/* companion alias, set the envelope sender address to the expansion -/* of the "owner-aliasname" alias. +/* When delivering to an alias "\fIaliasname\fR" that has an +/* "owner-\fIaliasname\fR" companion alias, set the envelope sender +/* address to the expansion of the "owner-\fIaliasname\fR" alias. /* .IP "\fBowner_request_special (yes)\fR" -/* Give special treatment to owner-listname and listname-request -/* address localparts: don't split such addresses when the -/* recipient_delimiter is set to "-". +/* Enable special treatment for owner-\fIlistname\fR entries in the +/* \fBaliases\fR(5) file, and don't split owner-\fIlistname\fR and +/* \fIlistname\fR-request address localparts when the recipient_delimiter +/* is set to "-". /* .IP "\fBsun_mailtool_compatibility (no)\fR" /* Obsolete SUN mailtool compatibility feature. /* .PP @@ -460,6 +461,11 @@ /* The maximal number of addresses remembered by the address /* duplicate filter for \fBaliases\fR(5) or \fBvirtual\fR(5) alias expansion, or /* for \fBshowq\fR(8) queue displays. +/* .IP "\fBmailbox_size_limit (51200000)\fR" +/* The maximal size of any \fBlocal\fR(8) individual mailbox or maildir +/* file, or zero (no limit). +/* .PP +/* Implemented in the qmgr(8) daemon: /* .IP "\fBlocal_destination_concurrency_limit (2)\fR" /* The maximal number of parallel deliveries via the local mail /* delivery transport to the same recipient (when @@ -469,9 +475,6 @@ /* .IP "\fBlocal_destination_recipient_limit (1)\fR" /* The maximal number of recipients per message delivery via the /* local mail delivery transport. -/* .IP "\fBmailbox_size_limit (51200000)\fR" -/* The maximal size of any \fBlocal\fR(8) individual mailbox or maildir -/* file, or zero (no limit). /* SECURITY CONTROLS /* .ad /* .fi @@ -548,6 +551,14 @@ /* .IP "\fBsyslog_name (see 'postconf -d' output)\fR" /* A prefix that is prepended to the process name in syslog /* records, so that, for example, "smtpd" becomes "prefix/smtpd". +/* .PP +/* Available in Postfix version 3.3 and later: +/* .IP "\fBenable_original_recipient (yes)\fR" +/* Enable support for the original recipient address after an +/* address is rewritten to a different address (for example with +/* aliasing or with canonical mapping). +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* FILES /* The following are examples; details differ between systems. /* $HOME/.forward, per-user aliasing diff -Nru postfix-3.2.5/src/master/event_server.c postfix-3.3.0/src/master/event_server.c --- postfix-3.2.5/src/master/event_server.c 2016-02-14 14:26:22.000000000 +0000 +++ postfix-3.3.0/src/master/event_server.c 2018-01-13 14:38:08.000000000 +0000 @@ -176,6 +176,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ @@ -675,10 +680,11 @@ zerolimit = 1; break; default: - msg_fatal("invalid option: %c", c); + msg_fatal("invalid option: %c", optopt); break; } } + set_mail_conf_str(VAR_SERVNAME, service_name); /* * Initialize generic parameters. diff -Nru postfix-3.2.5/src/master/master.c postfix-3.3.0/src/master/master.c --- postfix-3.2.5/src/master/master.c 2016-09-17 14:50:55.000000000 +0000 +++ postfix-3.3.0/src/master/master.c 2018-01-14 16:48:25.000000000 +0000 @@ -128,8 +128,9 @@ /* The Internet protocols Postfix will attempt to use when making /* or accepting connections. /* .IP "\fBimport_environment (see 'postconf -d' output)\fR" -/* The list of environment parameters that a Postfix process will -/* import from a non-Postfix parent process. +/* The list of environment parameters that a privileged Postfix +/* process will import from a non-Postfix parent process, or name=value +/* environment overrides. /* .IP "\fBmail_owner (postfix)\fR" /* The UNIX system account that owns the Postfix queue and most Postfix /* daemon processes. @@ -144,6 +145,10 @@ /* .IP "\fBsyslog_name (see 'postconf -d' output)\fR" /* A prefix that is prepended to the process name in syslog /* records, so that, for example, "smtpd" becomes "prefix/smtpd". +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* FILES /* .ad /* .fi diff -Nru postfix-3.2.5/src/master/multi_server.c postfix-3.3.0/src/master/multi_server.c --- postfix-3.2.5/src/master/multi_server.c 2016-02-14 14:26:22.000000000 +0000 +++ postfix-3.3.0/src/master/multi_server.c 2018-01-13 14:38:27.000000000 +0000 @@ -164,6 +164,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ @@ -671,10 +676,11 @@ zerolimit = 1; break; default: - msg_fatal("invalid option: %c", c); + msg_fatal("invalid option: %c", optopt); break; } } + set_mail_conf_str(VAR_SERVNAME, service_name); /* * Initialize generic parameters. diff -Nru postfix-3.2.5/src/master/single_server.c postfix-3.3.0/src/master/single_server.c --- postfix-3.2.5/src/master/single_server.c 2014-12-25 16:47:18.000000000 +0000 +++ postfix-3.3.0/src/master/single_server.c 2018-01-15 01:42:33.000000000 +0000 @@ -146,6 +146,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ @@ -549,10 +554,11 @@ zerolimit = 1; break; default: - msg_fatal("invalid option: %c", c); + msg_fatal("invalid option: %c", optopt); break; } } + set_mail_conf_str(VAR_SERVNAME, service_name); /* * Initialize generic parameters. diff -Nru postfix-3.2.5/src/master/trigger_server.c postfix-3.3.0/src/master/trigger_server.c --- postfix-3.2.5/src/master/trigger_server.c 2014-12-25 16:47:18.000000000 +0000 +++ postfix-3.3.0/src/master/trigger_server.c 2018-01-13 14:38:42.000000000 +0000 @@ -155,6 +155,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ @@ -552,10 +557,11 @@ zerolimit = 1; break; default: - msg_fatal("invalid option: %c", c); + msg_fatal("invalid option: %c", optopt); break; } } + set_mail_conf_str(VAR_SERVNAME, service_name); /* * Initialize generic parameters. diff -Nru postfix-3.2.5/src/milter/test-milter.c postfix-3.3.0/src/milter/test-milter.c --- postfix-3.2.5/src/milter/test-milter.c 2016-06-11 20:49:43.000000000 +0000 +++ postfix-3.3.0/src/milter/test-milter.c 2017-12-27 22:29:45.000000000 +0000 @@ -68,6 +68,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #include diff -Nru postfix-3.2.5/src/oqmgr/qmgr.c postfix-3.3.0/src/oqmgr/qmgr.c --- postfix-3.2.5/src/oqmgr/qmgr.c 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/src/oqmgr/qmgr.c 2018-01-14 16:48:25.000000000 +0000 @@ -188,31 +188,44 @@ /* .IP "\fBdefault_destination_concurrency_limit (20)\fR" /* The default maximal number of parallel deliveries to the same /* destination. -/* .IP "\fItransport\fB_destination_concurrency_limit ($default_destination_concurrency_limit)\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_destination_concurrency_limit ($default_destination_concurrency_limit)\fR" +/* A transport-specific override for the +/* default_destination_concurrency_limit parameter value, where +/* \fItransport\fR is the master.cf name of the message delivery +/* transport. /* .PP /* Available in Postfix version 2.5 and later: -/* .IP "\fItransport\fB_initial_destination_concurrency ($initial_destination_concurrency)\fR" -/* Initial concurrency for delivery via the named message -/* \fItransport\fR. +/* .IP "\fBtransport_initial_destination_concurrency ($initial_destination_concurrency)\fR" +/* A transport-specific override for the initial_destination_concurrency +/* parameter value, where \fItransport\fR is the master.cf name of +/* the message delivery transport. /* .IP "\fBdefault_destination_concurrency_failed_cohort_limit (1)\fR" /* How many pseudo-cohorts must suffer connection or handshake /* failure before a specific destination is considered unavailable /* (and further delivery is suspended). -/* .IP "\fItransport\fB_destination_concurrency_failed_cohort_limit ($default_destination_concurrency_failed_cohort_limit)\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_destination_concurrency_failed_cohort_limit ($default_destination_concurrency_failed_cohort_limit)\fR" +/* A transport-specific override for the +/* default_destination_concurrency_failed_cohort_limit parameter value, +/* where \fItransport\fR is the master.cf name of the message delivery +/* transport. /* .IP "\fBdefault_destination_concurrency_negative_feedback (1)\fR" /* The per-destination amount of delivery concurrency negative /* feedback, after a delivery completes with a connection or handshake /* failure. -/* .IP "\fItransport\fB_destination_concurrency_negative_feedback ($default_destination_concurrency_negative_feedback)\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_destination_concurrency_negative_feedback ($default_destination_concurrency_negative_feedback)\fR" +/* A transport-specific override for the +/* default_destination_concurrency_negative_feedback parameter value, +/* where \fItransport\fR is the master.cf name of the message delivery +/* transport. /* .IP "\fBdefault_destination_concurrency_positive_feedback (1)\fR" /* The per-destination amount of delivery concurrency positive /* feedback, after a delivery completes without connection or handshake /* failure. -/* .IP "\fItransport\fB_destination_concurrency_positive_feedback ($default_destination_concurrency_positive_feedback)\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_destination_concurrency_positive_feedback ($default_destination_concurrency_positive_feedback)\fR" +/* A transport-specific override for the +/* default_destination_concurrency_positive_feedback parameter value, +/* where \fItransport\fR is the master.cf name of the message delivery +/* transport. /* .IP "\fBdestination_concurrency_feedback_debug (no)\fR" /* Make the queue manager's feedback algorithm verbose for performance /* analysis purposes. @@ -221,8 +234,11 @@ /* .fi /* .IP "\fBdefault_destination_recipient_limit (50)\fR" /* The default maximal number of recipients per message delivery. -/* .IP \fItransport\fB_destination_recipient_limit\fR -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_destination_recipient_limit ($default_destination_recipient_limit)\fR" +/* A transport-specific override for the +/* default_destination_recipient_limit parameter value, where +/* \fItransport\fR is the master.cf name of the message delivery +/* transport. /* OTHER RESOURCE AND RATE CONTROLS /* .ad /* .fi @@ -253,16 +269,20 @@ /* The default amount of delay that is inserted between individual /* deliveries to the same destination; the resulting behavior depends /* on the value of the corresponding per-destination recipient limit. -/* .IP "\fItransport\fB_destination_rate_delay $default_destination_rate_delay\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_destination_rate_delay ($default_destination_rate_delay)\fR" +/* A transport-specific override for the default_destination_rate_delay +/* parameter value, where \fItransport\fR is the master.cf name of +/* the message delivery transport. /* .PP /* Available in Postfix version 3.1 and later: /* .IP "\fBdefault_transport_rate_delay (0s)\fR" /* The default amount of delay that is inserted between individual /* deliveries over the same message delivery transport, regardless of /* destination. -/* .IP "\fItransport\fB_transport_rate_delay $default_transport_rate_delay\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_transport_rate_delay ($default_transport_rate_delay)\fR" +/* A transport-specific override for the default_transport_rate_delay +/* parameter value, where the initial \fItransport\fR in the parameter +/* name is the master.cf name of the message delivery transport. /* SAFETY CONTROLS /* .ad /* .fi @@ -308,6 +328,10 @@ /* .IP "\fBconfirm_delay_cleared (no)\fR" /* After sending a "your message is delayed" notification, inform /* the sender when the delay clears up. +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* FILES /* /var/spool/postfix/incoming, incoming queue /* /var/spool/postfix/active, active queue diff -Nru postfix-3.2.5/src/oqmgr/qmgr.h postfix-3.3.0/src/oqmgr/qmgr.h --- postfix-3.2.5/src/oqmgr/qmgr.h 2015-12-27 21:30:56.000000000 +0000 +++ postfix-3.3.0/src/oqmgr/qmgr.h 2017-12-27 22:29:45.000000000 +0000 @@ -423,4 +423,9 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ diff -Nru postfix-3.2.5/src/oqmgr/qmgr_message.c postfix-3.3.0/src/oqmgr/qmgr_message.c --- postfix-3.2.5/src/oqmgr/qmgr_message.c 2017-01-09 23:01:17.000000000 +0000 +++ postfix-3.3.0/src/oqmgr/qmgr_message.c 2017-12-27 21:53:13.000000000 +0000 @@ -89,6 +89,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ @@ -600,17 +605,18 @@ continue; } if (rec_type == REC_TYPE_DSN_ENVID) { - if (message->dsn_envid == 0) - message->dsn_envid = mystrdup(start); + /* Allow Milter override. */ + if (message->dsn_envid != 0) + myfree(message->dsn_envid); + message->dsn_envid = mystrdup(start); } if (rec_type == REC_TYPE_DSN_RET) { - if (message->dsn_ret == 0) { - if (!alldig(start) || (n = atoi(start)) == 0 || !DSN_RET_OK(n)) - msg_warn("%s: ignoring malformed DSN RET flags in queue file record:%.100s", - message->queue_id, start); - else - message->dsn_ret = n; - } + /* Allow Milter override. */ + if (!alldig(start) || (n = atoi(start)) == 0 || !DSN_RET_OK(n)) + msg_warn("%s: ignoring malformed DSN RET flags in queue file record:%.100s", + message->queue_id, start); + else + message->dsn_ret = n; } if (rec_type == REC_TYPE_ATTR) { /* Allow extra segment to override envelope segment info. */ diff -Nru postfix-3.2.5/src/pickup/pickup.c postfix-3.3.0/src/pickup/pickup.c --- postfix-3.2.5/src/pickup/pickup.c 2016-09-17 14:50:55.000000000 +0000 +++ postfix-3.3.0/src/pickup/pickup.c 2018-01-14 16:48:25.000000000 +0000 @@ -80,6 +80,10 @@ /* .IP "\fBsyslog_name (see 'postconf -d' output)\fR" /* A prefix that is prepended to the process name in syslog /* records, so that, for example, "smtpd" becomes "prefix/smtpd". +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* SEE ALSO /* cleanup(8), message canonicalization /* sendmail(1), Sendmail-compatible interface diff -Nru postfix-3.2.5/src/pipe/pipe.c postfix-3.3.0/src/pipe/pipe.c --- postfix-3.2.5/src/pipe/pipe.c 2017-01-09 23:02:51.000000000 +0000 +++ postfix-3.3.0/src/pipe/pipe.c 2018-01-14 16:48:25.000000000 +0000 @@ -354,22 +354,22 @@ /* .fi /* In the text below, \fItransport\fR is the first field in a /* \fBmaster.cf\fR entry. -/* .IP "\fItransport\fB_destination_concurrency_limit ($default_destination_concurrency_limit)\fR" -/* Limit the number of parallel deliveries to the same destination, -/* for delivery via the named \fItransport\fR. -/* The limit is enforced by the Postfix queue manager. -/* .IP "\fItransport\fB_destination_recipient_limit ($default_destination_recipient_limit)\fR" -/* Limit the number of recipients per message delivery, for delivery -/* via the named \fItransport\fR. -/* The limit is enforced by the Postfix queue manager. -/* .IP "\fItransport\fB_time_limit ($command_time_limit)\fR" -/* Limit the time for delivery to external command, for delivery via -/* the named \fItransport\fR. -/* The limit is enforced by the pipe delivery agent. -/* -/* Postfix 2.4 and later support a suffix that specifies the -/* time unit: s (seconds), m (minutes), h (hours), d (days), -/* w (weeks). The default time unit is seconds. +/* .IP "\fBtransport_time_limit ($command_time_limit)\fR" +/* A transport-specific override for the command_time_limit parameter +/* value, where \fItransport\fR is the master.cf name of the message +/* delivery transport. +/* .PP +/* Implemented in the qmgr(8) daemon: +/* .IP "\fBtransport_destination_concurrency_limit ($default_destination_concurrency_limit)\fR" +/* A transport-specific override for the +/* default_destination_concurrency_limit parameter value, where +/* \fItransport\fR is the master.cf name of the message delivery +/* transport. +/* .IP "\fBtransport_destination_recipient_limit ($default_destination_recipient_limit)\fR" +/* A transport-specific override for the +/* default_destination_recipient_limit parameter value, where +/* \fItransport\fR is the master.cf name of the message delivery +/* transport. /* MISCELLANEOUS CONTROLS /* .ad /* .fi @@ -418,6 +418,14 @@ /* Optional filter for the \fBpipe\fR(8) delivery agent to change the /* delivery status code or explanatory text of successful or unsuccessful /* deliveries. +/* .PP +/* Available in Postfix version 3.3 and later: +/* .IP "\fBenable_original_recipient (yes)\fR" +/* Enable support for the original recipient address after an +/* address is rewritten to a different address (for example with +/* aliasing or with canonical mapping). +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* SEE ALSO /* qmgr(8), queue manager /* bounce(8), delivery status reports diff -Nru postfix-3.2.5/src/postconf/extract_cfg.sh postfix-3.3.0/src/postconf/extract_cfg.sh --- postfix-3.2.5/src/postconf/extract_cfg.sh 1970-01-01 00:00:00.000000000 +0000 +++ postfix-3.3.0/src/postconf/extract_cfg.sh 2017-07-27 21:47:58.000000000 +0000 @@ -0,0 +1,89 @@ +#!/bin/sh + +# To view the formatted manual page of this file, type: +# POSTFIXSOURCE/mantools/srctoman - extract_cfg.sh | nroff -man + +#++ +# NAME +# extract_cfg 1 +# SUMMARY +# extract database parameter names from cfg_get_xxx() calls +# SYNOPSIS +# \fBextract_cfg [-d|-s] [\fIfile...\fB]\fR +# DESCRIPTION +# The \fBextract_cfg\fR command extracts the parameter names +# from cfg_get_{str,int,bool}() calls in dict_xxx.c files. The +# output is one parameter name per line, formatted as a C string +# followed by comma. +# +# Options: +# .IP \fB-d\fR +# Add the "domain" parameter to the output. This is used by +# the LDAP, memcache, and *SQL* tables. +# .IP \fB-s\fR +# Add the legacy SQL query parameters: "select_field", "table", +# "where_field", and "additional_conditions". +# LICENSE +# .ad +# .fi +# The Secure Mailer license must be distributed with this software. +# HISTORY +# .ad +# .fi +# This command was introduced with Postfix 3.3. +# AUTHOR(S) +# Wietse Venema +# Google, Inc. +# 111 8th Avenue +# New York, NY 10011, USA +#-- + +# Flags to add db_common parameter names. +add_legacy_sql_query_params= +add_domain_param= + +# Parse JCL. + +while : +do + case "$1" in + -d) add_domain_param=1;; + -s) add_legacy_sql_query_params=1;; + -*) echo Bad option: $1 1>&2; exit 1;; + *) break;; + esac + shift +done + +# We use m4 macros to extract arguments from cfg_get_xxx() calls that +# may span multiple lines. We sandwich information of interest between +# control-A characters. Multiple cfg_get_xxx() calls on the same line +# should be OK, as long as the calls don't nest. + +( +cat <<'EOF' +define(`cfg_get_str',`$2 +')dnl +define(`cfg_get_int',`$2 +')dnl +define(`cfg_get_bool',`$2 +')dnl +EOF +# Convert selected C macro definitions into m4 macro definitions. +sed 's/^#define[ ]*\([DICT_MC_NAME_A-Za-z0-9_]*\)[ ]*\("[^"]*"\)/define(`\1'"'"',`\2'"'"')/' "$@" +) | m4 | awk -F '// { print $2 }' | ( +test -n "$add_domain_param" && { +cat < $@ + +pcf_memcache_suffixes.h: ../global/dict_memcache.c + sh extract_cfg.sh -d ../global/dict_memcache.c > $@ + +pcf_mysql_suffixes.h: ../global/dict_mysql.c + sh extract_cfg.sh -d -s ../global/dict_mysql.c > $@ + +pcf_pgsql_suffixes.h: ../global/dict_pgsql.c + sh extract_cfg.sh -d -s ../global/dict_pgsql.c > $@ + +pcf_sqlite_suffixes.h: ../global/dict_sqlite.c + sh extract_cfg.sh -d -s ../global/dict_sqlite.c > $@ # Define two parameters with smtpd_restriction_classes. One will be ignored. @@ -418,8 +436,8 @@ echo 'yy = aap' >> main.cf echo 'db = memcache' >> main.cf echo whatevershebrings unix - n n - 0 other >> master.cf - echo ' -o body_checks=$$db:zz' >> master.cf - echo 'zz_domain = whatever' >> main.cf + echo ' -o body_checks=$$db:$$zz' >> master.cf + echo 'aap_domain = whatever' >> main.cf echo 'aa_domain = whatever' >> main.cf touch -t 197101010000 main.cf $(SHLIB_ENV) ./$(PROG) -nc . >test28.tmp 2>&1 @@ -870,6 +888,67 @@ diff test65.ref test65.tmp rm -f main.cf master.cf test65.tmp +# unknown parameters in database configuration file (absolute pathname). + +test66: $(PROG) test66.ref + rm -f main.cf master.cf + touch master.cf + echo alias_maps = ldap:`pwd`/test66.cf >> main.cf + echo " " mysql:`pwd`/test66.cf >> main.cf + echo " " pgsql:`pwd`/test66.cf >> main.cf + echo " " sqlite:`pwd`/test66.cf >> main.cf + echo " " memcache:`pwd`/test66.cf >> main.cf + echo junk = junk >> test66.cf + touch -t 197101010000 main.cf + $(SHLIB_ENV) ./$(PROG) -c. 2>test66.tmp >/dev/null + sed "s;PWD;`pwd`;" test66.ref | diff - test66.tmp + rm -f main.cf master.cf test66.tmp test66.cf + +# expand process name and service name in master.cf. + +test67: $(PROG) test67.ref + rm -f main.cf master.cf + touch master.cf + echo 'smtp inet n - n - - smtpd' >>master.cf + echo ' -o test1_process_name=$$process_name' >> master.cf + echo ' -o test1_service_name=$$service_name' >> master.cf + echo 'smtp unix n - n - - smtp' >>master.cf + echo ' -o test2_process_name=$$process_name' >> master.cf + echo ' -o test2_service_name=$$service_name' >> master.cf + touch -t 197101010000 main.cf + $(SHLIB_ENV) ./$(PROG) -xMfc. >test67.tmp 2>&1 + diff test67.ref test67.tmp + rm -f main.cf master.cf test67.tmp + +test68: $(PROG) test68.ref + rm -f main.cf master.cf + touch master.cf + echo foo = ldap:`pwd` >> main.cf + echo 'alias_maps = $$foo/test68.cf' >> main.cf + echo " " mysql:`pwd`/test68.cf >> main.cf + echo " " pgsql:`pwd`/test68.cf >> main.cf + echo " " sqlite:`pwd`/test68.cf >> main.cf + echo " " memcache:`pwd`/test68.cf >> main.cf + echo junk = junk >> test68.cf + touch -t 197101010000 main.cf + $(SHLIB_ENV) ./$(PROG) -c. 2>test68.tmp >/dev/null + sed "s;PWD;`pwd`;" test68.ref | diff - test68.tmp + rm -f main.cf master.cf test68.tmp test68.cf + +# See also test28 for user-defined parameters defined in main.cf. + +test69: $(PROG) test69.ref + rm -f main.cf master.cf + touch main.cf master.cf + echo whatevershebrings unix - n n - 0 other >> master.cf + echo " -o ldap=ldap:`pwd`" >> master.cf + echo ' -o body_checks=$$ldap/test69.cf' >> master.cf + echo junk = junk >> test69.cf + touch -t 197101010000 main.cf + $(SHLIB_ENV) ./$(PROG) -nc . >test69.tmp 2>&1 + diff test69.ref test69.tmp + rm -f main.cf master.cf test69.tmp test69.cf + printfck: $(OBJS) $(PROG) rm -rf printfck mkdir printfck @@ -883,7 +962,7 @@ clean: rm -f *.o *core $(PROG) $(TESTPROG) junk $(MAKES) $(AUTOS) $(DUMMIES) \ - $(TEST_TMP) + $(TEST_TMP) $(DB_MAKES) rm -rf printfck tidy: clean @@ -971,6 +1050,7 @@ postconf_dbms.o: ../../include/argv.h postconf_dbms.o: ../../include/check_arg.h postconf_dbms.o: ../../include/dict.h +postconf_dbms.o: ../../include/dict_ht.h postconf_dbms.o: ../../include/dict_ldap.h postconf_dbms.o: ../../include/dict_memcache.h postconf_dbms.o: ../../include/dict_mysql.h @@ -992,8 +1072,13 @@ postconf_dbms.o: ../../include/vbuf.h postconf_dbms.o: ../../include/vstream.h postconf_dbms.o: ../../include/vstring.h -postconf_dbms.o: postconf.h +postconf_dbms.o: pcf_ldap_suffixes.h +postconf_dbms.o: pcf_memcache_suffixes.h +postconf_dbms.o: pcf_mysql_suffixes.h +postconf_dbms.o: pcf_pgsql_suffixes.h postconf_dbms.o: postconf_dbms.c +postconf_dbms.o: postconf.h +postconf_dbms.o: pcf_sqlite_suffixes.h postconf_edit.o: ../../include/argv.h postconf_edit.o: ../../include/check_arg.h postconf_edit.o: ../../include/dict.h @@ -1012,8 +1097,8 @@ postconf_edit.o: ../../include/vstream.h postconf_edit.o: ../../include/vstring.h postconf_edit.o: ../../include/vstring_vstream.h -postconf_edit.o: postconf.h postconf_edit.o: postconf_edit.c +postconf_edit.o: postconf.h postconf_lookup.o: ../../include/argv.h postconf_lookup.o: ../../include/check_arg.h postconf_lookup.o: ../../include/dict.h diff -Nru postfix-3.2.5/src/postconf/postconf_builtin.c postfix-3.3.0/src/postconf/postconf_builtin.c --- postfix-3.2.5/src/postconf/postconf_builtin.c 2016-01-16 23:48:42.000000000 +0000 +++ postfix-3.3.0/src/postconf/postconf_builtin.c 2018-01-15 01:30:12.000000000 +0000 @@ -173,6 +173,7 @@ * effects, then those side effects must happen only once. */ static CONFIG_STR_TABLE pcf_adhoc_procname = {VAR_PROCNAME}; +static CONFIG_STR_TABLE pcf_adhoc_servname = {VAR_SERVNAME}; static CONFIG_INT_TABLE pcf_adhoc_pid = {VAR_PID}; #define STR(x) vstring_str(x) @@ -445,6 +446,10 @@ PCF_PARAM_TABLE_ENTER(pcf_param_table, pcf_adhoc_procname.name, PCF_PARAM_FLAG_BUILTIN | PCF_PARAM_FLAG_READONLY, (void *) &pcf_adhoc_procname, pcf_conv_str_parameter); + pcf_adhoc_servname.defval = mystrdup(""); + PCF_PARAM_TABLE_ENTER(pcf_param_table, pcf_adhoc_servname.name, + PCF_PARAM_FLAG_BUILTIN | PCF_PARAM_FLAG_READONLY, + (void *) &pcf_adhoc_servname, pcf_conv_str_parameter); pcf_adhoc_pid.defval = pid; PCF_PARAM_TABLE_ENTER(pcf_param_table, pcf_adhoc_pid.name, PCF_PARAM_FLAG_BUILTIN | PCF_PARAM_FLAG_READONLY, diff -Nru postfix-3.2.5/src/postconf/postconf.c postfix-3.3.0/src/postconf/postconf.c --- postfix-3.2.5/src/postconf/postconf.c 2017-02-05 16:27:54.000000000 +0000 +++ postfix-3.3.0/src/postconf/postconf.c 2018-01-15 01:29:06.000000000 +0000 @@ -1012,6 +1012,7 @@ else pcf_show_master_entries(VSTREAM_OUT, pcf_cmd_mode, argc - optind, argv + optind); + pcf_flag_unused_master_parameters(); } /* diff -Nru postfix-3.2.5/src/postconf/postconf_dbms.c postfix-3.3.0/src/postconf/postconf_dbms.c --- postfix-3.2.5/src/postconf/postconf_dbms.c 2016-12-26 21:17:22.000000000 +0000 +++ postfix-3.3.0/src/postconf/postconf_dbms.c 2018-02-19 01:48:47.000000000 +0000 @@ -22,7 +22,9 @@ /* When a database type is found that supports legacy-style /* configuration, the table name is combined with each of the /* database-defined suffixes to generate candidate parameter -/* names for that database type. +/* names for that database type; if the table name specifies +/* a client configuration file, that file is scanned for unused +/* parameter settings. /* .IP flag_parameter /* A function that takes as arguments a candidate parameter /* name, parameter flags, and a PCF_MASTER_ENT pointer. The @@ -41,11 +43,18 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ #include +#include +#include #include /* Utility library. */ @@ -61,6 +70,7 @@ #include #include +#include #include #include #include @@ -87,45 +97,36 @@ /* See ldap_table(5). */ static const char *pcf_ldap_suffixes[] = { - "bind", "bind_dn", "bind_pw", "cache", "cache_expiry", "cache_size", - "chase_referrals", "debuglevel", "dereference", "domain", - "expansion_limit", "leaf_result_attribute", "query_filter", - "recursion_limit", "result_attribute", "result_format", "scope", - "search_base", "server_host", "server_port", "size_limit", - "special_result_attribute", "terminal_result_attribute", - "timeout", "version", 0, +#include "pcf_ldap_suffixes.h" + 0, }; /* See mysql_table(5). */ static const char *pcf_mysql_suffixes[] = { - "additional_conditions", "dbname", "domain", "expansion_limit", - "hosts", "password", "query", "result_format", "require_result_set", - "select_field", "table", "user", "where_field", 0, +#include "pcf_mysql_suffixes.h" + 0, }; /* See pgsql_table(5). */ static const char *pcf_pgsql_suffixes[] = { - "additional_conditions", "dbname", "domain", "expansion_limit", - "hosts", "password", "query", "result_format", "select_field", - "select_function", "table", "user", "where_field", 0, +#include "pcf_pgsql_suffixes.h" + 0, }; /* See sqlite_table(5). */ static const char *pcf_sqlite_suffixes[] = { - "additional_conditions", "dbpath", "domain", "expansion_limit", - "query", "result_format", "select_field", "table", "where_field", +#include "pcf_sqlite_suffixes.h" 0, }; /* See memcache_table(5). */ static const char *pcf_memcache_suffixes[] = { - "backup", "data_size_limit", "domain", "flags", "key_format", - "line_size_limit", "max_try", "memcache", "retry_pause", - "timeout", "ttl", 0, +#include "pcf_memcache_suffixes.h" + 0, }; /* @@ -145,6 +146,72 @@ 0, }; +/* pcf_check_dbms_client - look for unused names in client configuration */ + +static void pcf_check_dbms_client(const PCF_DBMS_INFO *dp, const char *cf_file) +{ + DICT *dict; + VSTREAM *fp; + const char **cpp; + const char *name; + const char *value; + char *dict_spec; + int dir; + + /* + * We read each database client configuration file into its own + * dictionary, and nag only the first time that a file is visited. + */ + dict_spec = concatenate(dp->db_type, ":", cf_file, (char *) 0); + if ((dict = dict_handle(dict_spec)) == 0) { + struct stat st; + + /* + * Populate the dictionary with settings in this database client + * configuration file. Don't die if a file can't be opened - some + * files may contain passwords and should not be world-readable. + * Note: dict_load_fp() nags about duplicate pameter settings. + */ + dict = dict_ht_open(dict_spec, O_CREAT | O_RDWR, 0); + dict_register(dict_spec, dict); + if ((fp = vstream_fopen(cf_file, O_RDONLY, 0)) == 0 + && errno != EACCES) { + msg_warn("open \"%s\" configuration \"%s\": %m", + dp->db_type, cf_file); + myfree(dict_spec); + return; + } + if (fstat(vstream_fileno(fp), &st) == 0 && !S_ISREG(st.st_mode)) { + msg_warn("open \"%s\" configuration \"%s\": not a regular file", + dp->db_type, cf_file); + myfree(dict_spec); + (void) vstream_fclose(fp); + return; + } + dict_load_fp(dict_spec, fp); + if (vstream_fclose(fp)) { + msg_warn("read \"%s\" configuration \"%s\": %m", + dp->db_type, cf_file); + myfree(dict_spec); + return; + } + + /* + * Remove all known database client parameters from this dictionary, + * then report the remaining ones as "unused". We use ad-hoc logging + * code, because a database client parameter namespace is unlike the + * parameter namespaces in main.cf or master.cf. + */ + for (cpp = dp->db_suffixes; *cpp; cpp++) + (void) dict_del(dict, *cpp); + for (dir = DICT_SEQ_FUN_FIRST; + dict->sequence(dict, dir, &name, &value) == DICT_STAT_SUCCESS; + dir = DICT_SEQ_FUN_NEXT) + msg_warn("%s: unused parameter: %s=%s", dict_spec, name, value); + } + myfree(dict_spec); +} + /* pcf_register_dbms_helper - parse one possible database type:name */ static void pcf_register_dbms_helper(char *str_value, @@ -172,6 +239,28 @@ && strcmp(db_type, DICT_TYPE_PROXY) == 0) db_type = prefix; + if (prefix == 0) + continue; + + /* + * Look for database:prefix where the prefix is an absolute pathname. + * Then, report unknown database client configuration parameters. + * + * XXX What about a pathname beginning with '.'? This supposedly is + * relative to the queue directory, which is the default directory + * for all Postfix daemon processes. This would also have to handle + * the case that the queue is not yet created. + */ + if (*prefix == '/') { + for (dp = pcf_dbms_info; dp->db_type != 0; dp++) { + if (strcmp(db_type, dp->db_type) == 0) { + pcf_check_dbms_client(dp, prefix); + break; + } + } + continue; + } + /* * Look for database:prefix where the prefix is not a pathname and * the database is a known type. Synthesize candidate parameter names @@ -179,7 +268,7 @@ * list, and see if those parameters have a "name=value" entry in the * local or global namespace. */ - if (prefix != 0 && *prefix != '/' && *prefix != '.') { + if (*prefix != '.') { if (*prefix == CHARS_BRACE[0]) { if ((err = extpar(&prefix, CHARS_BRACE, EXTPAR_FLAG_NONE)) != 0) { /* XXX Encapsulate this in pcf_warn() function. */ diff -Nru postfix-3.2.5/src/postconf/postconf.h postfix-3.3.0/src/postconf/postconf.h --- postfix-3.2.5/src/postconf/postconf.h 2016-01-31 21:05:46.000000000 +0000 +++ postfix-3.3.0/src/postconf/postconf.h 2018-02-19 01:43:29.000000000 +0000 @@ -75,6 +75,9 @@ ((node)->flags = (((node)->flags & ~PCF_PARAM_MASK_CLASS) | (class))) #define PCF_RAW_PARAMETER(node) ((node)->flags & PCF_PARAM_FLAG_RAW) +#define PCF_BUILTIN_PARAMETER(node) ((node)->flags & PCF_PARAM_FLAG_BUILTIN) +#define PCF_SERVICE_PARAMETER(node) ((node)->flags & PCF_PARAM_FLAG_SERVICE) +#define PCF_USER_PARAMETER(node) ((node)->flags & PCF_PARAM_FLAG_USER) #define PCF_LEGACY_PARAMETER(node) ((node)->flags & PCF_PARAM_FLAG_LEGACY) #define PCF_READONLY_PARAMETER(node) ((node)->flags & PCF_PARAM_FLAG_READONLY) #define PCF_DBMS_PARAMETER(node) ((node)->flags & PCF_PARAM_FLAG_DBMS) @@ -118,6 +121,7 @@ char *name_space; /* service/type, parameter name space */ ARGV *argv; /* null, or master.cf fields */ DICT *all_params; /* null, or all name=value entries */ + DICT *ro_params; /* read-only name=value entries */ HTABLE *valid_names; /* null, or "valid" parameter names */ } PCF_MASTER_ENT; diff -Nru postfix-3.2.5/src/postconf/postconf_lookup.c postfix-3.3.0/src/postconf/postconf_lookup.c --- postfix-3.2.5/src/postconf/postconf_lookup.c 2014-12-07 01:35:34.000000000 +0000 +++ postfix-3.3.0/src/postconf/postconf_lookup.c 2018-01-13 22:47:58.000000000 +0000 @@ -73,6 +73,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ @@ -107,14 +112,17 @@ { const char *value = 0; +#define LOOKUP(dict, name) ((dict) ? dict_get((dict), (name)) : 0) + /* * Local name=value entries in master.cf take precedence over global * name=value entries in main.cf. Built-in defaults have the lowest * precedence. */ if ((mode & PCF_SHOW_DEFS) != 0 - || ((local_scope == 0 || local_scope->all_params == 0 - || (value = dict_get(local_scope->all_params, name)) == 0) + || ((local_scope == 0 + || ((value = LOOKUP(local_scope->ro_params, name)) == 0 + && (value = LOOKUP(local_scope->all_params, name)) == 0)) && (value = dict_lookup(CONFIG_DICT, name)) == 0 && (mode & PCF_SHOW_NONDEF) == 0)) { if (node != 0 || (node = PCF_PARAM_TABLE_FIND(pcf_param_table, name)) != 0) diff -Nru postfix-3.2.5/src/postconf/postconf_master.c postfix-3.3.0/src/postconf/postconf_master.c --- postfix-3.2.5/src/postconf/postconf_master.c 2016-01-17 15:05:19.000000000 +0000 +++ postfix-3.3.0/src/postconf/postconf_master.c 2018-01-13 22:21:22.000000000 +0000 @@ -353,6 +353,8 @@ argv_free(masterp->argv); if (masterp->valid_names) htable_free(masterp->valid_names, myfree); + if (masterp->ro_params) + dict_free(masterp->ro_params); if (masterp->all_params) dict_free(masterp->all_params); myfree((void *) masterp); @@ -363,6 +365,8 @@ const char *pcf_parse_master_entry(PCF_MASTER_ENT *masterp, const char *buf) { ARGV *argv; + char *ro_name_space; + char *process_name; /* * We can't use the master daemon's master_ent routines in their current @@ -384,8 +388,17 @@ pcf_normalize_daemon_args(argv); masterp->name_space = concatenate(argv->argv[0], PCF_NAMESP_SEP_STR, argv->argv[1], (char *) 0); + ro_name_space = + concatenate("ro", PCF_NAMESP_SEP_STR, masterp->name_space, (char *) 0); masterp->argv = argv; masterp->valid_names = 0; + process_name = basename(argv->argv[PCF_MASTER_FLD_CMD]); + dict_update(ro_name_space, VAR_PROCNAME, process_name); + dict_update(ro_name_space, VAR_SERVNAME, + strcmp(process_name, argv->argv[0]) != 0 ? + argv->argv[0] : process_name); + masterp->ro_params = dict_handle(ro_name_space); + myfree(ro_name_space); masterp->all_params = 0; return (0); } diff -Nru postfix-3.2.5/src/postconf/postconf_user.c postfix-3.3.0/src/postconf/postconf_user.c --- postfix-3.2.5/src/postconf/postconf_user.c 2014-12-07 01:35:32.000000000 +0000 +++ postfix-3.3.0/src/postconf/postconf_user.c 2018-02-19 15:59:28.000000000 +0000 @@ -35,6 +35,11 @@ /* name spaces for user-defined parameters and flags parameters /* as "valid" in the global name space (pcf_param_table) or /* in the per-service name space (valid_params). +/* +/* This function also invokes pcf_register_dbms_parameters() to +/* to instantiate legacy per-dbms parameters, and to examine +/* per-dbms configuration files. This is limited to the content +/* of global and local, built-in and per-service, parameters. /* DIAGNOSTICS /* Problems are reported to the standard error stream. /* LICENSE @@ -46,6 +51,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ @@ -290,8 +300,16 @@ } SCAN_USER_PARAMETER_VALUE(cparam_value, PCF_PARAM_FLAG_USER, local_scope); #ifdef LEGACY_DBMS_SUPPORT - pcf_register_dbms_parameters(cparam_value, pcf_flag_user_parameter, - local_scope); + + /* + * Scan global or local parameters that are built-in or per-service + * (when node == 0, the parameter doesn't exist in the global + * namespace and therefore it can't be built-in or per-service). + */ + if (node != 0 + && (PCF_BUILTIN_PARAMETER(node) || PCF_SERVICE_PARAMETER(node))) + pcf_register_dbms_parameters(cparam_value, pcf_flag_user_parameter, + local_scope); #endif } } diff -Nru postfix-3.2.5/src/postconf/test28.ref postfix-3.3.0/src/postconf/test28.ref --- postfix-3.2.5/src/postconf/test28.ref 2013-01-08 01:31:05.000000000 +0000 +++ postfix-3.3.0/src/postconf/test28.ref 2018-02-19 00:07:59.000000000 +0000 @@ -1,10 +1,10 @@ +aap_domain = whatever config_directory = . db = memcache -foo_domain = bar header_checks = ldap:hh hh_domain = whatever yy = aap -zz_domain = whatever -./postconf: warning: ./main.cf: unused parameter: zz=$yy +zz = $yy +./postconf: warning: ./main.cf: unused parameter: foo_domain=bar ./postconf: warning: ./main.cf: unused parameter: aa_domain=whatever ./postconf: warning: ./main.cf: unused parameter: xx=proxy:ldap:foo diff -Nru postfix-3.2.5/src/postconf/test29.ref postfix-3.3.0/src/postconf/test29.ref --- postfix-3.2.5/src/postconf/test29.ref 2013-01-08 01:31:36.000000000 +0000 +++ postfix-3.3.0/src/postconf/test29.ref 2018-02-19 01:24:57.000000000 +0000 @@ -1,16 +1,16 @@ config_directory = . -ldapfoo_domain = bar -memcachefoo_domain = bar -mysqlfoo_domain = bar -pgsqlfoo_domain = bar -sqlitefoo_domain = bar ./postconf: warning: ./main.cf: unused parameter: sqlitexx=proxy:sqlite:sqlitefoo ./postconf: warning: ./main.cf: unused parameter: pgsqlxx=proxy:pgsql:pgsqlfoo +./postconf: warning: ./main.cf: unused parameter: ldapfoo_domain=bar ./postconf: warning: ./main.cf: unused parameter: memcachefoo_domainx=bar ./postconf: warning: ./main.cf: unused parameter: sqlitefoo_domainx=bar +./postconf: warning: ./main.cf: unused parameter: sqlitefoo_domain=bar ./postconf: warning: ./main.cf: unused parameter: memcachexx=proxy:memcache:memcachefoo ./postconf: warning: ./main.cf: unused parameter: mysqlxx=proxy:mysql:mysqlfoo ./postconf: warning: ./main.cf: unused parameter: ldapxx=proxy:ldap:ldapfoo ./postconf: warning: ./main.cf: unused parameter: ldapfoo_domainx=bar +./postconf: warning: ./main.cf: unused parameter: memcachefoo_domain=bar ./postconf: warning: ./main.cf: unused parameter: pgsqlfoo_domainx=bar ./postconf: warning: ./main.cf: unused parameter: mysqlfoo_domainx=bar +./postconf: warning: ./main.cf: unused parameter: mysqlfoo_domain=bar +./postconf: warning: ./main.cf: unused parameter: pgsqlfoo_domain=bar diff -Nru postfix-3.2.5/src/postconf/test40.ref postfix-3.3.0/src/postconf/test40.ref --- postfix-3.2.5/src/postconf/test40.ref 2013-11-26 21:05:02.000000000 +0000 +++ postfix-3.3.0/src/postconf/test40.ref 2018-01-13 22:59:06.000000000 +0000 @@ -4,3 +4,4 @@ -o ccc=bbb -v -o ddd=bbb +./postconf: warning: ./master.cf: unused parameter: ddd=$ccc diff -Nru postfix-3.2.5/src/postconf/test41.ref postfix-3.3.0/src/postconf/test41.ref --- postfix-3.2.5/src/postconf/test41.ref 2013-11-26 16:02:03.000000000 +0000 +++ postfix-3.3.0/src/postconf/test41.ref 2018-01-13 22:59:19.000000000 +0000 @@ -3,10 +3,16 @@ -o xxx=yyy -o aaa=bbb baz unix - n n - 0 other +./postconf: warning: ./master.cf: unused parameter: aaa=bbb +./postconf: warning: ./master.cf: unused parameter: xxx=yyy foo unix - n n - 0 other bar unix - n n - 0 other -o xxx=YYY -o aaa=BBB baz unix - n n - 0 other +./postconf: warning: ./master.cf: unused parameter: aaa=BBB +./postconf: warning: ./master.cf: unused parameter: xxx=YYY bar/unix/aaa = BBB bar/unix/xxx = YYY +./postconf: warning: ./master.cf: unused parameter: aaa=BBB +./postconf: warning: ./master.cf: unused parameter: xxx=YYY diff -Nru postfix-3.2.5/src/postconf/test42.ref postfix-3.3.0/src/postconf/test42.ref --- postfix-3.2.5/src/postconf/test42.ref 2013-11-26 16:02:24.000000000 +0000 +++ postfix-3.3.0/src/postconf/test42.ref 2018-01-13 22:59:32.000000000 +0000 @@ -3,8 +3,12 @@ -o xxx=yyy -o aaa=bbb baz unix - n n - 0 other +./postconf: warning: ./master.cf: unused parameter: aaa=bbb +./postconf: warning: ./master.cf: unused parameter: xxx=yyy bar/unix/aaa = bbb bar/unix/xxx = yyy +./postconf: warning: ./master.cf: unused parameter: aaa=bbb +./postconf: warning: ./master.cf: unused parameter: xxx=yyy foo unix - n n - 0 other bar unix - n n - 0 other baz unix - n n - 0 other diff -Nru postfix-3.2.5/src/postconf/test43.ref postfix-3.3.0/src/postconf/test43.ref --- postfix-3.2.5/src/postconf/test43.ref 2013-11-26 16:06:30.000000000 +0000 +++ postfix-3.3.0/src/postconf/test43.ref 2018-01-13 22:59:51.000000000 +0000 @@ -3,3 +3,4 @@ -o bb=cc dd baz unix - n n - 0 other +./postconf: warning: ./master.cf: unused parameter: bb=cc diff -Nru postfix-3.2.5/src/postconf/test44.ref postfix-3.3.0/src/postconf/test44.ref --- postfix-3.2.5/src/postconf/test44.ref 2013-11-26 21:05:24.000000000 +0000 +++ postfix-3.3.0/src/postconf/test44.ref 2018-01-13 23:00:01.000000000 +0000 @@ -3,3 +3,4 @@ -o bb=cc dd baz unix - n n - 0 other +./postconf: warning: ./master.cf: unused parameter: bb=cc diff -Nru postfix-3.2.5/src/postconf/test59.ref postfix-3.3.0/src/postconf/test59.ref --- postfix-3.2.5/src/postconf/test59.ref 2014-09-28 14:01:00.000000000 +0000 +++ postfix-3.3.0/src/postconf/test59.ref 2018-01-13 22:58:43.000000000 +0000 @@ -6,3 +6,5 @@ -o {name2=value2a value2b} arg1a arg1b {arg2a arg2b} {arg3a arg3b} baz unix - n n 0 0 other +./postconf: warning: ./master.cf: unused parameter: name1=value1 +./postconf: warning: ./master.cf: unused parameter: name2=value2a value2b diff -Nru postfix-3.2.5/src/postconf/test66.ref postfix-3.3.0/src/postconf/test66.ref --- postfix-3.2.5/src/postconf/test66.ref 1970-01-01 00:00:00.000000000 +0000 +++ postfix-3.3.0/src/postconf/test66.ref 2017-06-18 00:10:39.000000000 +0000 @@ -0,0 +1,5 @@ +./postconf: warning: ldap:PWD/test66.cf: unused parameter: junk=junk +./postconf: warning: mysql:PWD/test66.cf: unused parameter: junk=junk +./postconf: warning: pgsql:PWD/test66.cf: unused parameter: junk=junk +./postconf: warning: sqlite:PWD/test66.cf: unused parameter: junk=junk +./postconf: warning: memcache:PWD/test66.cf: unused parameter: junk=junk diff -Nru postfix-3.2.5/src/postconf/test67.ref postfix-3.3.0/src/postconf/test67.ref --- postfix-3.2.5/src/postconf/test67.ref 1970-01-01 00:00:00.000000000 +0000 +++ postfix-3.3.0/src/postconf/test67.ref 2018-01-13 23:31:24.000000000 +0000 @@ -0,0 +1,10 @@ +smtp inet n - n - - smtpd + -o test1_process_name=smtpd + -o test1_service_name=smtp +smtp unix n - n - - smtp + -o test2_process_name=smtp + -o test2_service_name=smtp +./postconf: warning: ./master.cf: unused parameter: test1_process_name=$process_name +./postconf: warning: ./master.cf: unused parameter: test1_service_name=$service_name +./postconf: warning: ./master.cf: unused parameter: test2_process_name=$process_name +./postconf: warning: ./master.cf: unused parameter: test2_service_name=$service_name diff -Nru postfix-3.2.5/src/postconf/test68.ref postfix-3.3.0/src/postconf/test68.ref --- postfix-3.2.5/src/postconf/test68.ref 1970-01-01 00:00:00.000000000 +0000 +++ postfix-3.3.0/src/postconf/test68.ref 2018-02-19 00:53:11.000000000 +0000 @@ -0,0 +1,5 @@ +./postconf: warning: ldap:PWD/test68.cf: unused parameter: junk=junk +./postconf: warning: mysql:PWD/test68.cf: unused parameter: junk=junk +./postconf: warning: pgsql:PWD/test68.cf: unused parameter: junk=junk +./postconf: warning: sqlite:PWD/test68.cf: unused parameter: junk=junk +./postconf: warning: memcache:PWD/test68.cf: unused parameter: junk=junk diff -Nru postfix-3.2.5/src/postconf/test69.ref postfix-3.3.0/src/postconf/test69.ref --- postfix-3.2.5/src/postconf/test69.ref 1970-01-01 00:00:00.000000000 +0000 +++ postfix-3.3.0/src/postconf/test69.ref 2018-02-19 01:00:46.000000000 +0000 @@ -0,0 +1,2 @@ +./postconf: warning: ldap:/home/wietse/postfix-3.4-20180217/src/postconf/test69.cf: unused parameter: junk=junk +config_directory = . diff -Nru postfix-3.2.5/src/postfix/postfix.c postfix-3.3.0/src/postfix/postfix.c --- postfix-3.2.5/src/postfix/postfix.c 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/src/postfix/postfix.c 2018-02-11 15:17:58.000000000 +0000 @@ -31,6 +31,15 @@ /* .IP \fBstart\fR /* Start the Postfix mail system. This also runs the configuration /* check described above. +/* .IP \fBstart-fg\fR +/* Like \fBstart\fR, but keep the master daemon running in the +/* foreground. This requires that multi-instance support is +/* disabled (i.e. the multi_instance_directories parameter +/* value must be empty). When running Postfix inside a container, +/* mount the container host's /dev/log socket inside the +/* container (example: "docker run -v /dev/log:/dev/log ...") +/* and specify a distinct Postfix "syslog_name" prefix that +/* identifies logging from the Postfix instance. /* .IP \fBstop\fR /* Stop the Postfix mail system in an orderly fashion. If /* possible, running processes are allowed to terminate at @@ -177,8 +186,9 @@ /* .PP /* Other configuration parameters: /* .IP "\fBimport_environment (see 'postconf -d' output)\fR" -/* The list of environment parameters that a Postfix process will -/* import from a non-Postfix parent process. +/* The list of environment parameters that a privileged Postfix +/* process will import from a non-Postfix parent process, or name=value +/* environment overrides. /* .IP "\fBsyslog_facility (mail)\fR" /* The syslog facility of Postfix logging. /* .IP "\fBsyslog_name (see 'postconf -d' output)\fR" diff -Nru postfix-3.2.5/src/postmulti/postmulti.c postfix-3.3.0/src/postmulti/postmulti.c --- postfix-3.2.5/src/postmulti/postmulti.c 2017-05-02 23:29:10.000000000 +0000 +++ postfix-3.3.0/src/postmulti/postmulti.c 2017-02-19 02:22:29.000000000 +0000 @@ -326,8 +326,9 @@ /* .IP "\fBdaemon_directory (see 'postconf -d' output)\fR" /* The directory with Postfix support programs and daemon programs. /* .IP "\fBimport_environment (see 'postconf -d' output)\fR" -/* The list of environment parameters that a Postfix process will -/* import from a non-Postfix parent process. +/* The list of environment parameters that a privileged Postfix +/* process will import from a non-Postfix parent process, or name=value +/* environment overrides. /* .IP "\fBmulti_instance_directories (empty)\fR" /* An optional list of non-default Postfix configuration directories; /* these directories belong to additional Postfix instances that share diff -Nru postfix-3.2.5/src/postqueue/postqueue.c postfix-3.3.0/src/postqueue/postqueue.c --- postfix-3.2.5/src/postqueue/postqueue.c 2017-01-29 20:10:55.000000000 +0000 +++ postfix-3.3.0/src/postqueue/postqueue.c 2018-01-14 14:37:03.000000000 +0000 @@ -163,7 +163,7 @@ /* .IP "\fBalternate_config_directories (empty)\fR" /* A list of non-default Postfix configuration directories that may /* be specified with "-c config_directory" on the command line (in the -/* case of \fBsendmail\fR(1), with "-C config_directory"), or via the MAIL_CONFIG +/* case of \fBsendmail\fR(1), with the "-C" option), or via the MAIL_CONFIG /* environment parameter. /* .IP "\fBconfig_directory (see 'postconf -d' output)\fR" /* The default location of the Postfix main.cf and master.cf @@ -174,8 +174,9 @@ /* Optional list of destinations that are eligible for per-destination /* logfiles with mail that is queued to those destinations. /* .IP "\fBimport_environment (see 'postconf -d' output)\fR" -/* The list of environment parameters that a Postfix process will -/* import from a non-Postfix parent process. +/* The list of environment parameters that a privileged Postfix +/* process will import from a non-Postfix parent process, or name=value +/* environment overrides. /* .IP "\fBqueue_directory (see 'postconf -d' output)\fR" /* The location of the Postfix top-level queue directory. /* .IP "\fBsyslog_facility (mail)\fR" @@ -569,9 +570,9 @@ * Initialize. Set up logging, read the global configuration file and * extract configuration information. Set up signal handlers so that we * can clean up incomplete output. + * Censor the process name: it is provided by the user. */ - if ((slash = strrchr(argv[0], '/')) != 0 && slash[1]) - argv[0] = slash + 1; + argv[0] = "postqueue"; msg_vstream_init(argv[0], VSTREAM_ERR); msg_cleanup(unavailable); msg_syslog_init(mail_task("postqueue"), LOG_PID, LOG_FACILITY); diff -Nru postfix-3.2.5/src/postqueue/showq_compat.c postfix-3.3.0/src/postqueue/showq_compat.c --- postfix-3.2.5/src/postqueue/showq_compat.c 2017-09-23 23:41:03.000000000 +0000 +++ postfix-3.3.0/src/postqueue/showq_compat.c 2017-10-09 16:57:26.000000000 +0000 @@ -36,6 +36,7 @@ #include #include #include +#include /* Utility library. */ @@ -154,7 +155,7 @@ myfree(saved_reason); saved_reason = mystrdup(STR(why)); show_reason = *saved_reason ? saved_reason : "reason unavailable"; - if ((padding = 76 - strlen(show_reason)) < 0) + if ((padding = 76 - (int) strlen(show_reason)) < 0) padding = 0; vstream_printf("%*s(%s)\n", padding, "", show_reason); } @@ -190,7 +191,11 @@ } queue_size += showq_message(showq_stream); file_count++; - vstream_fflush(VSTREAM_OUT); + if (vstream_fflush(VSTREAM_OUT)) { + if (errno != EPIPE) + msg_fatal_status(EX_IOERR, "output write error: %m"); + return; + } } if (showq_status < 0) msg_fatal_status(EX_SOFTWARE, "malformed showq server response"); @@ -205,5 +210,6 @@ queue_size / 1024, file_count, file_count == 1 ? "" : "s"); } - vstream_fflush(VSTREAM_OUT); + if (vstream_fflush(VSTREAM_OUT) && errno != EPIPE) + msg_fatal_status(EX_IOERR, "output write error: %m"); } diff -Nru postfix-3.2.5/src/postqueue/showq_json.c postfix-3.3.0/src/postqueue/showq_json.c --- postfix-3.2.5/src/postqueue/showq_json.c 2016-02-14 15:38:28.000000000 +0000 +++ postfix-3.3.0/src/postqueue/showq_json.c 2017-10-09 16:56:22.000000000 +0000 @@ -34,6 +34,7 @@ #include #include #include +#include /* Utility library. */ @@ -167,7 +168,7 @@ json_quote(quote_buf, STR(addr))); /* - Read zero or more (recipient, reason) pair(s) until attr_scan_more() + * Read zero or more (recipient, reason) pair(s) until attr_scan_more() * consumes a terminator. If the showq daemon messes up, don't try to * resynchronize. */ @@ -192,7 +193,8 @@ if (showq_status < 0) msg_fatal_status(EX_SOFTWARE, "malformed showq server response"); vstream_printf("}\n"); - vstream_fflush(VSTREAM_OUT); + if (vstream_fflush(VSTREAM_OUT) && errno != EPIPE) + msg_fatal_status(EX_IOERR, "output write error: %m"); } /* showq_json - streaming JSON-format output adapter */ @@ -202,10 +204,11 @@ int showq_status; /* - * Emit zero or more queue file objects until attr_scan_more() - * consumes a terminator. + * Emit zero or more queue file objects until attr_scan_more() consumes a + * terminator. */ - while ((showq_status = attr_scan_more(showq_stream)) > 0) { + while ((showq_status = attr_scan_more(showq_stream)) > 0 + && vstream_ferror(VSTREAM_OUT) == 0) { format_json(showq_stream); } if (showq_status < 0) diff -Nru postfix-3.2.5/src/postscreen/postscreen.c postfix-3.3.0/src/postscreen/postscreen.c --- postfix-3.2.5/src/postscreen/postscreen.c 2016-09-17 14:49:09.000000000 +0000 +++ postfix-3.3.0/src/postscreen/postscreen.c 2018-01-14 16:48:25.000000000 +0000 @@ -359,6 +359,10 @@ /* .IP "\fBsyslog_name (see 'postconf -d' output)\fR" /* A prefix that is prepended to the process name in syslog /* records, so that, for example, "smtpd" becomes "prefix/smtpd". +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* SEE ALSO /* smtpd(8), Postfix SMTP server /* tlsproxy(8), Postfix TLS proxy server diff -Nru postfix-3.2.5/src/postscreen/postscreen_haproxy.c postfix-3.3.0/src/postscreen/postscreen_haproxy.c --- postfix-3.2.5/src/postscreen/postscreen_haproxy.c 2014-12-25 16:47:17.000000000 +0000 +++ postfix-3.3.0/src/postscreen/postscreen_haproxy.c 2017-12-27 21:53:13.000000000 +0000 @@ -29,6 +29,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ @@ -133,7 +138,7 @@ /* * Parse the haproxy line. Note: the haproxy_srvr_parse() routine * performs address protocol checks, address and port syntax checks, and - * converts IPv4-in-IPv6 address string syntax (:ffff::1.2.3.4) to IPv4 + * converts IPv4-in-IPv6 address string syntax (::ffff:1.2.3.4) to IPv4 * syntax where permitted by the main.cf:inet_protocols setting. */ if (status == 0 && last_char == '\n') { diff -Nru postfix-3.2.5/src/postscreen/postscreen_misc.c postfix-3.3.0/src/postscreen/postscreen_misc.c --- postfix-3.2.5/src/postscreen/postscreen_misc.c 2016-07-30 19:55:44.000000000 +0000 +++ postfix-3.3.0/src/postscreen/postscreen_misc.c 2017-12-27 22:29:45.000000000 +0000 @@ -43,6 +43,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/postscreen/postscreen_smtpd.c postfix-3.3.0/src/postscreen/postscreen_smtpd.c --- postfix-3.2.5/src/postscreen/postscreen_smtpd.c 2016-07-30 19:55:44.000000000 +0000 +++ postfix-3.3.0/src/postscreen/postscreen_smtpd.c 2017-12-27 22:29:45.000000000 +0000 @@ -130,6 +130,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/postscreen/postscreen_state.c postfix-3.3.0/src/postscreen/postscreen_state.c --- postfix-3.2.5/src/postscreen/postscreen_state.c 2016-07-28 22:24:32.000000000 +0000 +++ postfix-3.3.0/src/postscreen/postscreen_state.c 2017-12-27 22:29:45.000000000 +0000 @@ -116,6 +116,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/postscreen/postscreen_tests.c postfix-3.3.0/src/postscreen/postscreen_tests.c --- postfix-3.2.5/src/postscreen/postscreen_tests.c 2016-07-30 19:59:30.000000000 +0000 +++ postfix-3.3.0/src/postscreen/postscreen_tests.c 2017-12-27 22:29:45.000000000 +0000 @@ -79,6 +79,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/proxymap/proxymap.c postfix-3.3.0/src/proxymap/proxymap.c --- postfix-3.2.5/src/proxymap/proxymap.c 2016-02-14 01:30:38.000000000 +0000 +++ postfix-3.3.0/src/proxymap/proxymap.c 2018-01-14 16:48:25.000000000 +0000 @@ -181,6 +181,10 @@ /* .IP "\fBproxy_write_maps (see 'postconf -d' output)\fR" /* The lookup tables that the \fBproxymap\fR(8) server is allowed to /* access for the read-write service. +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* SEE ALSO /* postconf(5), configuration parameters /* master(5), generic daemon options diff -Nru postfix-3.2.5/src/qmgr/qmgr.c postfix-3.3.0/src/qmgr/qmgr.c --- postfix-3.2.5/src/qmgr/qmgr.c 2016-09-17 14:50:55.000000000 +0000 +++ postfix-3.3.0/src/qmgr/qmgr.c 2018-01-14 16:48:25.000000000 +0000 @@ -184,24 +184,32 @@ /* .IP "\fBdefault_recipient_limit (20000)\fR" /* The default per-transport upper limit on the number of in-memory /* recipients. -/* .IP "\fItransport\fB_recipient_limit ($default_recipient_limit)\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_recipient_limit ($default_recipient_limit)\fR" +/* A transport-specific override for the default_recipient_limit +/* parameter value, where \fItransport\fR is the master.cf name of +/* the message delivery transport. /* .IP "\fBdefault_extra_recipient_limit (1000)\fR" /* The default value for the extra per-transport limit imposed on the /* number of in-memory recipients. -/* .IP "\fItransport\fB_extra_recipient_limit ($default_extra_recipient_limit)\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_extra_recipient_limit ($default_extra_recipient_limit)\fR" +/* A transport-specific override for the default_extra_recipient_limit +/* parameter value, where \fItransport\fR is the master.cf name of +/* the message delivery transport. /* .PP /* Available in Postfix version 2.4 and later: /* .IP "\fBdefault_recipient_refill_limit (100)\fR" /* The default per-transport limit on the number of recipients refilled at /* once. -/* .IP "\fItransport\fB_recipient_refill_limit ($default_recipient_refill_limit)\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_recipient_refill_limit ($default_recipient_refill_limit)\fR" +/* A transport-specific override for the default_recipient_refill_limit +/* parameter value, where \fItransport\fR is the master.cf name of +/* the message delivery transport. /* .IP "\fBdefault_recipient_refill_delay (5s)\fR" /* The default per-transport maximum delay between recipients refills. -/* .IP "\fItransport\fB_recipient_refill_delay ($default_recipient_refill_delay)\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_recipient_refill_delay ($default_recipient_refill_delay)\fR" +/* A transport-specific override for the default_recipient_refill_delay +/* parameter value, where \fItransport\fR is the master.cf name of +/* the message delivery transport. /* DELIVERY CONCURRENCY CONTROLS /* .ad /* .fi @@ -211,31 +219,44 @@ /* .IP "\fBdefault_destination_concurrency_limit (20)\fR" /* The default maximal number of parallel deliveries to the same /* destination. -/* .IP "\fItransport\fB_destination_concurrency_limit ($default_destination_concurrency_limit)\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_destination_concurrency_limit ($default_destination_concurrency_limit)\fR" +/* A transport-specific override for the +/* default_destination_concurrency_limit parameter value, where +/* \fItransport\fR is the master.cf name of the message delivery +/* transport. /* .PP /* Available in Postfix version 2.5 and later: -/* .IP "\fItransport\fB_initial_destination_concurrency ($initial_destination_concurrency)\fR" -/* Initial concurrency for delivery via the named message -/* \fItransport\fR. +/* .IP "\fBtransport_initial_destination_concurrency ($initial_destination_concurrency)\fR" +/* A transport-specific override for the initial_destination_concurrency +/* parameter value, where \fItransport\fR is the master.cf name of +/* the message delivery transport. /* .IP "\fBdefault_destination_concurrency_failed_cohort_limit (1)\fR" /* How many pseudo-cohorts must suffer connection or handshake /* failure before a specific destination is considered unavailable /* (and further delivery is suspended). -/* .IP "\fItransport\fB_destination_concurrency_failed_cohort_limit ($default_destination_concurrency_failed_cohort_limit)\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_destination_concurrency_failed_cohort_limit ($default_destination_concurrency_failed_cohort_limit)\fR" +/* A transport-specific override for the +/* default_destination_concurrency_failed_cohort_limit parameter value, +/* where \fItransport\fR is the master.cf name of the message delivery +/* transport. /* .IP "\fBdefault_destination_concurrency_negative_feedback (1)\fR" /* The per-destination amount of delivery concurrency negative /* feedback, after a delivery completes with a connection or handshake /* failure. -/* .IP "\fItransport\fB_destination_concurrency_negative_feedback ($default_destination_concurrency_negative_feedback)\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_destination_concurrency_negative_feedback ($default_destination_concurrency_negative_feedback)\fR" +/* A transport-specific override for the +/* default_destination_concurrency_negative_feedback parameter value, +/* where \fItransport\fR is the master.cf name of the message delivery +/* transport. /* .IP "\fBdefault_destination_concurrency_positive_feedback (1)\fR" /* The per-destination amount of delivery concurrency positive /* feedback, after a delivery completes without connection or handshake /* failure. -/* .IP "\fItransport\fB_destination_concurrency_positive_feedback ($default_destination_concurrency_positive_feedback)\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_destination_concurrency_positive_feedback ($default_destination_concurrency_positive_feedback)\fR" +/* A transport-specific override for the +/* default_destination_concurrency_positive_feedback parameter value, +/* where \fItransport\fR is the master.cf name of the message delivery +/* transport. /* .IP "\fBdestination_concurrency_feedback_debug (no)\fR" /* Make the queue manager's feedback algorithm verbose for performance /* analysis purposes. @@ -244,31 +265,42 @@ /* .fi /* .IP "\fBdefault_destination_recipient_limit (50)\fR" /* The default maximal number of recipients per message delivery. -/* .IP "\fItransport\fB_destination_recipient_limit ($default_destination_recipient_limit)\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_destination_recipient_limit ($default_destination_recipient_limit)\fR" +/* A transport-specific override for the +/* default_destination_recipient_limit parameter value, where +/* \fItransport\fR is the master.cf name of the message delivery +/* transport. /* MESSAGE SCHEDULING CONTROLS /* .ad /* .fi /* .IP "\fBdefault_delivery_slot_cost (5)\fR" /* How often the Postfix queue manager's scheduler is allowed to /* preempt delivery of one message with another. -/* .IP "\fItransport\fB_delivery_slot_cost ($default_delivery_slot_cost)\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_delivery_slot_cost ($default_delivery_slot_cost)\fR" +/* A transport-specific override for the default_delivery_slot_cost +/* parameter value, where \fItransport\fR is the master.cf name of +/* the message delivery transport. /* .IP "\fBdefault_minimum_delivery_slots (3)\fR" /* How many recipients a message must have in order to invoke the /* Postfix queue manager's scheduling algorithm at all. -/* .IP "\fItransport\fB_minimum_delivery_slots ($default_minimum_delivery_slots)\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_minimum_delivery_slots ($default_minimum_delivery_slots)\fR" +/* A transport-specific override for the default_minimum_delivery_slots +/* parameter value, where \fItransport\fR is the master.cf name of +/* the message delivery transport. /* .IP "\fBdefault_delivery_slot_discount (50)\fR" /* The default value for transport-specific _delivery_slot_discount /* settings. -/* .IP "\fItransport\fB_delivery_slot_discount ($default_delivery_slot_discount)\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_delivery_slot_discount ($default_delivery_slot_discount)\fR" +/* A transport-specific override for the default_delivery_slot_discount +/* parameter value, where \fItransport\fR is the master.cf name of +/* the message delivery transport. /* .IP "\fBdefault_delivery_slot_loan (3)\fR" /* The default value for transport-specific _delivery_slot_loan /* settings. -/* .IP "\fItransport\fB_delivery_slot_loan ($default_delivery_slot_loan)\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_delivery_slot_loan ($default_delivery_slot_loan)\fR" +/* A transport-specific override for the default_delivery_slot_loan +/* parameter value, where \fItransport\fR is the master.cf name of +/* the message delivery transport. /* OTHER RESOURCE AND RATE CONTROLS /* .ad /* .fi @@ -299,16 +331,20 @@ /* The default amount of delay that is inserted between individual /* deliveries to the same destination; the resulting behavior depends /* on the value of the corresponding per-destination recipient limit. -/* .IP "\fItransport\fB_destination_rate_delay $default_destination_rate_delay\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_destination_rate_delay ($default_destination_rate_delay)\fR" +/* A transport-specific override for the default_destination_rate_delay +/* parameter value, where \fItransport\fR is the master.cf name of +/* the message delivery transport. /* .PP /* Available in Postfix version 3.1 and later: /* .IP "\fBdefault_transport_rate_delay (0s)\fR" /* The default amount of delay that is inserted between individual /* deliveries over the same message delivery transport, regardless of /* destination. -/* .IP "\fItransport\fB_transport_rate_delay $default_transport_rate_delay\fR" -/* Idem, for delivery via the named message \fItransport\fR. +/* .IP "\fBtransport_transport_rate_delay ($default_transport_rate_delay)\fR" +/* A transport-specific override for the default_transport_rate_delay +/* parameter value, where the initial \fItransport\fR in the parameter +/* name is the master.cf name of the message delivery transport. /* SAFETY CONTROLS /* .ad /* .fi @@ -354,6 +390,10 @@ /* .IP "\fBconfirm_delay_cleared (no)\fR" /* After sending a "your message is delayed" notification, inform /* the sender when the delay clears up. +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* FILES /* /var/spool/postfix/incoming, incoming queue /* /var/spool/postfix/active, active queue diff -Nru postfix-3.2.5/src/qmgr/qmgr.h postfix-3.3.0/src/qmgr/qmgr.h --- postfix-3.2.5/src/qmgr/qmgr.h 2015-12-27 21:30:56.000000000 +0000 +++ postfix-3.3.0/src/qmgr/qmgr.h 2017-12-27 22:29:45.000000000 +0000 @@ -533,6 +533,11 @@ /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA /* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA +/* /* Preemptive scheduler enhancements: /* Patrik Rak /* Modra 6 diff -Nru postfix-3.2.5/src/qmgr/qmgr_message.c postfix-3.3.0/src/qmgr/qmgr_message.c --- postfix-3.2.5/src/qmgr/qmgr_message.c 2017-01-09 23:01:25.000000000 +0000 +++ postfix-3.3.0/src/qmgr/qmgr_message.c 2017-12-27 21:53:13.000000000 +0000 @@ -93,6 +93,11 @@ /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA /* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA +/* /* Preemptive scheduler enhancements: /* Patrik Rak /* Modra 6 @@ -641,17 +646,18 @@ continue; } if (rec_type == REC_TYPE_DSN_ENVID) { - if (message->dsn_envid == 0) - message->dsn_envid = mystrdup(start); + /* Allow Milter override. */ + if (message->dsn_envid != 0) + myfree(message->dsn_envid); + message->dsn_envid = mystrdup(start); } if (rec_type == REC_TYPE_DSN_RET) { - if (message->dsn_ret == 0) { - if (!alldig(start) || (n = atoi(start)) == 0 || !DSN_RET_OK(n)) - msg_warn("%s: ignoring malformed DSN RET flags in queue file record:%.100s", - message->queue_id, start); - else - message->dsn_ret = n; - } + /* Allow Milter override. */ + if (!alldig(start) || (n = atoi(start)) == 0 || !DSN_RET_OK(n)) + msg_warn("%s: ignoring malformed DSN RET flags in queue file record:%.100s", + message->queue_id, start); + else + message->dsn_ret = n; } if (rec_type == REC_TYPE_ATTR) { /* Allow extra segment to override envelope segment info. */ diff -Nru postfix-3.2.5/src/qmqpd/qmqpd.c postfix-3.3.0/src/qmqpd/qmqpd.c --- postfix-3.2.5/src/qmqpd/qmqpd.c 2016-11-05 12:01:03.000000000 +0000 +++ postfix-3.3.0/src/qmqpd/qmqpd.c 2018-01-14 16:48:25.000000000 +0000 @@ -138,6 +138,10 @@ /* .IP "\fBqmqpd_client_port_logging (no)\fR" /* Enable logging of the remote QMQP client port in addition to /* the hostname and IP address. +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* SEE ALSO /* http://cr.yp.to/proto/qmqp.html, QMQP protocol /* cleanup(8), message canonicalization diff -Nru postfix-3.2.5/src/scache/scache.c postfix-3.3.0/src/scache/scache.c --- postfix-3.2.5/src/scache/scache.c 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/src/scache/scache.c 2018-01-14 16:48:25.000000000 +0000 @@ -113,6 +113,10 @@ /* .IP "\fBsyslog_name (see 'postconf -d' output)\fR" /* A prefix that is prepended to the process name in syslog /* records, so that, for example, "smtpd" becomes "prefix/smtpd". +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* SEE ALSO /* smtp(8), SMTP client /* postconf(5), configuration parameters diff -Nru postfix-3.2.5/src/sendmail/sendmail.c postfix-3.3.0/src/sendmail/sendmail.c --- postfix-3.2.5/src/sendmail/sendmail.c 2017-10-24 14:35:52.000000000 +0000 +++ postfix-3.3.0/src/sendmail/sendmail.c 2017-10-28 12:13:42.000000000 +0000 @@ -388,7 +388,7 @@ /* .IP "\fBalternate_config_directories (empty)\fR" /* A list of non-default Postfix configuration directories that may /* be specified with "-c config_directory" on the command line (in the -/* case of \fBsendmail\fR(1), with "-C config_directory"), or via the MAIL_CONFIG +/* case of \fBsendmail\fR(1), with the "-C" option), or via the MAIL_CONFIG /* environment parameter. /* .IP "\fBmulti_instance_directories (empty)\fR" /* An optional list of non-default Postfix configuration directories; diff -Nru postfix-3.2.5/src/showq/showq.c postfix-3.3.0/src/showq/showq.c --- postfix-3.2.5/src/showq/showq.c 2016-09-17 14:50:55.000000000 +0000 +++ postfix-3.3.0/src/showq/showq.c 2018-01-14 16:48:25.000000000 +0000 @@ -72,6 +72,10 @@ /* Available in Postfix version 2.9 and later: /* .IP "\fBenable_long_queue_ids (no)\fR" /* Enable long, non-repeating, queue IDs (queue file names). +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* FILES /* /var/spool/postfix, queue directories /* SEE ALSO diff -Nru postfix-3.2.5/src/smtp/lmtp_params.c postfix-3.3.0/src/smtp/lmtp_params.c --- postfix-3.2.5/src/smtp/lmtp_params.c 2016-10-08 13:44:25.000000000 +0000 +++ postfix-3.3.0/src/smtp/lmtp_params.c 2017-12-27 21:53:13.000000000 +0000 @@ -121,5 +121,6 @@ VAR_LMTP_ASSUME_FINAL, DEF_LMTP_ASSUME_FINAL, &var_lmtp_assume_final, VAR_LMTP_REC_DEADLINE, DEF_LMTP_REC_DEADLINE, &var_smtp_rec_deadline, VAR_LMTP_DUMMY_MAIL_AUTH, DEF_LMTP_DUMMY_MAIL_AUTH, &var_smtp_dummy_mail_auth, + VAR_LMTP_BALANCE_INET_PROTO, DEF_LMTP_BALANCE_INET_PROTO, &var_smtp_balance_inet_proto, 0, }; diff -Nru postfix-3.2.5/src/smtp/smtp_addr.c postfix-3.3.0/src/smtp/smtp_addr.c --- postfix-3.2.5/src/smtp/smtp_addr.c 2016-01-03 14:49:51.000000000 +0000 +++ postfix-3.3.0/src/smtp/smtp_addr.c 2017-12-27 21:53:13.000000000 +0000 @@ -61,6 +61,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ @@ -354,6 +359,122 @@ return (addr_list); } +/* smtp_balance_inet_proto - balance IPv4/6 protocols within address limit */ + +static DNS_RR *smtp_balance_inet_proto(DNS_RR *addr_list, int misc_flags, + int addr_limit) +{ + const char myname[] = "smtp_balance_inet_proto"; + DNS_RR *rr; + DNS_RR *stripped_list; + DNS_RR *next; + int v6_count; + int v4_count; + int v6_target, + v4_target; + int *p; + + /* + * Precondition: the input is sorted by MX preference (not necessarily IP + * address family preference), and addresses with the same or worse + * preference than 'myself' have been eliminated. Postcondition: the + * relative list order is unchanged, but some elements are removed. + */ + + /* + * Count the number of IPv6 and IPv4 addresses. + */ + for (v4_count = v6_count = 0, rr = addr_list; rr != 0; rr = rr->next) { + if (rr->type == T_A) { + v4_count++; + } else if (rr->type == T_AAAA) { + v6_count++; + } else { + msg_panic("%s: unexpected record type: %s", + myname, dns_strtype(rr->type)); + } + } + + /* + * Ensure that one address type will not out-crowd the other, while + * enforcing the address count limit. This works around a current problem + * where some destination announces primarily IPv6 MX addresses, the + * smtp_address_limit eliminates most or all IPv4 addresses, and the + * destination is not reachable over IPv6. + * + * Maybe: do all smtp_mx_address_limit enforcement here, and remove + * pre-existing enforcement elsewhere. That would obsolete the + * smtp_balance_inet_protocols configuration parameter. + */ + if (v4_count > 0 && v6_count > 0 && v4_count + v6_count > addr_limit) { + + /*- + * Decide how many IPv6 and IPv4 addresses to keep. The code below + * has three branches, corresponding to the regions R1, R2 and R3 + * in the figure. + * + * L = addr_limit + * X = excluded by condition (v4_count + v6_count > addr_limit) + * + * v4_count + * ^ + * | + * L \ R1 + * |X\ | + * |XXX\ | + * |XXXXX\ | R2 + * L/2 +-------\------- + * |XXXXXXX|X\ + * |XXXXXXX|XXX\ R3 + * |XXXXXXX|XXXXX\ + * 0 +-------+-------\--> v6_count + * 0 L/2 L + */ + if (v6_count <= addr_limit / 2) { /* Region R1 */ + v6_target = v6_count; + v4_target = addr_limit - v6_target; + } else if (v4_count <= addr_limit / 2) {/* Region R3 */ + v4_target = v4_count; + v6_target = addr_limit - v4_target; + } else { /* Region R2 */ + /* v4_count > addr_limit / 2 && v6_count > addr_limit / 2 */ + v4_target = (addr_limit + (addr_list->type == T_A)) / 2; + v6_target = addr_limit - v4_target; + } + if (msg_verbose) + msg_info("v6_target=%d, v4_target=%d", v6_target, v4_target); + + /* Enforce the address count targets. */ + stripped_list = 0; + for (rr = addr_list; rr != 0; rr = next) { + next = rr->next; + rr->next = 0; + if (rr->type == T_A) { + p = &v4_target; + } else if (rr->type == T_AAAA) { + p = &v6_target; + } else { + msg_panic("%s: unexpected record type: %s", + myname, dns_strtype(rr->type)); + } + if (*p > 0) { + stripped_list = dns_rr_append(stripped_list, rr); + *p -= 1; + } else { + dns_rr_free(rr); + } + } + if (v4_target > 0 || v6_target > 0) + msg_panic("%s: bad target count: v4_target=%d, v6_target=%d", + myname, v4_target, v6_target); + if (msg_verbose) + smtp_print_addr("smtp_balance_inet_proto result", stripped_list); + return (stripped_list); + } else { + return (addr_list); + } +} + /* smtp_domain_addr - mail exchanger address lookup */ DNS_RR *smtp_domain_addr(const char *name, DNS_RR **mxrr, int misc_flags, @@ -498,9 +619,13 @@ ((flags) & SMTP_MISC_FLAG_PREF_IPV4) ? dns_rr_compare_pref_ipv4 : \ dns_rr_compare_pref_any) - if (addr_list && addr_list->next && var_smtp_rand_addr) { - addr_list = dns_rr_shuffle(addr_list); + if (addr_list && addr_list->next) { + if (var_smtp_rand_addr) + addr_list = dns_rr_shuffle(addr_list); addr_list = dns_rr_sort(addr_list, SMTP_COMPARE_ADDR(misc_flags)); + if (var_smtp_balance_inet_proto) + addr_list = smtp_balance_inet_proto(addr_list, misc_flags, + var_smtp_mxaddr_limit); } break; case DNS_NOTFOUND: @@ -558,6 +683,9 @@ /* The following changes the order of equal-preference hosts. */ if (inet_proto_info()->ai_family_list[1] != 0) addr_list = dns_rr_sort(addr_list, SMTP_COMPARE_ADDR(misc_flags)); + if (var_smtp_balance_inet_proto) + addr_list = smtp_balance_inet_proto(addr_list, misc_flags, + var_smtp_mxaddr_limit); } if (msg_verbose) smtp_print_addr(host, addr_list); diff -Nru postfix-3.2.5/src/smtp/smtp.c postfix-3.3.0/src/smtp/smtp.c --- postfix-3.2.5/src/smtp/smtp.c 2016-12-04 19:50:52.000000000 +0000 +++ postfix-3.3.0/src/smtp/smtp.c 2018-01-14 16:48:25.000000000 +0000 @@ -263,6 +263,12 @@ /* deliveries. /* .IP "\fBsmtp_dns_reply_filter (empty)\fR" /* Optional filter for Postfix SMTP client DNS lookup results. +/* .PP +/* Available in Postfix version 3.3 and later: +/* .IP "\fBsmtp_balance_inet_protocols (yes)\fR" +/* When a remote destination resolves to a combination of IPv4 and +/* IPv6 addresses, ensure that the Postfix SMTP client can try both +/* address types before it runs into the smtp_mx_address_limit. /* MIME PROCESSING CONTROLS /* .ad /* .fi @@ -497,12 +503,6 @@ /* RESOURCE AND RATE CONTROLS /* .ad /* .fi -/* .IP "\fBsmtp_destination_concurrency_limit ($default_destination_concurrency_limit)\fR" -/* The maximal number of parallel deliveries to the same destination -/* via the smtp message delivery transport. -/* .IP "\fBsmtp_destination_recipient_limit ($default_destination_recipient_limit)\fR" -/* The maximal number of recipients per message for the smtp -/* message delivery transport. /* .IP "\fBsmtp_connect_timeout (30s)\fR" /* The Postfix SMTP client time limit for completing a TCP connection, or /* zero (use the operating system built-in time limit). @@ -583,6 +583,18 @@ /* When SMTP connection caching is enabled, the number of times /* that an SMTP session may be reused before it is closed, or zero (no /* limit). +/* .PP +/* Implemented in the qmgr(8) daemon: +/* .IP "\fBtransport_destination_concurrency_limit ($default_destination_concurrency_limit)\fR" +/* A transport-specific override for the +/* default_destination_concurrency_limit parameter value, where +/* \fItransport\fR is the master.cf name of the message delivery +/* transport. +/* .IP "\fBtransport_destination_recipient_limit ($default_destination_recipient_limit)\fR" +/* A transport-specific override for the +/* default_destination_recipient_limit parameter value, where +/* \fItransport\fR is the master.cf name of the message delivery +/* transport. /* SMTPUTF8 CONTROLS /* .ad /* .fi @@ -713,6 +725,10 @@ /* Available with Postfix 3.2 and later: /* .IP "\fBsmtp_tcp_port (smtp)\fR" /* The default TCP port that the Postfix SMTP client connects to. +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* SEE ALSO /* generic(5), output address rewriting /* header_checks(5), message header content inspection @@ -934,6 +950,7 @@ bool var_smtp_dummy_mail_auth; char *var_smtp_dsn_filter; char *var_smtp_dns_re_filter; +bool var_smtp_balance_inet_proto; /* Special handling of 535 AUTH errors. */ char *var_smtp_sasl_auth_cache_name; diff -Nru postfix-3.2.5/src/smtp/smtp_connect.c postfix-3.3.0/src/smtp/smtp_connect.c --- postfix-3.2.5/src/smtp/smtp_connect.c 2016-10-08 13:36:04.000000000 +0000 +++ postfix-3.3.0/src/smtp/smtp_connect.c 2017-12-27 22:29:45.000000000 +0000 @@ -47,6 +47,11 @@ /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA /* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA +/* /* Connection caching in cooperation with: /* Victor Duchovni /* Morgan Stanley diff -Nru postfix-3.2.5/src/smtp/smtp.h postfix-3.3.0/src/smtp/smtp.h --- postfix-3.2.5/src/smtp/smtp.h 2017-02-19 01:58:20.000000000 +0000 +++ postfix-3.3.0/src/smtp/smtp.h 2017-12-27 22:29:45.000000000 +0000 @@ -681,6 +681,11 @@ /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA /* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA +/* /* TLS support originally by: /* Lutz Jaenicke /* BTU Cottbus diff -Nru postfix-3.2.5/src/smtp/smtp_map11.c postfix-3.3.0/src/smtp/smtp_map11.c --- postfix-3.2.5/src/smtp/smtp_map11.c 2017-01-29 15:49:22.000000000 +0000 +++ postfix-3.3.0/src/smtp/smtp_map11.c 2017-12-27 22:29:45.000000000 +0000 @@ -49,6 +49,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/smtp/smtp_params.c postfix-3.3.0/src/smtp/smtp_params.c --- postfix-3.2.5/src/smtp/smtp_params.c 2016-10-08 13:36:04.000000000 +0000 +++ postfix-3.3.0/src/smtp/smtp_params.c 2017-12-27 21:53:13.000000000 +0000 @@ -125,5 +125,6 @@ VAR_LMTP_ASSUME_FINAL, DEF_LMTP_ASSUME_FINAL, &var_lmtp_assume_final, VAR_SMTP_REC_DEADLINE, DEF_SMTP_REC_DEADLINE, &var_smtp_rec_deadline, VAR_SMTP_DUMMY_MAIL_AUTH, DEF_SMTP_DUMMY_MAIL_AUTH, &var_smtp_dummy_mail_auth, + VAR_SMTP_BALANCE_INET_PROTO, DEF_SMTP_BALANCE_INET_PROTO, &var_smtp_balance_inet_proto, 0, }; diff -Nru postfix-3.2.5/src/smtp/smtp_proto.c postfix-3.3.0/src/smtp/smtp_proto.c --- postfix-3.2.5/src/smtp/smtp_proto.c 2017-01-09 23:10:07.000000000 +0000 +++ postfix-3.3.0/src/smtp/smtp_proto.c 2017-12-27 21:53:13.000000000 +0000 @@ -73,6 +73,11 @@ /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA /* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA +/* /* Pipelining code in cooperation with: /* Jon Ribbens /* Oaktree Internet Solutions Ltd., @@ -403,6 +408,10 @@ pix_bug_mask = name_mask_opt(pix_bug_source, pix_bug_table, pix_bug_words, NAME_MASK_ANY_CASE | NAME_MASK_IGNORE); + if ((pix_bug_mask & SMTP_FEATURE_PIX_DELAY_DOTCRLF) + && request->msg_stats.incoming_arrival.tv_sec + > vstream_ftime(state->session->stream) - var_smtp_pix_thresh) + pix_bug_mask &= ~SMTP_FEATURE_PIX_DELAY_DOTCRLF; msg_info("%s: enabling PIX workarounds: %s for %s", request->queue_id, str_name_mask("pix workaround bitmask", @@ -2147,9 +2156,7 @@ } } else if (prev_type == REC_TYPE_CONT) /* missing newline */ smtp_fputs("", 0, session->stream); - if ((session->features & SMTP_FEATURE_PIX_DELAY_DOTCRLF) != 0 - && request->msg_stats.incoming_arrival.tv_sec - <= vstream_ftime(session->stream) - var_smtp_pix_thresh) { + if (session->features & SMTP_FEATURE_PIX_DELAY_DOTCRLF) { smtp_flush(session->stream);/* hurts performance */ sleep(var_smtp_pix_delay); /* not to mention this */ } diff -Nru postfix-3.2.5/src/smtp/smtp_trouble.c postfix-3.3.0/src/smtp/smtp_trouble.c --- postfix-3.2.5/src/smtp/smtp_trouble.c 2015-11-25 01:18:17.000000000 +0000 +++ postfix-3.3.0/src/smtp/smtp_trouble.c 2017-12-27 22:29:45.000000000 +0000 @@ -144,6 +144,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/smtpd/smtpd.c postfix-3.3.0/src/smtpd/smtpd.c --- postfix-3.2.5/src/smtpd/smtpd.c 2017-04-03 21:58:06.000000000 +0000 +++ postfix-3.3.0/src/smtpd/smtpd.c 2018-01-14 16:48:25.000000000 +0000 @@ -1052,6 +1052,10 @@ /* .IP "\fBsmtpd_client_port_logging (no)\fR" /* Enable logging of the remote SMTP client port in addition to /* the hostname and IP address. +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* SEE ALSO /* anvil(8), connection/rate limiting /* cleanup(8), message canonicalization @@ -4835,7 +4839,7 @@ static SMTPD_CMD smtpd_cmd_table[] = { {SMTPD_CMD_HELO, helo_cmd, SMTPD_CMD_FLAG_LIMIT | SMTPD_CMD_FLAG_PRE_TLS | SMTPD_CMD_FLAG_LAST,}, {SMTPD_CMD_EHLO, ehlo_cmd, SMTPD_CMD_FLAG_LIMIT | SMTPD_CMD_FLAG_PRE_TLS | SMTPD_CMD_FLAG_LAST,}, - {SMTPD_CMD_XCLIENT, xclient_cmd,}, + {SMTPD_CMD_XCLIENT, xclient_cmd, SMTPD_CMD_FLAG_PRE_TLS}, {SMTPD_CMD_XFORWARD, xforward_cmd,}, #ifdef USE_TLS {SMTPD_CMD_STARTTLS, starttls_cmd, SMTPD_CMD_FLAG_PRE_TLS,}, diff -Nru postfix-3.2.5/src/smtpd/smtpd_check.c postfix-3.3.0/src/smtpd/smtpd_check.c --- postfix-3.2.5/src/smtpd/smtpd_check.c 2017-12-21 01:27:51.000000000 +0000 +++ postfix-3.3.0/src/smtpd/smtpd_check.c 2018-01-06 23:12:51.000000000 +0000 @@ -335,6 +335,7 @@ static ARGV *helo_restrctions; static ARGV *mail_restrctions; static ARGV *relay_restrctions; +static ARGV *fake_relay_restrctions; static ARGV *rcpt_restrctions; static ARGV *etrn_restrctions; static ARGV *data_restrctions; @@ -845,6 +846,9 @@ var_mail_checks); relay_restrctions = smtpd_check_parse(SMTPD_CHECK_PARSE_ALL, var_relay_checks); + if (warn_compat_break_relay_restrictions) + fake_relay_restrctions = smtpd_check_parse(SMTPD_CHECK_PARSE_ALL, + FAKE_RELAY_CHECKS); rcpt_restrctions = smtpd_check_parse(SMTPD_CHECK_PARSE_ALL, var_rcpt_checks); etrn_restrctions = smtpd_check_parse(SMTPD_CHECK_PARSE_ALL, @@ -4958,15 +4962,31 @@ * Apply restrictions in the order as specified. We allow relay * restrictions to be empty, for sites that require backwards * compatibility. + * + * If compatibility_level < 1 and smtpd_relay_restrictions is left at its + * default value, find out if the new smtpd_relay_restrictions default + * value would block the request, without logging REJECT messages. + * Approach: evaluate fake relay restrictions (permit_mynetworks, + * permit_sasl_authenticated, permit_auth_destination) and log a warning + * if the result is DUNNO instead of OK, i.e. a reject_unauth_destinatin + * at the end would have blocked the request. */ SMTPD_CHECK_RESET(); - restrctions[0] = relay_restrctions; - restrctions[1] = rcpt_restrctions; + restrctions[0] = rcpt_restrctions; + restrctions[1] = warn_compat_break_relay_restrictions ? + fake_relay_restrctions : relay_restrctions; for (n = 0; n < 2; n++) { status = setjmp(smtpd_check_buf); if (status == 0 && restrctions[n]->argc) status = generic_checks(state, restrctions[n], recipient, SMTPD_NAME_RECIPIENT, CHECK_RECIP_ACL); + if (n == 1 && warn_compat_break_relay_restrictions + && status == SMTPD_CHECK_DUNNO) { + msg_info("using backwards-compatible default setting \"" + VAR_RELAY_CHECKS " = (empty)\" to avoid \"Relay " + "access denied\" error for recipient \"%s\" from " + "client \"%s\"", state->recipient, state->namaddr); + } if (status == SMTPD_CHECK_REJECT) break; } diff -Nru postfix-3.2.5/src/smtpd/smtpd_check.h postfix-3.3.0/src/smtpd/smtpd_check.h --- postfix-3.2.5/src/smtpd/smtpd_check.h 2016-06-19 19:17:12.000000000 +0000 +++ postfix-3.3.0/src/smtpd/smtpd_check.h 2017-12-27 22:29:45.000000000 +0000 @@ -35,4 +35,9 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ diff -Nru postfix-3.2.5/src/smtpd/smtpd_haproxy.c postfix-3.3.0/src/smtpd/smtpd_haproxy.c --- postfix-3.2.5/src/smtpd/smtpd_haproxy.c 2016-06-11 23:31:15.000000000 +0000 +++ postfix-3.3.0/src/smtpd/smtpd_haproxy.c 2017-07-04 20:38:59.000000000 +0000 @@ -111,7 +111,7 @@ /* * Note: the haproxy_srvr_parse() routine performs address protocol * checks, address and port syntax checks, and converts IPv4-in-IPv6 - * address string syntax (:ffff::1.2.3.4) to IPv4 syntax where permitted + * address string syntax (::ffff:1.2.3.4) to IPv4 syntax where permitted * by the main.cf:inet_protocols setting, but logs no warnings. */ #define ENABLE_DEADLINE 1 diff -Nru postfix-3.2.5/src/smtpd/smtpd_resolve.c postfix-3.3.0/src/smtpd/smtpd_resolve.c --- postfix-3.2.5/src/smtpd/smtpd_resolve.c 2016-06-19 19:46:09.000000000 +0000 +++ postfix-3.3.0/src/smtpd/smtpd_resolve.c 2017-12-27 22:29:45.000000000 +0000 @@ -46,6 +46,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/smtpd/smtpd_resolve.h postfix-3.3.0/src/smtpd/smtpd_resolve.h --- postfix-3.2.5/src/smtpd/smtpd_resolve.h 2016-06-19 19:20:45.000000000 +0000 +++ postfix-3.3.0/src/smtpd/smtpd_resolve.h 2017-12-27 22:29:45.000000000 +0000 @@ -29,6 +29,11 @@ /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA /* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA +/* /* TLS support originally by: /* Lutz Jaenicke /* BTU Cottbus diff -Nru postfix-3.2.5/src/smtpd/smtpd_sasl_proto.c postfix-3.3.0/src/smtpd/smtpd_sasl_proto.c --- postfix-3.2.5/src/smtpd/smtpd_sasl_proto.c 2016-10-22 22:21:44.000000000 +0000 +++ postfix-3.3.0/src/smtpd/smtpd_sasl_proto.c 2017-12-27 22:29:45.000000000 +0000 @@ -99,6 +99,11 @@ /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA /* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA +/* /* TLS support originally by: /* Lutz Jaenicke /* BTU Cottbus diff -Nru postfix-3.2.5/src/smtpd/smtpd_state.c postfix-3.3.0/src/smtpd/smtpd_state.c --- postfix-3.2.5/src/smtpd/smtpd_state.c 2016-10-22 21:55:48.000000000 +0000 +++ postfix-3.3.0/src/smtpd/smtpd_state.c 2017-12-27 22:29:45.000000000 +0000 @@ -35,6 +35,11 @@ /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA /* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA +/* /* TLS support originally by: /* Lutz Jaenicke /* BTU Cottbus diff -Nru postfix-3.2.5/src/spawn/spawn.c postfix-3.3.0/src/spawn/spawn.c --- postfix-3.2.5/src/spawn/spawn.c 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/src/spawn/spawn.c 2018-01-14 16:48:25.000000000 +0000 @@ -66,13 +66,10 @@ /* RESOURCE AND RATE CONTROL /* .ad /* .fi -/* .IP "\fItransport\fB_time_limit ($command_time_limit)\fR" -/* The amount of time the command is allowed to run before it is -/* terminated. -/* -/* Postfix 2.4 and later support a suffix that specifies the -/* time unit: s (seconds), m (minutes), h (hours), d (days), -/* w (weeks). The default time unit is seconds. +/* .IP "\fBtransport_time_limit ($command_time_limit)\fR" +/* A transport-specific override for the command_time_limit parameter +/* value, where \fItransport\fR is the master.cf name of the message +/* delivery transport. /* MISCELLANEOUS /* .ad /* .fi @@ -108,6 +105,10 @@ /* .IP "\fBsyslog_name (see 'postconf -d' output)\fR" /* A prefix that is prepended to the process name in syslog /* records, so that, for example, "smtpd" becomes "prefix/smtpd". +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* SEE ALSO /* postconf(5), configuration parameters /* master(8), process manager diff -Nru postfix-3.2.5/src/tls/tls_dane.c postfix-3.3.0/src/tls/tls_dane.c --- postfix-3.2.5/src/tls/tls_dane.c 2017-10-09 15:06:02.000000000 +0000 +++ postfix-3.3.0/src/tls/tls_dane.c 2017-12-27 21:53:13.000000000 +0000 @@ -154,6 +154,11 @@ /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA /* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA +/* /* Viktor Dukhovni /*--*/ diff -Nru postfix-3.2.5/src/tlsmgr/tlsmgr.c postfix-3.3.0/src/tlsmgr/tlsmgr.c --- postfix-3.2.5/src/tlsmgr/tlsmgr.c 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/src/tlsmgr/tlsmgr.c 2018-01-14 16:48:25.000000000 +0000 @@ -132,6 +132,10 @@ /* .IP "\fBsyslog_name (see 'postconf -d' output)\fR" /* A prefix that is prepended to the process name in syslog /* records, so that, for example, "smtpd" becomes "prefix/smtpd". +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* SEE ALSO /* smtp(8), Postfix SMTP client /* smtpd(8), Postfix SMTP server diff -Nru postfix-3.2.5/src/tlsproxy/tlsproxy.c postfix-3.3.0/src/tlsproxy/tlsproxy.c --- postfix-3.2.5/src/tlsproxy/tlsproxy.c 2017-02-19 01:58:21.000000000 +0000 +++ postfix-3.3.0/src/tlsproxy/tlsproxy.c 2018-01-14 16:48:25.000000000 +0000 @@ -168,6 +168,10 @@ /* .IP "\fBsyslog_name (see 'postconf -d' output)\fR" /* A prefix that is prepended to the process name in syslog /* records, so that, for example, "smtpd" becomes "prefix/smtpd". +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* SEE ALSO /* postscreen(8), Postfix zombie blocker /* smtpd(8), Postfix SMTP server diff -Nru postfix-3.2.5/src/trivial-rewrite/transport.c postfix-3.3.0/src/trivial-rewrite/transport.c --- postfix-3.2.5/src/trivial-rewrite/transport.c 2017-01-27 23:03:13.000000000 +0000 +++ postfix-3.3.0/src/trivial-rewrite/transport.c 2017-12-27 22:29:45.000000000 +0000 @@ -54,6 +54,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/trivial-rewrite/trivial-rewrite.c postfix-3.3.0/src/trivial-rewrite/trivial-rewrite.c --- postfix-3.2.5/src/trivial-rewrite/trivial-rewrite.c 2016-09-17 14:50:55.000000000 +0000 +++ postfix-3.3.0/src/trivial-rewrite/trivial-rewrite.c 2018-01-14 16:48:25.000000000 +0000 @@ -255,6 +255,10 @@ /* .IP "\fBhelpful_warnings (yes)\fR" /* Log warnings about problematic configuration settings, and provide /* helpful suggestions. +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* SEE ALSO /* postconf(5), configuration parameters /* transport(5), transport table format diff -Nru postfix-3.2.5/src/util/allascii.c postfix-3.3.0/src/util/allascii.c --- postfix-3.2.5/src/util/allascii.c 2015-02-17 16:40:23.000000000 +0000 +++ postfix-3.3.0/src/util/allascii.c 2017-12-27 22:29:45.000000000 +0000 @@ -29,6 +29,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/util/attr.h postfix-3.3.0/src/util/attr.h --- postfix-3.2.5/src/util/attr.h 2015-11-30 00:30:33.000000000 +0000 +++ postfix-3.3.0/src/util/attr.h 2017-12-27 22:29:45.000000000 +0000 @@ -171,6 +171,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/util/base32_code.h postfix-3.3.0/src/util/base32_code.h --- postfix-3.2.5/src/util/base32_code.h 2015-09-12 21:03:44.000000000 +0000 +++ postfix-3.3.0/src/util/base32_code.h 2017-12-27 22:29:45.000000000 +0000 @@ -31,6 +31,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/util/base64_code.h postfix-3.3.0/src/util/base64_code.h --- postfix-3.2.5/src/util/base64_code.h 2015-09-12 21:03:58.000000000 +0000 +++ postfix-3.3.0/src/util/base64_code.h 2017-12-27 22:29:45.000000000 +0000 @@ -39,6 +39,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/util/casefold.c postfix-3.3.0/src/util/casefold.c --- postfix-3.2.5/src/util/casefold.c 2017-02-19 01:58:21.000000000 +0000 +++ postfix-3.3.0/src/util/casefold.c 2017-12-27 22:29:45.000000000 +0000 @@ -83,6 +83,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/util/clean_env.c postfix-3.3.0/src/util/clean_env.c --- postfix-3.2.5/src/util/clean_env.c 2017-02-06 00:07:33.000000000 +0000 +++ postfix-3.3.0/src/util/clean_env.c 2017-12-27 22:29:45.000000000 +0000 @@ -33,6 +33,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/util/clean_env.h postfix-3.3.0/src/util/clean_env.h --- postfix-3.2.5/src/util/clean_env.h 2017-01-31 13:38:15.000000000 +0000 +++ postfix-3.3.0/src/util/clean_env.h 2017-12-27 22:29:45.000000000 +0000 @@ -26,6 +26,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/util/dict_db.c postfix-3.3.0/src/util/dict_db.c --- postfix-3.2.5/src/util/dict_db.c 2017-12-21 01:35:53.000000000 +0000 +++ postfix-3.3.0/src/util/dict_db.c 2017-12-27 21:53:13.000000000 +0000 @@ -53,6 +53,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #include "sys_defs.h" diff -Nru postfix-3.2.5/src/util/dict_db.h postfix-3.3.0/src/util/dict_db.h --- postfix-3.2.5/src/util/dict_db.h 2014-06-25 18:59:37.000000000 +0000 +++ postfix-3.3.0/src/util/dict_db.h 2017-12-27 21:53:13.000000000 +0000 @@ -45,6 +45,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/util/dict_inline.c postfix-3.3.0/src/util/dict_inline.c --- postfix-3.2.5/src/util/dict_inline.c 2017-01-05 22:53:43.000000000 +0000 +++ postfix-3.3.0/src/util/dict_inline.c 2017-12-27 22:29:45.000000000 +0000 @@ -26,6 +26,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/util/dict_lmdb.c postfix-3.3.0/src/util/dict_lmdb.c --- postfix-3.2.5/src/util/dict_lmdb.c 2016-03-14 23:38:49.000000000 +0000 +++ postfix-3.3.0/src/util/dict_lmdb.c 2017-12-27 22:29:45.000000000 +0000 @@ -48,6 +48,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #include diff -Nru postfix-3.2.5/src/util/dict_open.c postfix-3.3.0/src/util/dict_open.c --- postfix-3.2.5/src/util/dict_open.c 2015-01-27 13:29:04.000000000 +0000 +++ postfix-3.3.0/src/util/dict_open.c 2017-12-27 21:53:13.000000000 +0000 @@ -282,6 +282,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/util/dict_thash.c postfix-3.3.0/src/util/dict_thash.c --- postfix-3.2.5/src/util/dict_thash.c 2017-01-08 21:56:18.000000000 +0000 +++ postfix-3.3.0/src/util/dict_thash.c 2017-12-27 22:29:45.000000000 +0000 @@ -29,6 +29,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/util/dict_union.c postfix-3.3.0/src/util/dict_union.c --- postfix-3.2.5/src/util/dict_union.c 2016-09-17 12:07:15.000000000 +0000 +++ postfix-3.3.0/src/util/dict_union.c 2017-12-27 22:29:45.000000000 +0000 @@ -36,6 +36,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/util/edit_file.h postfix-3.3.0/src/util/edit_file.h --- postfix-3.2.5/src/util/edit_file.h 2015-09-12 20:37:55.000000000 +0000 +++ postfix-3.3.0/src/util/edit_file.h 2017-12-27 22:29:45.000000000 +0000 @@ -43,6 +43,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/util/hex_code.h postfix-3.3.0/src/util/hex_code.h --- postfix-3.2.5/src/util/hex_code.h 2015-09-12 21:04:57.000000000 +0000 +++ postfix-3.3.0/src/util/hex_code.h 2017-12-27 22:29:45.000000000 +0000 @@ -31,6 +31,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/util/host_port.h postfix-3.3.0/src/util/host_port.h --- postfix-3.2.5/src/util/host_port.h 2015-09-13 15:37:10.000000000 +0000 +++ postfix-3.3.0/src/util/host_port.h 2017-12-27 22:29:45.000000000 +0000 @@ -25,6 +25,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/util/listen.h postfix-3.3.0/src/util/listen.h --- postfix-3.2.5/src/util/listen.h 2015-09-12 20:45:47.000000000 +0000 +++ postfix-3.3.0/src/util/listen.h 2017-12-27 22:29:45.000000000 +0000 @@ -42,6 +42,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/util/lstat_as.h postfix-3.3.0/src/util/lstat_as.h --- postfix-3.2.5/src/util/lstat_as.h 2015-09-12 20:50:27.000000000 +0000 +++ postfix-3.3.0/src/util/lstat_as.h 2017-12-27 22:29:45.000000000 +0000 @@ -25,6 +25,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/util/mac_expand.c postfix-3.3.0/src/util/mac_expand.c --- postfix-3.2.5/src/util/mac_expand.c 2016-12-04 16:27:05.000000000 +0000 +++ postfix-3.3.0/src/util/mac_expand.c 2018-01-21 18:13:34.000000000 +0000 @@ -119,6 +119,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ @@ -467,21 +472,26 @@ * Named parameter. */ else { + char *start; /* * Look for the ? or : operator. In case of a syntax error, * return without doing damage, and issue a warning instead. */ + start = (cp += strspn(cp, MAC_EXP_WHITESPACE)); for ( /* void */ ; /* void */ ; cp++) { - if ((ch = *cp) == 0) { + if ((ch = cp[tmp_len = strspn(cp, MAC_EXP_WHITESPACE)]) == 0) { + *cp = 0; lookup_mode = MAC_EXP_MODE_USE; break; } if (ch == '?' || ch == ':') { *cp++ = 0; + cp += tmp_len; lookup_mode = MAC_EXP_MODE_TEST; break; } + ch = *cp; if (!ISALNUM(ch) && ch != '_') { MAC_EXP_ERR_RETURN(mc, "attribute name syntax error at: " "\"...%.*s>>>%.20s\"", @@ -494,7 +504,7 @@ * Look up the named parameter. Todo: allow the lookup function * to specify if the result is safe for $name expanson. */ - lookup = mc->lookup(vstring_str(buf), lookup_mode, mc->context); + lookup = mc->lookup(start, lookup_mode, mc->context); } /* diff -Nru postfix-3.2.5/src/util/mac_expand.h postfix-3.3.0/src/util/mac_expand.h --- postfix-3.2.5/src/util/mac_expand.h 2016-02-06 16:20:19.000000000 +0000 +++ postfix-3.3.0/src/util/mac_expand.h 2017-12-27 22:29:45.000000000 +0000 @@ -45,6 +45,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/util/mac_expand.in postfix-3.3.0/src/util/mac_expand.in --- postfix-3.2.5/src/util/mac_expand.in 2014-10-01 17:50:47.000000000 +0000 +++ postfix-3.3.0/src/util/mac_expand.in 2018-01-21 21:24:43.000000000 +0000 @@ -1,7 +1,12 @@ name1 = name1-value +$name1 $(name1 -$(name ) +$(name1) +$( name1) +$(name1 ) +$(na me1) +${na me1} ${${name1} != {}?name 1 defined, |$name1|$name2|} ${ ${name1} != {}?name 1 defined, |$name1|$name2|} ${ ${name1} ?name 1 defined, |$name1|$name2|} diff -Nru postfix-3.2.5/src/util/mac_expand.ref postfix-3.3.0/src/util/mac_expand.ref --- postfix-3.2.5/src/util/mac_expand.ref 2014-12-11 01:19:12.000000000 +0000 +++ postfix-3.3.0/src/util/mac_expand.ref 2018-01-21 21:26:46.000000000 +0000 @@ -1,19 +1,30 @@ << name1 = name1-value << +<< $name1 +stat=0 result=name1-value << $(name1 unknown: warning: truncated macro reference: "$(name1" stat=1 result= -<< $(name ) -unknown: warning: attribute name syntax error at: "...name>>> " +<< $(name1) +stat=0 result=name1-value +<< $( name1) +stat=0 result=name1-value +<< $(name1 ) +stat=0 result=name1-value +<< $(na me1) +unknown: warning: attribute name syntax error at: "...na>>> me1" +stat=1 result= +<< ${na me1} +unknown: warning: attribute name syntax error at: "...na>>> me1" stat=1 result= << ${${name1} != {}?name 1 defined, |$name1|$name2|} unknown: warning: attribute name syntax error at: "...>>>${name1} != {}?name " stat=1 result= << ${ ${name1} != {}?name 1 defined, |$name1|$name2|} -unknown: warning: attribute name syntax error at: "...>>> ${name1} != {}?name" +unknown: warning: attribute name syntax error at: "... >>>${name1} != {}?name " stat=1 result= << ${ ${name1} ?name 1 defined, |$name1|$name2|} -unknown: warning: attribute name syntax error at: "...>>> ${name1} ?name 1 de" +unknown: warning: attribute name syntax error at: "... >>>${name1} ?name 1 def" stat=1 result= << ${{$name1} ? {name 1 defined, |$name1|$name2|} : {name 1 undefined, |$name1|$name2|} } unknown: warning: "==" or "!="" or "<"" or "<="" or ">="" or ">" expected at: "...$name1}>>>? {name 1 defined, |" @@ -51,16 +62,13 @@ unknown: warning: "==" or "!="" or "<"" or "<="" or ">="" or ">" expected at: "...text}>>>= {}" stat=1 result= << ${{${ name1}} == {}} -unknown: warning: attribute name syntax error at: "...>>> name1" -stat=1 result= +stat=0 result= << ${name1?{${ name1}}:{${name2}}} -unknown: warning: attribute name syntax error at: "...>>> name1" -stat=1 result= +stat=0 result=name1-value << ${name2?{${ name1}}:{${name2}}} stat=2 result= << ${name2?{${name1}}:{${ name2}}} -unknown: warning: attribute name syntax error at: "...>>> name2" -stat=1 result= +stat=2 result= << ${name2:{${name1}}:{${name2}}} unknown: warning: unexpected input at: "...${name1}}>>>:{${name2}}" stat=1 result=name1-value diff -Nru postfix-3.2.5/src/util/Makefile.in postfix-3.3.0/src/util/Makefile.in --- postfix-3.2.5/src/util/Makefile.in 2017-02-05 23:36:22.000000000 +0000 +++ postfix-3.3.0/src/util/Makefile.in 2017-04-30 15:32:53.000000000 +0000 @@ -541,7 +541,8 @@ dict_static_test dict_inline_test midna_domain_test casefold_test \ dict_utf8_test strcasecmp_utf8_test vbuf_print_test dict_regexp_test \ dict_union_test dict_pipe_test miss_endif_cidr_test \ - miss_endif_pcre_test miss_endif_regexp_test split_qnameval_test + miss_endif_pcre_test miss_endif_regexp_test split_qnameval_test \ + vstring_test root_tests: @@ -834,6 +835,11 @@ diff dict_pipe_test.ref dict_pipe_test.tmp rm -f dict_pipe_test.tmp +vstring_test: dict_open vstring vstring_test.ref + $(SHLIB_ENV) ./vstring one two three >vstring_test.tmp 2>&1 + diff vstring_test.ref vstring_test.tmp + rm -f vstring_test.tmp + depend: $(MAKES) (sed '1,/^# do not edit/!d' Makefile.in; \ set -e; for i in [a-z][a-z0-9]*.c; do \ diff -Nru postfix-3.2.5/src/util/match_ops.c postfix-3.3.0/src/util/match_ops.c --- postfix-3.2.5/src/util/match_ops.c 2016-06-04 21:15:19.000000000 +0000 +++ postfix-3.3.0/src/util/match_ops.c 2017-12-27 22:29:45.000000000 +0000 @@ -58,6 +58,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/util/msg_syslog.c postfix-3.3.0/src/util/msg_syslog.c --- postfix-3.2.5/src/util/msg_syslog.c 2017-01-29 20:47:57.000000000 +0000 +++ postfix-3.3.0/src/util/msg_syslog.c 2017-12-27 22:29:45.000000000 +0000 @@ -39,6 +39,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System libraries. */ diff -Nru postfix-3.2.5/src/util/myaddrinfo.h postfix-3.3.0/src/util/myaddrinfo.h --- postfix-3.2.5/src/util/myaddrinfo.h 2015-09-12 21:41:24.000000000 +0000 +++ postfix-3.3.0/src/util/myaddrinfo.h 2017-12-27 22:29:45.000000000 +0000 @@ -219,6 +219,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/util/myflock.h postfix-3.3.0/src/util/myflock.h --- postfix-3.2.5/src/util/myflock.h 2015-09-12 20:55:12.000000000 +0000 +++ postfix-3.3.0/src/util/myflock.h 2017-12-27 22:29:45.000000000 +0000 @@ -42,6 +42,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/util/mymalloc.c postfix-3.3.0/src/util/mymalloc.c --- postfix-3.2.5/src/util/mymalloc.c 2016-03-14 23:38:56.000000000 +0000 +++ postfix-3.3.0/src/util/mymalloc.c 2017-12-27 22:29:45.000000000 +0000 @@ -72,6 +72,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System libraries. */ diff -Nru postfix-3.2.5/src/util/mymalloc.h postfix-3.3.0/src/util/mymalloc.h --- postfix-3.2.5/src/util/mymalloc.h 2016-12-17 23:22:04.000000000 +0000 +++ postfix-3.3.0/src/util/mymalloc.h 2017-12-27 22:29:45.000000000 +0000 @@ -30,6 +30,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/util/netstring.c postfix-3.3.0/src/util/netstring.c --- postfix-3.2.5/src/util/netstring.c 2016-03-24 22:40:17.000000000 +0000 +++ postfix-3.3.0/src/util/netstring.c 2017-12-27 22:29:45.000000000 +0000 @@ -151,6 +151,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/util/peekfd.c postfix-3.3.0/src/util/peekfd.c --- postfix-3.2.5/src/util/peekfd.c 2015-07-12 14:18:54.000000000 +0000 +++ postfix-3.3.0/src/util/peekfd.c 2017-12-27 22:29:45.000000000 +0000 @@ -28,6 +28,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/util/recv_pass_attr.c postfix-3.3.0/src/util/recv_pass_attr.c --- postfix-3.2.5/src/util/recv_pass_attr.c 2015-09-12 21:42:58.000000000 +0000 +++ postfix-3.3.0/src/util/recv_pass_attr.c 2017-12-27 22:29:45.000000000 +0000 @@ -37,6 +37,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/util/sane_fsops.h postfix-3.3.0/src/util/sane_fsops.h --- postfix-3.2.5/src/util/sane_fsops.h 2015-09-12 20:57:39.000000000 +0000 +++ postfix-3.3.0/src/util/sane_fsops.h 2017-12-27 22:29:45.000000000 +0000 @@ -25,6 +25,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/util/sane_socketpair.h postfix-3.3.0/src/util/sane_socketpair.h --- postfix-3.2.5/src/util/sane_socketpair.h 2015-09-12 20:58:22.000000000 +0000 +++ postfix-3.3.0/src/util/sane_socketpair.h 2017-12-27 22:29:45.000000000 +0000 @@ -24,6 +24,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/util/stat_as.h postfix-3.3.0/src/util/stat_as.h --- postfix-3.2.5/src/util/stat_as.h 2015-09-12 21:00:51.000000000 +0000 +++ postfix-3.3.0/src/util/stat_as.h 2017-12-27 22:29:45.000000000 +0000 @@ -25,6 +25,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/util/stringops.h postfix-3.3.0/src/util/stringops.h --- postfix-3.2.5/src/util/stringops.h 2017-01-05 00:43:25.000000000 +0000 +++ postfix-3.3.0/src/util/stringops.h 2017-12-27 22:29:45.000000000 +0000 @@ -86,6 +86,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/util/sys_compat.c postfix-3.3.0/src/util/sys_compat.c --- postfix-3.2.5/src/util/sys_compat.c 2017-02-02 13:24:47.000000000 +0000 +++ postfix-3.3.0/src/util/sys_compat.c 2017-12-27 22:29:45.000000000 +0000 @@ -61,6 +61,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/util/sys_defs.h postfix-3.3.0/src/util/sys_defs.h --- postfix-3.2.5/src/util/sys_defs.h 2017-02-02 01:31:15.000000000 +0000 +++ postfix-3.3.0/src/util/sys_defs.h 2017-06-18 19:30:20.000000000 +0000 @@ -782,7 +782,8 @@ #define HAVE_GLIBC_API_VERSION_SUPPORT(maj, min) __GLIBC_PREREQ(maj, min) #else #define HAVE_GLIBC_API_VERSION_SUPPORT(maj, min) \ - ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) + (defined(__GLIBC__) && \ + ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))) #endif #if HAVE_GLIBC_API_VERSION_SUPPORT(2, 1) #define SOCKADDR_SIZE socklen_t @@ -805,7 +806,7 @@ #define KERNEL_VERSION(a,b,c) (LINUX_VERSION_CODE + 1) #endif #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)) \ - || (__GLIBC__ < 2) + || (defined(__GLIBC__) && __GLIBC__ < 2) #define CANT_USE_SEND_RECV_MSG #define DEF_SMTP_CACHE_DEMAND 0 #else diff -Nru postfix-3.2.5/src/util/timed_wait.h postfix-3.3.0/src/util/timed_wait.h --- postfix-3.2.5/src/util/timed_wait.h 2015-09-12 21:06:26.000000000 +0000 +++ postfix-3.3.0/src/util/timed_wait.h 2017-12-27 22:29:45.000000000 +0000 @@ -25,6 +25,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/util/unsafe.c postfix-3.3.0/src/util/unsafe.c --- postfix-3.2.5/src/util/unsafe.c 2017-02-11 15:56:11.000000000 +0000 +++ postfix-3.3.0/src/util/unsafe.c 2017-12-27 22:29:45.000000000 +0000 @@ -38,6 +38,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/util/vbuf_print.c postfix-3.3.0/src/util/vbuf_print.c --- postfix-3.2.5/src/util/vbuf_print.c 2017-09-24 12:28:43.000000000 +0000 +++ postfix-3.3.0/src/util/vbuf_print.c 2017-09-24 00:00:10.000000000 +0000 @@ -64,6 +64,7 @@ /* Application-specific. */ #include "msg.h" +#include "mymalloc.h" #include "vbuf.h" #include "vstring.h" #include "vbuf_print.h" @@ -110,10 +111,10 @@ return (bp); \ _ret = snprintf((char *) (bp)->ptr, (bp)->cnt, (fmt), (arg)); \ if (_ret < 0) \ - msg_panic("%s: output error for '%s'", myname, (fmt)); \ + msg_panic("%s: output error for '%s'", myname, mystrdup(fmt)); \ if (_ret >= (bp)->cnt) \ msg_panic("%s: output for '%s' exceeds space %ld", \ - myname, fmt, (long) (bp)->cnt); \ + myname, mystrdup(fmt), (long) (bp)->cnt); \ VBUF_SKIP(bp); \ } while (0) #else diff -Nru postfix-3.2.5/src/util/vbuf_print_test.in postfix-3.3.0/src/util/vbuf_print_test.in --- postfix-3.2.5/src/util/vbuf_print_test.in 2016-03-20 21:41:59.000000000 +0000 +++ postfix-3.3.0/src/util/vbuf_print_test.in 2017-09-09 21:00:45.000000000 +0000 @@ -24,3 +24,10 @@ %.100f 1e308 %g 1e308 %.309g 1e308 + +%s foo +%0s foo +%.0s foo +%10s foo +%+10s foo +%-10s foo diff -Nru postfix-3.2.5/src/util/vbuf_print_test.ref postfix-3.3.0/src/util/vbuf_print_test.ref --- postfix-3.2.5/src/util/vbuf_print_test.ref 2016-03-20 21:42:00.000000000 +0000 +++ postfix-3.3.0/src/util/vbuf_print_test.ref 2017-09-09 21:00:51.000000000 +0000 @@ -19,3 +19,9 @@ ./vbuf_print: "100000000000000001097906362944045541740492309677311846336810682903157585404911491537163328978494688899061249669721172515611590283743140088328307009198146046031271664502933027185697489699588559043338384466165001178426897626212945177628091195786707458122783970171784415105291802893207873272974885715430223118336.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" ./vbuf_print: "1e+308" ./vbuf_print: "100000000000000001097906362944045541740492309677311846336810682903157585404911491537163328978494688899061249669721172515611590283743140088328307009198146046031271664502933027185697489699588559043338384466165001178426897626212945177628091195786707458122783970171784415105291802893207873272974885715430223118336" +./vbuf_print: "foo" +./vbuf_print: "foo" +./vbuf_print: "" +./vbuf_print: " foo" +./vbuf_print: " foo" +./vbuf_print: "foo " diff -Nru postfix-3.2.5/src/util/vstream.c postfix-3.3.0/src/util/vstream.c --- postfix-3.2.5/src/util/vstream.c 2017-02-19 01:58:21.000000000 +0000 +++ postfix-3.3.0/src/util/vstream.c 2017-12-27 21:53:13.000000000 +0000 @@ -449,6 +449,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ @@ -980,6 +985,8 @@ */ if (bp->put_ready == 0) msg_panic("%s: read-only stream", myname); + if (want < 0) + msg_panic("%s: bad length %ld", myname, (long) want); switch (bp->flags & (VSTREAM_FLAG_READ | VSTREAM_FLAG_WRITE)) { case VSTREAM_FLAG_READ: /* change direction */ bp->flags &= ~VSTREAM_FLAG_READ; diff -Nru postfix-3.2.5/src/util/vstream.h postfix-3.3.0/src/util/vstream.h --- postfix-3.2.5/src/util/vstream.h 2017-02-19 01:58:21.000000000 +0000 +++ postfix-3.3.0/src/util/vstream.h 2017-12-27 22:29:45.000000000 +0000 @@ -266,6 +266,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/util/vstring.c postfix-3.3.0/src/util/vstring.c --- postfix-3.2.5/src/util/vstring.c 2017-06-10 19:35:51.000000000 +0000 +++ postfix-3.3.0/src/util/vstring.c 2017-08-27 23:18:11.000000000 +0000 @@ -304,6 +304,9 @@ * * The length overflow tests here and in vstring_alloc() should protect us * against all length overflow problems within vstring library routines. + * + * Safety net: add a gratuitous null terminator so that C-style string + * operations won't scribble past the end. */ if ((bp->flags & VSTRING_FLAG_EXACT) == 0 && bp->len > incr) incr = bp->len; @@ -328,7 +331,7 @@ static int vstring_buf_put_ready(VBUF *bp) { - vstring_extend(bp, 0); + vstring_extend(bp, 1); return (0); } @@ -351,6 +354,10 @@ { VSTRING *vp; + /* + * Safety net: add a gratuitous null terminator so that C-style string + * operations won't scribble past the end. + */ if (len < 1 || len > SSIZE_T_MAX - 1) msg_panic("vstring_alloc: bad length %ld", (long) len); vp = (VSTRING *) mymalloc(sizeof(*vp)); @@ -668,7 +675,18 @@ int main(int argc, char **argv) { VSTRING *vp = vstring_alloc(1); + int n; + + /* + * Report the location of the gratuitous null terminator. + */ + for (n = 1; n <= 5; n++) { + VSTRING_ADDCH(vp, 'x'); + printf("payload/buffer size %d/%ld, strlen() %ld\n", + n, (long) (vp)->vbuf.len, (long) strlen(vstring_str(vp))); + } + VSTRING_RESET(vp); while (argc-- > 0) { vstring_strcat(vp, *argv++); vstring_strcat(vp, "."); diff -Nru postfix-3.2.5/src/util/vstring.h postfix-3.3.0/src/util/vstring.h --- postfix-3.2.5/src/util/vstring.h 2016-03-20 17:36:57.000000000 +0000 +++ postfix-3.3.0/src/util/vstring.h 2017-05-01 21:09:20.000000000 +0000 @@ -72,8 +72,6 @@ #define VSTRING_LEN(vp) ((ssize_t) ((vp)->vbuf.ptr - (vp)->vbuf.data)) #define vstring_end(vp) ((char *) (vp)->vbuf.ptr) #define VSTRING_TERMINATE(vp) do { \ - if ((vp)->vbuf.cnt <= 0) \ - VSTRING_SPACE((vp),1); \ *(vp)->vbuf.ptr = 0; \ } while (0) #define VSTRING_RESET(vp) do { \ diff -Nru postfix-3.2.5/src/util/vstring_test.ref postfix-3.3.0/src/util/vstring_test.ref --- postfix-3.2.5/src/util/vstring_test.ref 1970-01-01 00:00:00.000000000 +0000 +++ postfix-3.3.0/src/util/vstring_test.ref 2017-04-30 19:40:45.000000000 +0000 @@ -0,0 +1,6 @@ +payload/buffer size 1/1, strlen() 1 +payload/buffer size 2/2, strlen() 2 +payload/buffer size 3/4, strlen() 4 +payload/buffer size 4/4, strlen() 4 +payload/buffer size 5/8, strlen() 8 +argv concatenated: ./vstring.one.two.three. diff -Nru postfix-3.2.5/src/util/vstring_vstream.h postfix-3.3.0/src/util/vstring_vstream.h --- postfix-3.2.5/src/util/vstring_vstream.h 2015-09-12 21:09:26.000000000 +0000 +++ postfix-3.3.0/src/util/vstring_vstream.h 2017-12-27 22:29:45.000000000 +0000 @@ -50,6 +50,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ #endif diff -Nru postfix-3.2.5/src/verify/verify.c postfix-3.3.0/src/verify/verify.c --- postfix-3.2.5/src/verify/verify.c 2016-11-05 12:01:03.000000000 +0000 +++ postfix-3.3.0/src/verify/verify.c 2018-01-14 16:48:25.000000000 +0000 @@ -184,6 +184,10 @@ /* .IP "\fBsyslog_name (see 'postconf -d' output)\fR" /* A prefix that is prepended to the process name in syslog /* records, so that, for example, "smtpd" becomes "prefix/smtpd". +/* .PP +/* Available in Postfix 3.3 and later: +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* SEE ALSO /* smtpd(8), Postfix SMTP server /* cleanup(8), enqueue Postfix message diff -Nru postfix-3.2.5/src/virtual/mailbox.c postfix-3.3.0/src/virtual/mailbox.c --- postfix-3.2.5/src/virtual/mailbox.c 2018-01-21 21:59:17.000000000 +0000 +++ postfix-3.3.0/src/virtual/mailbox.c 2018-01-06 15:43:44.000000000 +0000 @@ -34,6 +34,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */ diff -Nru postfix-3.2.5/src/virtual/virtual.c postfix-3.3.0/src/virtual/virtual.c --- postfix-3.2.5/src/virtual/virtual.c 2016-09-17 14:50:56.000000000 +0000 +++ postfix-3.3.0/src/virtual/virtual.c 2018-01-14 16:48:25.000000000 +0000 @@ -204,15 +204,17 @@ /* RESOURCE AND RATE CONTROLS /* .ad /* .fi +/* .IP "\fBvirtual_mailbox_limit (51200000)\fR" +/* The maximal size in bytes of an individual \fBvirtual\fR(8) mailbox or +/* maildir file, or zero (no limit). +/* .PP +/* Implemented in the qmgr(8) daemon: /* .IP "\fBvirtual_destination_concurrency_limit ($default_destination_concurrency_limit)\fR" /* The maximal number of parallel deliveries to the same destination /* via the virtual message delivery transport. /* .IP "\fBvirtual_destination_recipient_limit ($default_destination_recipient_limit)\fR" /* The maximal number of recipients per message for the virtual /* message delivery transport. -/* .IP "\fBvirtual_mailbox_limit (51200000)\fR" -/* The maximal size in bytes of an individual \fBvirtual\fR(8) mailbox or -/* maildir file, or zero (no limit). /* MISCELLANEOUS CONTROLS /* .ad /* .fi @@ -251,6 +253,14 @@ /* Optional filter for the \fBvirtual\fR(8) delivery agent to change the /* delivery status code or explanatory text of successful or unsuccessful /* deliveries. +/* .PP +/* Available in Postfix version 3.3 and later: +/* .IP "\fBenable_original_recipient (yes)\fR" +/* Enable support for the original recipient address after an +/* address is rewritten to a different address (for example with +/* aliasing or with canonical mapping). +/* .IP "\fBservice_name (read-only)\fR" +/* The master.cf service name of a Postfix daemon process. /* SEE ALSO /* qmgr(8), queue manager /* bounce(8), delivery status reports diff -Nru postfix-3.2.5/src/xsasl/xsasl_server.c postfix-3.3.0/src/xsasl/xsasl_server.c --- postfix-3.2.5/src/xsasl/xsasl_server.c 2017-02-19 01:58:21.000000000 +0000 +++ postfix-3.3.0/src/xsasl/xsasl_server.c 2017-12-27 22:29:45.000000000 +0000 @@ -202,6 +202,11 @@ /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA +/* +/* Wietse Venema +/* Google, Inc. +/* 111 8th Avenue +/* New York, NY 10011, USA /*--*/ /* System library. */