diff -Nru postfix-3.6.3/debian/changelog postfix-3.6.4/debian/changelog --- postfix-3.6.3/debian/changelog 2022-02-09 08:13:48.000000000 +0000 +++ postfix-3.6.4/debian/changelog 2022-03-21 17:40:16.000000000 +0000 @@ -1,3 +1,45 @@ +postfix (3.6.4-1ubuntu1) jammy; urgency=medium + + * Merge with Debian unstable. (LP: #1959612) Remaining changes: + - d/p/postfix-3.6.2-glibc-234-build-fix.patch: Fix for + building against glibc-2.34 with new closefrom(). + + -- Bryce Harrington Mon, 21 Mar 2022 10:40:16 -0700 + +postfix (3.6.4-1) unstable; urgency=medium + + [Scott Kitterman] + + * Ignore changes to html files in debian/source/options + * Delete d/p/postfix-dup-postconf.patch, included in upstream release + * Add lintian-override for insecure URI - releases are signed + * Make signing-key.asc minimal + + [Wietse Venema] + + * 3.6.4 + + [Christian Göttsche] + + * Rework rules to use dh sequencer + * Call subcommand via shell + * Update cleaning to build package twice + * Bump to debhelper compat level 13 + * Drop default include path and split CCARGS + * Use mkdir -Z instead of subsequent running restorecon + * Drop custom function pathfind in favor of command -v + * Quote path in update-libc.d + * Update postfix.config + * Quote directory path in postfix-instance-generator + * Drop check on postinst.functions in postfix-sqlite.prerm + * Update postfix-add-policy script + * Update postfix-add-filter script + * Drop versioned symlinks to plugin libraries + * Drop ldconfig calls in maintscripts + * Support parallel build, except do not build man pages parallel + + -- Scott Kitterman Sat, 15 Jan 2022 18:41:26 -0500 + postfix (3.6.3-5ubuntu2) jammy; urgency=medium * No-change rebuild for icu soname change. diff -Nru postfix-3.6.3/debian/clean postfix-3.6.4/debian/clean --- postfix-3.6.3/debian/clean 1970-01-01 00:00:00.000000000 +0000 +++ postfix-3.6.4/debian/clean 2022-03-19 07:55:46.000000000 +0000 @@ -0,0 +1,2 @@ +conf/main.cf.debian +conf/main.cf.dist diff -Nru postfix-3.6.3/debian/control postfix-3.6.4/debian/control --- postfix-3.6.3/debian/control 2022-01-05 03:13:51.000000000 +0000 +++ postfix-3.6.4/debian/control 2022-03-21 17:40:16.000000000 +0000 @@ -7,7 +7,7 @@ Standards-Version: 4.6.0 Rules-Requires-Root: no Homepage: http://www.postfix.org -Build-Depends: debhelper-compat (= 12), po-debconf (>= 0.5.0), groff-base, patch, pkg-config, lsb-release, libdb-dev (>=4.6.19), libldap2-dev (>=2.1), liblmdb-dev, libpcre3-dev, default-libmysqlclient-dev, libssl-dev (>=1.0.2), libsasl2-dev, libpq-dev, libcdb-dev, dpkg-dev (>= 1.16.1~), libsqlite3-dev, html2text, txt2man, libicu-dev +Build-Depends: debhelper-compat (= 13), po-debconf (>= 0.5.0), groff-base, patch, pkg-config, lsb-release, libdb-dev (>=4.6.19), libldap2-dev (>=2.1), liblmdb-dev, libpcre3-dev, default-libmysqlclient-dev, libssl-dev (>=1.0.2), libsasl2-dev, libpq-dev, libcdb-dev, dpkg-dev (>= 1.16.1~), libsqlite3-dev, html2text, txt2man, libicu-dev Vcs-Browser: https://salsa.debian.org/postfix-team/postfix-dev Vcs-Git: https://salsa.debian.org/postfix-team/postfix-dev.git diff -Nru postfix-3.6.3/debian/functions postfix-3.6.4/debian/functions --- postfix-3.6.3/debian/functions 2022-01-05 03:13:51.000000000 +0000 +++ postfix-3.6.4/debian/functions 2022-03-19 07:55:46.000000000 +0000 @@ -1,4 +1,3 @@ -DISTRO=$(lsb_release -is 2>/dev/null || echo Debian) addmap() { name=$1 @@ -24,18 +23,6 @@ fi return 0 } -pathfind() { - OLDIFS="$IFS" - IFS=: - for p in $PATH; do - if [ -x "$p/$*" ]; then - IFS="$OLDIFS" - return 0 - fi - done - IFS="$OLDIFS" - return 1 -} runnewaliases() { db_get postfix/main_mailer_type && mailer="$RET" if [ "$mailer" != "No configuration" ] || [ -f /etc/postfix/main.cf ]; then diff -Nru postfix-3.6.3/debian/patches/postfix-dup-postconf.patch postfix-3.6.4/debian/patches/postfix-dup-postconf.patch --- postfix-3.6.3/debian/patches/postfix-dup-postconf.patch 2022-01-04 20:10:10.000000000 +0000 +++ postfix-3.6.4/debian/patches/postfix-dup-postconf.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -Description: Fix duplicate bounce_notice_recipient entries in postconf output. - Bug introduced on 2021-07-08. Reported by Vincent Lefevre. - https://marc.info/?l=postfix-users&m=163698504624352&w=2 -Bug-Debian: https://bugs.debian.org/999694 -Author: Wietse Venema -Last-Update: 2021-11-15 - -Index: postfix/src/smtpd/smtpd.c -=================================================================== ---- postfix.orig/src/smtpd/smtpd.c -+++ postfix/src/smtpd/smtpd.c -@@ -6432,7 +6432,7 @@ int main(int argc, char **argv) - VAR_EOD_CHECKS, DEF_EOD_CHECKS, &var_eod_checks, 0, 0, - VAR_MAPS_RBL_DOMAINS, DEF_MAPS_RBL_DOMAINS, &var_maps_rbl_domains, 0, 0, - VAR_RBL_REPLY_MAPS, DEF_RBL_REPLY_MAPS, &var_rbl_reply_maps, 0, 0, -- VAR_BOUNCE_RCPT, DEF_ERROR_RCPT, &var_bounce_rcpt, 1, 0, -+ VAR_BOUNCE_RCPT, DEF_BOUNCE_RCPT, &var_bounce_rcpt, 1, 0, - VAR_ERROR_RCPT, DEF_ERROR_RCPT, &var_error_rcpt, 1, 0, - VAR_REST_CLASSES, DEF_REST_CLASSES, &var_rest_classes, 0, 0, - VAR_CANONICAL_MAPS, DEF_CANONICAL_MAPS, &var_canonical_maps, 0, 0, diff -Nru postfix-3.6.3/debian/patches/series postfix-3.6.4/debian/patches/series --- postfix-3.6.3/debian/patches/series 2022-01-11 15:39:58.000000000 +0000 +++ postfix-3.6.4/debian/patches/series 2022-03-21 17:39:52.000000000 +0000 @@ -1,4 +1,3 @@ -postfix-dup-postconf.patch 02_kfreebsd_support.diff 03_ldap3_by_default.diff 04_remove_gdbm_support.diff diff -Nru postfix-3.6.3/debian/postfix-add-filter postfix-3.6.4/debian/postfix-add-filter --- postfix-3.6.3/debian/postfix-add-filter 2022-01-05 03:13:51.000000000 +0000 +++ postfix-3.6.4/debian/postfix-add-filter 2022-03-19 07:55:46.000000000 +0000 @@ -26,7 +26,6 @@ import sys import shutil -import os import time def makeservice(name, port): @@ -68,7 +67,7 @@ -o relay_recipient_maps= """ % (port)) additions = header + smtp + smtpd - return (additions) + return additions USAGE = """To add a new filter service to your master.cf: @@ -85,7 +84,6 @@ if __name__ == '__main__': - import sys if len(sys.argv) < 3: print(USAGE + "\n") elif len(sys.argv) == 3: @@ -93,9 +91,8 @@ listenerport = sys.argv[2] # Read in master.cf and check to make sure specified names aren't # already used - masterfile = open('/etc/postfix/master.cf', mode='r') - master = masterfile.readlines() - masterfile.close() + with open('/etc/postfix/master.cf', mode='r') as masterfile: + master = masterfile.readlines() bailout = False for line in master: if servicename in line or listenerport in line: @@ -115,12 +112,10 @@ # Add stuff in stuff = makeservice(servicename, listenerport) # Append stuff to the working copy: - newmaster = open('/etc/postfix/master.cf.working', mode='a') - newmaster.writelines(stuff) - newmaster.close() + with open('/etc/postfix/master.cf.working', mode='a') as newmaster: + newmaster.writelines(stuff) # Put working copy in place. shutil.move('/etc/postfix/master.cf.working', \ '/etc/postfix/master.cf') else: print(USAGE + '\n') - diff -Nru postfix-3.6.3/debian/postfix-add-policy postfix-3.6.4/debian/postfix-add-policy --- postfix-3.6.3/debian/postfix-add-policy 2022-01-05 03:13:51.000000000 +0000 +++ postfix-3.6.4/debian/postfix-add-policy 2022-03-19 07:55:46.000000000 +0000 @@ -26,7 +26,6 @@ import sys import shutil -import os import time def makepolicy(name, user, argv): @@ -41,7 +40,7 @@ user=%s argv=%s """ % (name, user, argv)) additions = header + policy - return (additions) + return additions USAGE = """To add a new policy service to your master.cf: @@ -58,7 +57,6 @@ if __name__ == '__main__': - import sys if len(sys.argv) < 4: print(USAGE + "\n") elif len(sys.argv) == 4: @@ -67,9 +65,8 @@ argv = sys.argv[3] # Read in master.cf and check to make sure specified name isn't # already used - masterfile = open('/etc/postfix/master.cf', mode='r') - master = masterfile.readlines() - masterfile.close() + with open('/etc/postfix/master.cf', mode='r') as masterfile: + master = masterfile.readlines() bailout = False for line in master: if policyname in line: @@ -88,12 +85,10 @@ # Add stuff in stuff = makepolicy(policyname, user, argv) # Append stuff to the working copy: - newmaster = open('/etc/postfix/master.cf.working', mode='a') - newmaster.writelines(stuff) - newmaster.close() + with open('/etc/postfix/master.cf.working', mode='a') as newmaster: + newmaster.writelines(stuff) # Put working copy in place. shutil.move('/etc/postfix/master.cf.working', \ '/etc/postfix/master.cf') else: print(USAGE + "\n") - diff -Nru postfix-3.6.3/debian/postfix.config postfix-3.6.4/debian/postfix.config --- postfix-3.6.3/debian/postfix.config 2022-01-05 03:13:51.000000000 +0000 +++ postfix-3.6.4/debian/postfix.config 2022-03-19 07:55:46.000000000 +0000 @@ -4,6 +4,9 @@ # Based on code by Colin Walters , # and John Goerzen . +use strict; +use warnings; + use Debconf::Client::ConfModule qw(:all); use Fcntl; @@ -16,6 +19,7 @@ my $topstate; my $back; my $noninteractive; +my $skiprelayhost; # Regexps for checking domain names, blatantly stolen from exim config my $rfc1035_label_re= '[0-9A-Za-z]([-0-9A-Za-z]*[0-9A-Za-z])?'; @@ -35,7 +39,7 @@ set("postfix/main_mailer_type", "No configuration"); } } - $pri = "high"; + my $pri = "high"; $pri = "medium" if ($ARGV[1] ne "" && $distribution eq "ubuntu"); $noninteractive = (((input($pri, "postfix/main_mailer_type"))[0]) == 30); if ($noninteractive) { @@ -53,7 +57,7 @@ } else { go(); $back = (((go())[0]) == 30); - $mailertype = get("postfix/main_mailer_type"); + my $mailertype = get("postfix/main_mailer_type"); if ($mailertype eq "No configuration") { $topstate="ending-setup"; } else { @@ -78,11 +82,11 @@ if ($topstate eq "mailname") { my $mailname; if (-f "/etc/mailname") { - local *MAILNAME; - open MAILNAME, "/etc/mailname"; - $mailname = ; - close MAILNAME; - chomp $mailname; + if (open my $fh, '<', "/etc/mailname") { + $mailname = <$fh>; + close $fh; + chomp $mailname; + } } if (!defined($mailname) || $mailname eq "") { $mailname = `hostname --fqdn 2>/dev/null` || "localdomain"; @@ -176,9 +180,11 @@ if ($topstate eq "root") { if (fget("postfix/root_address", "isdefault") eq "true") { - open(F,"getent passwd 1000|"); - @l=; - close(F); + my @l = (); + if (open my $fh, '-|', "getent passwd 1000") { + @l=<$fh>; + close $fh; + } if ($#l > 0) { $l[0] =~ s/:.*$//; set("postfix/root_address",$l[0]); @@ -217,9 +223,9 @@ my $priority="medium"; if (fget("postfix/destinations", "set") eq "true") { if ((-x "/usr/sbin/postconf") && (-f "/etc/postfix/main.cf")) { - if (open(POSTCONF, "postconf -hx mydestination |")) { - $destinations=; - close(POSTCONF); + if (open my $fh, '-|', "postconf -hx mydestination") { + $destinations=<$fh>; + close $fh; chomp $destinations; set("postfix/destinations", $destinations); } @@ -281,9 +287,9 @@ if ($topstate eq "mynetworks") { if ((-x "/usr/sbin/postconf") && (-f "/etc/postfix/main.cf")) { my $mynetworks; - if (open(POSTCONF, "postconf -hx mynetworks |")) { - $mynetworks=; - close(POSTCONF); + if (open my $fh, '-|', "postconf -hx mynetworks") { + $mynetworks=<$fh>; + close $fh; chomp $mynetworks; set("postfix/mynetworks", $mynetworks); } @@ -383,13 +389,14 @@ if ($topstate eq "protocols") { if ((-x "/usr/sbin/postconf") && (-f "/etc/postfix/main.cf")) { my $protos; - if (open(POSTCONF, "postconf -hx inet_protocols |")) { - $protos=; - close(POSTCONF); + if (open my $fh, '-|', "postconf -hx inet_protocols") { + $protos=<$fh>; + close $fh; chomp $protos; set("postfix/protocols", $protos); } } elsif (fget("postfix/protocols", "isdefault") eq "true") { + my $protos; if (-d "/proc/sys/net/ipv6" && -d "/proc/sys/net/ipv4") { $protos="all"; } elsif (-d "/proc/sys/net/ipv6") { @@ -419,12 +426,14 @@ if ($topstate eq "ending-setup") { if ($ARGV[0] eq "reconfigure") { # touch /var/lib/postfix/reload - sysopen RESTARTFILE, "/var/spool/postfix/reload", O_CREAT; - close RESTARTFILE; + if (sysopen my $fh, "/var/spool/postfix/reload", O_CREAT) { + close $fh; + } } else { # touch /var/lib/postfix/restart - sysopen RESTARTFILE, "/var/spool/postfix/restart", O_CREAT; - close RESTARTFILE; + if (sysopen my $fh, "/var/spool/postfix/restart", O_CREAT) { + close $fh; + } } $topstate = "done"; } diff -Nru postfix-3.6.3/debian/postfix-instance-generator postfix-3.6.4/debian/postfix-instance-generator --- postfix-3.6.3/debian/postfix-instance-generator 2022-01-05 03:13:51.000000000 +0000 +++ postfix-3.6.4/debian/postfix-instance-generator 2022-03-19 07:55:46.000000000 +0000 @@ -9,7 +9,7 @@ ln -s "$SERVICEFILE" "$WANTDIR/postfix@-.service" for DIR in $(postconf -h multi_instance_directories); do - ln -s "$SERVICEFILE" "$WANTDIR/postfix@$(postconf -o inet_interfaces= -hc $DIR multi_instance_name).service" + ln -s "$SERVICEFILE" "$WANTDIR/postfix@$(postconf -o inet_interfaces= -hc "$DIR" multi_instance_name).service" done exit 0 diff -Nru postfix-3.6.3/debian/postfix.lintian-override postfix-3.6.4/debian/postfix.lintian-override --- postfix-3.6.3/debian/postfix.lintian-override 2022-01-05 03:13:51.000000000 +0000 +++ postfix-3.6.4/debian/postfix.lintian-override 2022-03-19 07:55:46.000000000 +0000 @@ -1,5 +1,4 @@ # Lintian doesn't know how to parse the damn files. -postfix: maintscript-calls-ldconfig postfix: missing-debconf-dependency-for-preinst postfix: spare-manual-page usr/share/man/man* postfix: unused-debconf-template postfix/bad_recipient_delimiter diff -Nru postfix-3.6.3/debian/postfix.postinst postfix-3.6.4/debian/postfix.postinst --- postfix-3.6.3/debian/postfix.postinst 2022-01-05 03:13:51.000000000 +0000 +++ postfix-3.6.4/debian/postfix.postinst 2022-03-19 07:55:46.000000000 +0000 @@ -10,15 +10,13 @@ # Use debconf. . /usr/share/debconf/confmodule CHROOT=/var/spool/postfix -config_directory="/etc/postfix" # make variable expansion easier... . /usr/share/postfix/postinst.functions set_maildrop_perms() { MAILDROP=${CHROOT}/maildrop - SCRIPT=/etc/postfix/postfix-script POSTDROP=/usr/sbin/postdrop - mkdir -p $MAILDROP + mkdir -pZ $MAILDROP if ! chown postfix:postdrop $MAILDROP 2>/dev/null; then addgroup --system postdrop chown postfix:postdrop $MAILDROP @@ -31,8 +29,7 @@ dpkg-statoverride --update --add root postdrop 02555 /usr/sbin/postqueue chmod 1730 $MAILDROP # Make SE Linux happy (hopefully) - if pathfind restorecon; then - restorecon "$MAILDROP" + if command -v restorecon >/dev/null; then restorecon "$POSTDROP" restorecon /var/spool/postfix/public restorecon /usr/sbin/postqueue @@ -81,12 +78,11 @@ } makedir() { - if [ ! -d $1 ]; then - mkdir $1 - if pathfind restorecon; then restorecon "$1" - fi + if [ ! -d "$1" ]; then + mkdir -Z "$1" fi - chown $2 $1 && chmod $3 $1 + chown $2 "$1" + chmod $3 "$1" } fix_master() { @@ -193,8 +189,6 @@ CHANGES="" -ldconfig - dpkg-divert --package postfix --remove --rename \ --divert /usr/share/man/man8/smtpd.real.8.gz \ /usr/share/man/man8/smtpd.8.gz > /dev/null 2>&1 @@ -311,7 +305,7 @@ # Fix master.cf for compat changes in 3.0. See Debian bug #816172 # Also fix myhostname if needed. - if `dpkg --compare-versions "$2" lt 3.1.0-1~`; then + if dpkg --compare-versions "$2" lt 3.1.0-1~; then for dir in /etc/postfix $(postconf -hxn multi_instance_directories); do hname=$(postconf -hx -c "$dir" myhostname) if [ "${hname}" = "${hname%.*}" ]; then @@ -510,7 +504,8 @@ if [ -z "$CHANGES" ]; then MSG="configuration was not changed" - else if [ -n "$NEWCONF" ]; then + else + if [ -n "$NEWCONF" ]; then MSG="is now set up with a default configuration" else MSG="is now set up with the changes above" @@ -601,10 +596,10 @@ if [ "$mailer" != "No configuration" ] || [ -f /etc/postfix/main.cf ]; then aliastype=$(postconf -h alias_database | cut -f1 -d:) - if ( [ "$aliastype" != "ldap" ] && [ "$aliastype" != "lmdb" ] && \ + if [ "$aliastype" != "ldap" ] && [ "$aliastype" != "lmdb" ] && \ [ "$aliastype" != "cdb" ] && [ "$aliastype" != "pcre" ] && \ [ "$aliastype" != "mysql" ] && [ "$aliastype" != "pgsql" ] && \ - [ "$aliastype" != "sqlite" ] ) ; then + [ "$aliastype" != "sqlite" ] ; then runnewaliases else echo "Newaliases not run - external map type. Ensure postfix-$aliastype is installed." diff -Nru postfix-3.6.3/debian/postfix.postrm postfix-3.6.4/debian/postfix.postrm --- postfix-3.6.3/debian/postfix.postrm 2022-01-05 03:13:51.000000000 +0000 +++ postfix-3.6.4/debian/postfix.postrm 2022-03-19 07:55:46.000000000 +0000 @@ -8,7 +8,6 @@ case "$1" in remove) - ldconfig dpkg-statoverride --remove /usr/sbin/postdrop >/dev/null 2>&1 || true dpkg-statoverride --remove /var/spool/postfix/public >/dev/null 2>&1 || true dpkg-statoverride --remove /usr/sbin/postqueue >/dev/null 2>&1 || true diff -Nru postfix-3.6.3/debian/postfix.preinst postfix-3.6.4/debian/postfix.preinst --- postfix-3.6.3/debian/postfix.preinst 2022-01-05 03:13:51.000000000 +0000 +++ postfix-3.6.4/debian/postfix.preinst 2022-03-19 07:55:46.000000000 +0000 @@ -14,10 +14,7 @@ DEBCONF= fi -dpkg_vers=$(dpkg --status dpkg | sed -n '/Version: /s/^Version: //p') -CONFIG=/etc/postfix/main.cf MASTER=/etc/postfix/master.cf -POSTDROP=/usr/sbin/postdrop compat_conversion_warning() { if [ -n "$DEBCONF" ]; then @@ -197,7 +194,7 @@ ;; esac -if [ install = "$1" -o upgrade = "$1" ]; then +if [ install = "$1" ] || [ upgrade = "$1" ]; then # cleanup after past mistakes. rm -f /usr/sbin/postconf.postfix dpkg-divert --package postfix-tls --remove \ diff -Nru postfix-3.6.3/debian/postfix.prerm postfix-3.6.4/debian/postfix.prerm --- postfix-3.6.3/debian/postfix.prerm 2022-01-05 03:13:51.000000000 +0000 +++ postfix-3.6.4/debian/postfix.prerm 2022-03-19 07:55:46.000000000 +0000 @@ -7,6 +7,8 @@ . /usr/share/postfix/postinst.functions +#DEBHELPER# + case "$1" in upgrade) ;; @@ -15,13 +17,9 @@ ;; remove) - [ -x /usr/sbin/invoke-rc.d ] && \ - INIT="invoke-rc.d postfix" || \ - INIT="/etc/init.d/postfix" - ${INIT} stop rm -rf /var/spool/postfix/lib rm -rf /var/spool/postfix/etc - ;; + ;; failed-upgrade) ;; @@ -31,5 +29,5 @@ exit 1 ;; esac -#DEBHELPER# + exit 0 diff -Nru postfix-3.6.3/debian/postfix-sqlite.prerm postfix-3.6.4/debian/postfix-sqlite.prerm --- postfix-3.6.3/debian/postfix-sqlite.prerm 2022-01-05 03:13:51.000000000 +0000 +++ postfix-3.6.4/debian/postfix-sqlite.prerm 2022-03-19 07:55:46.000000000 +0000 @@ -15,16 +15,12 @@ # # for details, see /usr/share/doc/packaging-manual/ -# Can't used postinst.functions until after stretch. -HAVE_FUNC="n" -if test -f /usr/share/postfix/postinst.functions; then - . /usr/share/postfix/postinst.functions - HAVE_FUNC=y -fi +# Common postfix functions +. /usr/share/postfix/postinst.functions case "$1" in remove|purge|upgrade|deconfigure) - [ n = "$HAVE_FUNC" ] || delmap sqlite + delmap sqlite ;; failed-upgrade) ;; diff -Nru postfix-3.6.3/debian/README.Debian postfix-3.6.4/debian/README.Debian --- postfix-3.6.3/debian/README.Debian 2022-01-05 03:13:51.000000000 +0000 +++ postfix-3.6.4/debian/README.Debian 2022-03-19 07:55:46.000000000 +0000 @@ -37,12 +37,12 @@ sourced into the Debian script that configures the chroot for each postfix instance. In the 'default' file, extra files can be specified in the chroot_extra_files variable (quoted, space separated list for multiple - files) and an additional Certificate Authority directory can be specifed + files) and an additional Certificate Authority directory can be specified in the chroot_extra_CAdir variable, for example: chroot_extra_files=/etc/ssl/certs/local-certificate.pem chroot_extra_CAdir=/etc/ssl/certs/local-CA - This can be used to provide provide certificates needed for Postfix to - make encrytped LDAP connections, e.g. tls_ca_cert_dir or tls_cert. See + This can be used to provide certificates needed for Postfix to + make encrypted LDAP connections, e.g. tls_ca_cert_dir or tls_cert. See ldap_table (5) or mysql_table (5) for specifics. The files or directory must exist outside the chroot in the location specified. They will be created or updated within the chroot each time diff -Nru postfix-3.6.3/debian/rules postfix-3.6.4/debian/rules --- postfix-3.6.3/debian/rules 2022-01-05 03:13:51.000000000 +0000 +++ postfix-3.6.4/debian/rules 2022-03-19 07:55:46.000000000 +0000 @@ -18,6 +18,7 @@ export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk +include /usr/share/dpkg/buildtools.mk # for ${CC} include /usr/share/dpkg/pkg-info.mk package=postfix @@ -33,26 +34,18 @@ bindir=${base}/usr/bin confdir=${base}/etc/postfix -SHELL=/bin/bash - -ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) -STRIP=y -endif - -PARALLEL_OPT= -ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) - NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) - PARALLEL_OPT=-j$(NUMJOBS) -endif - -CCARGS += -DDEBIAN -DHAS_PCRE -DHAS_LDAP -DUSE_LDAP_SASL \ - -DHAS_SQLITE -DMYORIGIN_FROM_FILE \ +CCARGS += -DDEBIAN \ + -DHAS_PCRE \ + -DHAS_LDAP \ + -DUSE_LDAP_SASL \ + -DHAS_SQLITE \ + -DMYORIGIN_FROM_FILE \ $(shell getconf LFS_CFLAGS) \ -DHAS_CDB \ -DHAS_LMDB \ -DHAS_MYSQL -I/usr/include/mysql \ -DHAS_PGSQL -I`pg_config --includedir` \ - -DHAS_SQLITE -I/usr/include \ + -DHAS_SQLITE \ -DHAS_SSL -I/usr/include/openssl \ -DUSE_SASL_AUTH -I/usr/include/sasl \ -DUSE_CYRUS_SASL \ @@ -63,45 +56,12 @@ 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 -.PHONY: build-arch build-indep -build: build-arch build-indep -build-arch: - $(checkdir) - ${MAKE} makefiles \ - CCARGS="${CCARGS}" \ - DEBUG='' \ - OPT="${CPPFLAGS} ${CFLAGS} ${LDFLAGS}" \ - PLUGIN_LD="${CC} -shared ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}" \ - AUXLIBS="${AUXLIBS}" \ - AUXLIBS_CDB="-lcdb" \ - AUXLIBS_LDAP="-lldap -llber" \ - AUXLIBS_LMDB="-llmdb" \ - AUXLIBS_MYSQL="-lmysqlclient" \ - AUXLIBS_PCRE="-lpcre" \ - AUXLIBS_PGSQL="-lpq" \ - AUXLIBS_SQLITE="-lsqlite3" \ - SHLIB_RPATH="-Wl,-rpath,/usr/lib/postfix ${LDFLAGS}" \ - 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/examples readme_directory=/usr/share/doc/postfix \ - html_directory=/usr/share/doc/postfix/html - @echo "blhc: ignore-line-regexp: .*for i in single_server\.o multi_server\.o trigger_server\.o master_proto\.o mail_flow\.o event_server\.o dgram_server\.o" - ${MAKE} ${PARALLEL_OPT} - # remove unreproducible paths from makedefs.out - # '-ffile-prefix-map=/tmp/reprotest.DMXrtR/const_build_path/const_build_path=.' - # 'SHLIB_ENV = LD_LIBRARY_PATH=/tmp/reprotest.DMXrtR/const_build_path/const_build_path/lib' - sed -i 's@\s\+-ffile-prefix-map=\S\+=.\s\+@ @g' conf/makedefs.out - sed -i 's@SHLIB_ENV = LD_LIBRARY_PATH=\S\+@SHLIB_ENV = /debian-build-path/lib@g' conf/makedefs.out - ${MAKE} manpages - sed "s:@@DISTRO@@:$(DISTRO):g" < debian/main.cf.in > conf/main.cf.debian - sed "s:@@DISTRO@@:$(DISTRO):g" < conf/main.cf > conf/main.cf.dist - touch build +%: + dh $@ -build-indep: - $(checkdir) + +override_dh_auto_configure: ${MAKE} makefiles \ CCARGS="${CCARGS}" \ DEBUG='' \ @@ -121,23 +81,33 @@ shlibs_directory=${CUR_DIR}/usr/lib/postfix manpage_directory=/usr/share/man \ sample_directory=/usr/share/doc/postfix/examples readme_directory=/usr/share/doc/postfix \ html_directory=/usr/share/doc/postfix/html + + +override_dh_auto_build: @echo "blhc: ignore-line-regexp: .*for i in single_server\.o multi_server\.o trigger_server\.o master_proto\.o mail_flow\.o event_server\.o dgram_server\.o" - ${MAKE} ${PARALLEL_OPT} + + dh_auto_build + # man/Makefile.in does not support parallel builds + dh_auto_build --no-parallel -- manpages + # remove unreproducible paths from makedefs.out # '-ffile-prefix-map=/tmp/reprotest.DMXrtR/const_build_path/const_build_path=.' # 'SHLIB_ENV = LD_LIBRARY_PATH=/tmp/reprotest.DMXrtR/const_build_path/const_build_path/lib' sed -i 's@\s\+-ffile-prefix-map=\S\+=.\s\+@ @g' conf/makedefs.out sed -i 's@SHLIB_ENV = LD_LIBRARY_PATH=\S\+@SHLIB_ENV = /debian-build-path/lib@g' conf/makedefs.out - ${MAKE} manpages + sed "s:@@DISTRO@@:$(DISTRO):g" < debian/main.cf.in > conf/main.cf.debian sed "s:@@DISTRO@@:$(DISTRO):g" < conf/main.cf > conf/main.cf.dist - touch build -install-indep: build-indep - dh_prep - dh_installdirs -i - install -m 0444 html/* $(docdir)/html; rm -f $(docdir)/html/Makefile.in - dh_installexamples -p ${docpkg} examples/{qmail-local,smtpd-policy} + +override_dh_auto_install: + # do nothing + + +override_dh_install-indep: + install -m 0644 html/* $(docdir)/html + rm -f $(docdir)/html/Makefile.in + dh_installexamples -p ${docpkg} examples/qmail-local examples/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 install -m 0444 RELEASE_NOTES $(docdir)/RELEASE_NOTES @@ -162,9 +132,8 @@ mkdir -m 755 -p $(base)-doc/etc/postfix/postfix-files.d install -m 644 meta/doc.files ${base}-doc/etc/postfix/postfix-files.d -install-arch: build-arch - dh_prep - dh_installdirs -a + +override_dh_install-arch: install lib/lib* $(libdir) install debian/postfix_groups.pl $(libdir) install -m 0644 meta/postfix-files $(confdir) @@ -178,7 +147,6 @@ grep -v $${j} $(confdir)/postfix-files > $(confdir)/postfix-files.$$ ; \ mv $(confdir)/postfix-files.$$ $(confdir)/postfix-files ; \ install lib/postfix-$${j}.so ${base}-$${j}/${plibdir} ; \ - ln -s postfix-$${j}.so ${base}-$${j}/${plibdir}/postfix-$${j}.so.1.0.1 ; \ done install libexec/[a-z]* ${base}/${plibdir}/sbin install bin/[a-z]* ${base}/${sbindir} @@ -206,7 +174,7 @@ install -m644 debian/postfix.ufw.profile debian/postfix/etc/ufw/applications.d/postfix install -m644 debian/rsyslog.conf debian/postfix/etc/rsyslog.d/postfix.conf install -m644 debian/postfix.insserv.conf debian/postfix/etc/insserv.conf.d/postfix - txt2man -t postfix-collate -r postfix-$(DEB_VERSION_UPSTREAM) -d $(date -s @$(SOURCE_DATE_EPOCH)) -s 1 auxiliary/collate/README > ${base}/usr/share/man/man1/postfix-collate.1 + txt2man -t postfix-collate -r postfix-$(DEB_VERSION_UPSTREAM) -d '$(shell date -s @$(SOURCE_DATE_EPOCH))' -s 1 auxiliary/collate/README > ${base}/usr/share/man/man1/postfix-collate.1 install man/man1/*.1 ${base}/usr/share/man/man1 install man/man5/*.5 ${base}/usr/share/man/man5 for j in ldap lmdb mysql pcre pgsql sqlite ; do \ @@ -239,78 +207,22 @@ install -m 644 -D debian/postfix.apport ${base}/usr/share/apport/package-hooks/postfix.py; \ fi -debian/vars: - cp debian/vars.in $@ -binary-indep: install-indep debian/vars - $(checkdir) - dh_installdocs -i -## dh_installexamples -i -## dh_installmenu -i -## dh_installcron -i - dh_installchangelogs -i - dh_installdebconf -i - dh_compress -i - dh_fixperms -i - dh_installdeb -i - for i in $$(sed -n '/^Package:/s/^.* //p' debian/control); do cat debian/vars >> debian/$$i.substvars; done - cat debian/vars.in >> debian/substvars - dh_gencontrol -i -## dh_makeshlibs -i - dh_md5sums -i - dh_builddeb -i - -binary-arch: install-arch debian/vars - $(checkdir) - - dh_installdocs -a -## dh_installexamples -a -## dh_installmenu -a -## dh_installcron -a - dh_installchangelogs -a - dh_installdebconf -a - dh_installsystemd -a - dh_installinit -a -## dh_movefiles -a - [ -n "$(STRIP)" ] || dh_strip -a - dh_compress -a - dh_fixperms -a - dh_makeshlibs -a - dh_installdeb -a - dh_shlibdeps -l -a - for i in $$(sed -n '/^Package:/s/^.* //p' debian/control); do cat debian/vars >> debian/$$i.substvars; done - cat debian/vars.in >> debian/substvars - if [ $(DISTRO) = Ubuntu ]; then echo postfix:Provides=default-mta >> debian/postfix.substvars; fi - dh_gencontrol -a -## dh_makeshlibs -a - dh_md5sums -a - dh_builddeb -a - -clean-preunpatch: - $(checkdir) - dh_clean build - test ! -d ${base} || rm -rf ${base} - $(MAKE) tidy - -clean: clean-preunpatch - rm -rf debian/{files*,vars,*substvars,*.debhelper} - find .. -maxdepth 1 -name $(package)*.asc -size 0 -exec rm -f {} ";" - rm -f debian/stamp-* conf/main.cf.debian conf/main.cf.dist meta/doc.files - rm -f debian/postfix-collate - -buildinfo: - @echo; dpkg -l gcc "libc6*" binutils ldso make dpkg-dev $(BUILDINFO) \ - | awk '$$1 == "ii" { printf("%s-%s\n", $$2, $$3) }' \ - | tee $(docdir)/buildinfo.Debian; echo - chmod 644 $(docdir)/buildinfo.Debian - -define checkdir - test -f debian/rules -endef +execute_before_dh_gencontrol: + for i in $$(dh_listpackages) ; do \ + cat debian/vars.in >> debian/$$i.substvars ; \ + done -# Below here is fairly generic really + if [ $(DISTRO) = Ubuntu ] ; then \ + echo postfix:Provides=default-mta >> debian/postfix.substvars ; \ + fi + + +override_dh_auto_clean: + ${MAKE} tidy -binary: binary-arch binary-indep + +# Below here is fairly generic really newtemplate: debconf-updatepo diff -Nru postfix-3.6.3/debian/source/lintian-overrides postfix-3.6.4/debian/source/lintian-overrides --- postfix-3.6.3/debian/source/lintian-overrides 1970-01-01 00:00:00.000000000 +0000 +++ postfix-3.6.4/debian/source/lintian-overrides 2022-03-19 07:55:46.000000000 +0000 @@ -0,0 +1,2 @@ +# Release is signed, so this is fine +postfix source: debian-watch-uses-insecure-uri ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-* diff -Nru postfix-3.6.3/debian/source/options postfix-3.6.4/debian/source/options --- postfix-3.6.3/debian/source/options 1970-01-01 00:00:00.000000000 +0000 +++ postfix-3.6.4/debian/source/options 2022-03-19 07:55:46.000000000 +0000 @@ -0,0 +1 @@ +extend-diff-ignore = "^html/" diff -Nru postfix-3.6.3/debian/update-libc.d postfix-3.6.4/debian/update-libc.d --- postfix-3.6.3/debian/update-libc.d 2022-01-05 03:13:51.000000000 +0000 +++ postfix-3.6.4/debian/update-libc.d 2022-03-19 07:55:46.000000000 +0000 @@ -6,7 +6,7 @@ QUEUEDIR="$(/usr/sbin/postconf -hx queue_directory 2>/dev/null || true)" if [ -n "$QUEUEDIR" ]; then - cp /etc/resolv.conf ${QUEUEDIR}/etc/resolv.conf + cp /etc/resolv.conf "${QUEUEDIR}/etc/resolv.conf" /usr/sbin/service postfix reload >/dev/null 2>&1 || exit 0 fi diff -Nru postfix-3.6.3/debian/upstream/signing-key.asc postfix-3.6.4/debian/upstream/signing-key.asc --- postfix-3.6.3/debian/upstream/signing-key.asc 2022-01-05 03:13:51.000000000 +0000 +++ postfix-3.6.4/debian/upstream/signing-key.asc 2022-03-19 07:55:46.000000000 +0000 @@ -1,5 +1,4 @@ -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.18 (FreeBSD) mQMuBFYZbx0RCADaN3/xzcSgTh/Zdpn5Ia0cRAGF/0ZKbd6azuiFTvXQd/JLZkYj DkNHHGZImtQhPf+aa7JXCUSqrbgvSyYOYUI6enx+W8RBzvYBWEccW1Ls4D7mxUmA @@ -21,134 +20,19 @@ o7QkV2lldHNlIFZlbmVtYSA8d2lldHNlQHBvcm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FMu7kqfQZrmHDozsKJezcKSTuFFJmcLztY+2SfN0iH2DNlbwfJ/g6jyCDz8 -s4EtAQCIIuOOvucABA0H/RN17RQfhJdNLhyvOmHq8xtHpc9ja+JCsn9/cvx9LjaP -Qeg/sqqpyjCED4cNNFPpw3InHi6dWG6ImdEkzKdyTgvMo1MV0eeuHibxFUDVrNeF -v3zYKR4/Hy97ETmhd3ny/t19kZh3osDHRq4uau00aGHn01Gxq5tFEFufrVhY27YI -ZpTmhn67Gspdf+BP92DCOou+IsPaljiuJd0TwU2OXrY+RJYTNANPttCoexqXEhba -M06kZehxFbeDUj2oFVwCZDiNDcQssKALM1fvC/Gp/HI2HDciKiSeiR8hDlQJavHx -U/0I/G5kLTeDfXIguf5b7MM8awhG8XeehmqP9RIauoeIYQQYEQgACQUCVhlvHQIb -DAAKCRAMC1kOgMoVp5aUAP9F2s2Qu/NTmAmLTKbBGTzJlR2JF1XfQOi8H0r6fNvA -4wD+OeVe1s+AlR80UoTb97YyuGvFvVr4xFm/Qk776pbAXLY= -=yZP5 ------END PGP PUBLIC KEY BLOCK----- ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: PGPfreeware 5.0i for non-commercial use - -mQENA0Ije1oAAAEIALlEqB1UICFF3dfwDij9LHtBhtiEfGnv0PL5rRmSJ4rA9pqs -oM3oc0nfgnB502XpeCkT1RW5ymQggEx7+8fXnWhNUAmNGPrbmWzymvrdr4XnPOoB -ODlnVYkc9Gt5BLRNSfuLbc1G3nH+FDzhpuJ5zqtb8RrYm5FOPU7eC9QnVoC2nXPW -fPfTWVXQoCOEuQQ3zZHEculWQYhRVgxI+CFZjWzWgwZq3wWi/nGGZcFYRtCfodH4 -UiP0lvj8tOEhD8vUGQKiQGwiw/BBbiCm5ZPcCkSOWxXbZTUrkfTzwse9Ka2blmgH -AhlySLtSD/tCX2ykzQEK9JJDw4++By9g8MErzZkABRG0JFdpZXRzZSBWZW5lbWEg -PHdpZXRzZUBwb3JjdXBpbmUub3JnPokBFQM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j5ElhM0A0+20Kh7GpcSFtozTqRl6HEVt4NSPagV +XAJkOI0NxCywoAszV+8L8an8cjYcNyIqJJ6JHyEOVAlq8fFT/Qj8bmQtN4N9ciC5 +/lvswzxrCEbxd56Gao/1Ehq6h4hhBBgRCAAJBQJWGW8dAhsMAAoJEAwLWQ6AyhWn +lpQA/0XazZC781OYCYtMpsEZPMmVHYkXVd9A6LwfSvp828DjAP455V7Wz4CVHzRS +hNv3tjK4a8W9WvjEWb9CTvvqlsBctg== +=5CH1 -----END PGP PUBLIC KEY BLOCK----- diff -Nru postfix-3.6.3/HISTORY postfix-3.6.4/HISTORY --- postfix-3.6.3/HISTORY 2021-11-07 23:12:28.000000000 +0000 +++ postfix-3.6.4/HISTORY 2022-01-14 21:21:16.000000000 +0000 @@ -25694,3 +25694,34 @@ previously occupied by the original message body. Problem report by Benoît Panizzon. + +20211115 + + Bugfix (introduced: 20210708): duplicate bounce_notice_recipient + entries in postconf output. The fix to send SMTP session + transcripts to bounce_notice_recipient was incomplete. + Reported by Vincent Lefevre. File: smtpd/smtpd.c. + +20211216 + + Bugfix (introduced: Postfix 3.0): the proxymap daemon did + not automatically authorize proxied maps inside pipemap + (example: pipemap:{proxy:maptype:mapname, ...}) or inside + unionmap. Problem reported by Mirko Vogt. Files: + proxymap/proxymap.c. + +20211220 + + Bugfix (introduced: Postfix 2.5): off-by-one error while + writing a string terminator. This code had passed all memory + corruption tests, presumably because it wrote over an + alignment padding byte, or over an adjacent character byte + that was never read. Reported by Robert Siemer. Files: + *qmgr/qmgr_feedback.c. + +20211223 + + Cleanup: added missing _maps parameter names to the + proxy_read_maps default value, based on output from the + mantools/missing-proxy-read-maps script. File: + global/mail_params.h. diff -Nru postfix-3.6.3/src/global/mail_params.h postfix-3.6.4/src/global/mail_params.h --- postfix-3.6.3/src/global/mail_params.h 2021-04-18 19:49:59.000000000 +0000 +++ postfix-3.6.4/src/global/mail_params.h 2022-01-12 00:35:25.000000000 +0000 @@ -2491,7 +2491,11 @@ " $" VAR_SMTPD_EHLO_DIS_MAPS \ " $" VAR_SMTPD_MILTER_MAPS \ " $" VAR_VIRT_GID_MAPS \ - " $" VAR_VIRT_UID_MAPS + " $" VAR_VIRT_UID_MAPS \ + " $" VAR_LOCAL_LOGIN_SND_MAPS \ + " $" VAR_PSC_REJ_FTR_MAPS \ + " $" VAR_SMTPD_REJ_FTR_MAPS \ + " $" VAR_TLS_SERVER_SNI_MAPS extern char *var_proxy_read_maps; #define VAR_PROXY_WRITE_MAPS "proxy_write_maps" diff -Nru postfix-3.6.3/src/global/mail_version.h postfix-3.6.4/src/global/mail_version.h --- postfix-3.6.3/src/global/mail_version.h 2021-11-07 22:32:00.000000000 +0000 +++ postfix-3.6.4/src/global/mail_version.h 2022-01-14 22:58:14.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 "20211107" -#define MAIL_VERSION_NUMBER "3.6.3" +#define MAIL_RELEASE_DATE "20220114" +#define MAIL_VERSION_NUMBER "3.6.4" #ifdef SNAPSHOT #define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE diff -Nru postfix-3.6.3/src/oqmgr/qmgr_feedback.c postfix-3.6.4/src/oqmgr/qmgr_feedback.c --- postfix-3.6.3/src/oqmgr/qmgr_feedback.c 2008-01-08 20:51:39.000000000 +0000 +++ postfix-3.6.4/src/oqmgr/qmgr_feedback.c 2021-12-22 22:49:37.000000000 +0000 @@ -109,7 +109,7 @@ double enum_val; char denom_str[30 + 1]; double denom_val; - char slash; + char slash[1 + 1]; char junk; char *fbck_name; char *fbck_val; @@ -135,7 +135,7 @@ fb->base = -1; /* assume error */ switch (sscanf(fbck_val, "%lf %1[/] %30s%c", - &enum_val, &slash, denom_str, &junk)) { + &enum_val, slash, denom_str, &junk)) { case 1: fb->index = QMGR_FEEDBACK_IDX_NONE; fb->base = enum_val; diff -Nru postfix-3.6.3/src/proxymap/proxymap.c postfix-3.6.4/src/proxymap/proxymap.c --- postfix-3.6.3/src/proxymap/proxymap.c 2021-02-17 00:07:26.000000000 +0000 +++ postfix-3.6.4/src/proxymap/proxymap.c 2021-12-23 22:37:41.000000000 +0000 @@ -232,6 +232,8 @@ #include #include #include +#include +#include /* Global library. */ @@ -295,6 +297,27 @@ #define STR(x) vstring_str(x) #define VSTREQ(x,y) (strcmp(STR(x),y) == 0) +/* get_nested_dict_name - return nested dictionary name pointer, or null */ + +static char *get_nested_dict_name(char *type_name) +{ + const struct { + const char *type_col; + ssize_t type_col_len; + } *prefix, prefixes[] = { + DICT_TYPE_UNION ":", (sizeof(DICT_TYPE_UNION ":") - 1), + DICT_TYPE_PIPE ":", (sizeof(DICT_TYPE_PIPE ":") - 1), + }; + +#define COUNT_OF(x) (sizeof(x)/sizeof((x)[0])) + + for (prefix = prefixes; prefix < prefixes + COUNT_OF(prefixes); prefix++) { + if (strncmp(type_name, prefix->type_col, prefix->type_col_len) == 0) + return (type_name + prefix->type_col_len); + } + return (0); +} + /* proxy_map_find - look up or open table */ static DICT *proxy_map_find(const char *map_type_name, int request_flags, @@ -660,41 +683,17 @@ return (dict_open(map, open_flags, dict_flags)); } -/* post_jail_init - initialization after privilege drop */ +/* authorize_proxied_maps - recursively authorize maps */ -static void post_jail_init(char *service_name, char **unused_argv) +static void authorize_proxied_maps(char *bp) { const char *sep = CHARS_COMMA_SP; const char *parens = CHARS_BRACE; - char *saved_filter; - char *bp; char *type_name; - /* - * Are we proxy writer? - */ - if (strcmp(service_name, MAIL_SERVICE_PROXYWRITE) == 0) - proxy_writer = 1; - else if (strcmp(service_name, MAIL_SERVICE_PROXYMAP) != 0) - msg_fatal("service name must be one of %s or %s", - MAIL_SERVICE_PROXYMAP, MAIL_SERVICE_PROXYMAP); - - /* - * Pre-allocate buffers. - */ - request = vstring_alloc(10); - request_map = vstring_alloc(10); - request_key = vstring_alloc(10); - request_value = vstring_alloc(10); - map_type_name_flags = vstring_alloc(10); - - /* - * Prepare the pre-approved list of proxied tables. - */ - saved_filter = bp = mystrdup(proxy_writer ? var_proxy_write_maps : - var_proxy_read_maps); - proxy_auth_maps = htable_create(13); while ((type_name = mystrtokq(&bp, sep, parens)) != 0) { + char *nested_info; + /* Maybe { maptype:mapname attr=value... } */ if (*type_name == parens[0]) { char *err; @@ -710,6 +709,22 @@ if ((type_name = mystrtokq(&type_name, sep, parens)) == 0) continue; } + /* Recurse into nested map (pipemap, unionmap). */ + if ((nested_info = get_nested_dict_name(type_name)) != 0) { + char *err; + + if (*nested_info != parens[0]) + continue; + /* Warn about blatant syntax error. */ + if ((err = extpar(&nested_info, parens, EXTPAR_FLAG_NONE)) != 0) { + msg_warn("bad %s parameter value: %s", + PROXY_MAP_PARAM_NAME(proxy_writer), err); + myfree(err); + continue; + } + authorize_proxied_maps(nested_info); + continue; + } if (strncmp(type_name, PROXY_COLON, PROXY_COLON_LEN)) continue; do { @@ -723,6 +738,39 @@ PROXY_MAP_PARAM_NAME(proxy_writer)); } } +} + +/* post_jail_init - initialization after privilege drop */ + +static void post_jail_init(char *service_name, char **unused_argv) +{ + char *saved_filter; + + /* + * Are we proxy writer? + */ + if (strcmp(service_name, MAIL_SERVICE_PROXYWRITE) == 0) + proxy_writer = 1; + else if (strcmp(service_name, MAIL_SERVICE_PROXYMAP) != 0) + msg_fatal("service name must be one of %s or %s", + MAIL_SERVICE_PROXYMAP, MAIL_SERVICE_PROXYMAP); + + /* + * Pre-allocate buffers. + */ + request = vstring_alloc(10); + request_map = vstring_alloc(10); + request_key = vstring_alloc(10); + request_value = vstring_alloc(10); + map_type_name_flags = vstring_alloc(10); + + /* + * Prepare the pre-approved list of proxied tables. + */ + saved_filter = mystrdup(proxy_writer ? var_proxy_write_maps : + var_proxy_read_maps); + proxy_auth_maps = htable_create(13); + authorize_proxied_maps(saved_filter); myfree(saved_filter); /* diff -Nru postfix-3.6.3/src/qmgr/qmgr_feedback.c postfix-3.6.4/src/qmgr/qmgr_feedback.c --- postfix-3.6.3/src/qmgr/qmgr_feedback.c 2008-01-08 20:51:44.000000000 +0000 +++ postfix-3.6.4/src/qmgr/qmgr_feedback.c 2021-12-22 22:49:37.000000000 +0000 @@ -109,7 +109,7 @@ double enum_val; char denom_str[30 + 1]; double denom_val; - char slash; + char slash[1 + 1]; char junk; char *fbck_name; char *fbck_val; @@ -135,7 +135,7 @@ fb->base = -1; /* assume error */ switch (sscanf(fbck_val, "%lf %1[/] %30s%c", - &enum_val, &slash, denom_str, &junk)) { + &enum_val, slash, denom_str, &junk)) { case 1: fb->index = QMGR_FEEDBACK_IDX_NONE; fb->base = enum_val; diff -Nru postfix-3.6.3/src/smtpd/smtpd.c postfix-3.6.4/src/smtpd/smtpd.c --- postfix-3.6.3/src/smtpd/smtpd.c 2021-07-24 21:43:57.000000000 +0000 +++ postfix-3.6.4/src/smtpd/smtpd.c 2021-11-15 13:42:43.000000000 +0000 @@ -6432,7 +6432,7 @@ VAR_EOD_CHECKS, DEF_EOD_CHECKS, &var_eod_checks, 0, 0, VAR_MAPS_RBL_DOMAINS, DEF_MAPS_RBL_DOMAINS, &var_maps_rbl_domains, 0, 0, VAR_RBL_REPLY_MAPS, DEF_RBL_REPLY_MAPS, &var_rbl_reply_maps, 0, 0, - VAR_BOUNCE_RCPT, DEF_ERROR_RCPT, &var_bounce_rcpt, 1, 0, + VAR_BOUNCE_RCPT, DEF_BOUNCE_RCPT, &var_bounce_rcpt, 1, 0, VAR_ERROR_RCPT, DEF_ERROR_RCPT, &var_error_rcpt, 1, 0, VAR_REST_CLASSES, DEF_REST_CLASSES, &var_rest_classes, 0, 0, VAR_CANONICAL_MAPS, DEF_CANONICAL_MAPS, &var_canonical_maps, 0, 0,