Package: postfix Version: (not sure, but as found in Ubuntu 18.04 and 20.04)
The default chroot setting in postfix master.cf changed from 'y' to 'n' in postfix 3.0.0. But configure-instance.sh, which is used to start postfix by systemd (via postfix@.service) or by sysvinit (via /etc/init.d/postfix) assumes that a chroot setting of '-' in master.cf means 'run chrooted'. The effect of the bug is that if any line in master.cf using postfix >=3.0.0 specifies chroot of '-', configure-instance.sh sets up a load of stuff in the postqueue directory (usually /var/spool/postfix) none of which is needed. The attached patch for configure-instance.sh fixes this by checking the postfix version. Regards, Dominic
--- /var/tmp/configure-instance.sh 2018-10-11 23:15:25.000000000 +0300 +++ /usr/lib/postfix/configure-instance.sh 2020-05-03 12:14:53.953078537 +0300 @@ -37,0 +38,2 @@ +MAJOR_VER=$($POSTCONF -hx mail_version|cut -d. -f1) +[ $MAJOR_VER -ge 3 ] && CHROOT_TEST="[yY]" || CHROOT_TEST="[-yY]" @@ -39 +41 @@ -NEED_CHROOT=$(awk '/^[0-9a-z]/ && ($5 ~ "[-yY]") { print "y"; exit}' ${config_dir}/master.cf) +NEED_CHROOT=$(awk '/^[0-9a-z]/ && ($5 ~ "'"$CHROOT_TEST"'") { print "y"; exit}' ${config_dir}/master.cf)