# Creating condition for the bug:
ubuntu@bionic-postfix-1791139:~$ sudo sed -i 's/\(alias_.* =\).*/\1/g' /etc/postfix/main.cf
ubuntu@bionic-postfix-1791139:~$ sudo service postfix reload
ubuntu@bionic-postfix-1791139:~$
# reinstalling the same packages, showing the failures, one per package:
ubuntu@bionic-postfix-1791139:~$ sudo apt install postfix postfix-mysql postfix-cdb postfix-ldap postfix-lmdb postfix-pcre postfix-pgsql -y --reinstall
(...)
Setting up postfix-pcre (3.3.0-1ubuntu0.1) ...
Adding pcre map entry to /etc/postfix/dynamicmaps.cf
/var/lib/dpkg/info/postfix-pcre.postinst: 33: [: =: unexpected operator
Setting up postfix-mysql (3.3.0-1ubuntu0.1) ...
Adding mysql map entry to /etc/postfix/dynamicmaps.cf
/var/lib/dpkg/info/postfix-mysql.postinst: 33: [: =: unexpected operator
Setting up postfix-lmdb (3.3.0-1ubuntu0.1) ...
Adding lmdb map entry to /etc/postfix/dynamicmaps.cf
/var/lib/dpkg/info/postfix-lmdb.postinst: 34: [: =: unexpected operator
Setting up postfix-ldap (3.3.0-1ubuntu0.1) ...
Adding ldap map entry to /etc/postfix/dynamicmaps.cf
/var/lib/dpkg/info/postfix-ldap.postinst: 33: [: =: unexpected operator
Setting up postfix-pgsql (3.3.0-1ubuntu0.1) ...
Adding pgsql map entry to /etc/postfix/dynamicmaps.cf
/var/lib/dpkg/info/postfix-pgsql.postinst: 33: [: =: unexpected operator
Setting up postfix-cdb (3.3.0-1ubuntu0.1) ...
Adding cdb map entry to /etc/postfix/dynamicmaps.cf
/var/lib/dpkg/info/postfix-cdb.postinst: 33: [: =: unexpected operator
Processing triggers for libc-bin (2.27-3ubuntu1) ...
a) upgrading to the fixed packages
# Installing the fixed packages on top (I enabled universe for bionic-proposed because of lmdb):
ubuntu@bionic-postfix-1791139:~$ sudo apt install postfix postfix-mysql postfix-cdb postfix-ldap postfix-lmdb postfix-pcre postfix-pgsql -y
(...)
Setting up postfix-pcre (3.3.0-1ubuntu0.2) ...
Adding pcre map entry to /etc/postfix/dynamicmaps.cf
Setting up postfix-mysql (3.3.0-1ubuntu0.2) ...
Adding mysql map entry to /etc/postfix/dynamicmaps.cf
Setting up postfix-lmdb (3.3.0-1ubuntu0.2) ...
Adding lmdb map entry to /etc/postfix/dynamicmaps.cf
Setting up postfix-ldap (3.3.0-1ubuntu0.2) ...
Adding ldap map entry to /etc/postfix/dynamicmaps.cf
Setting up postfix-pgsql (3.3.0-1ubuntu0.2) ...
Adding pgsql map entry to /etc/postfix/dynamicmaps.cf
Setting up postfix-cdb (3.3.0-1ubuntu0.2) ...
Adding cdb map entry to /etc/postfix/dynamicmaps.cf
Processing triggers for libc-bin (2.27-3ubuntu1) ...
ubuntu@bionic-postfix-1791139:~$
Worked just fine.
b) fresh install scenario with the fixed packages
ubuntu@bionic-postfix-1791139:~$ sudo apt install postfix postfix-mysql postfix-cdb postfix-ldap postfix-lmdb postfix-pcre postfix-pgsql -y
...
ubuntu@bionic-postfix-1791139:~$ apt-cache policy postfix
postfix:
Installed: 3.3.0-1ubuntu0.2
Candidate: 3.3.0-1ubuntu0.2
Version table:
*** 3.3.0-1ubuntu0.2 500
500 http://br.archive.ubuntu.com/ubuntu bionic-proposed/main amd64 Packages
# creating the conditions for the bug:
ubuntu@bionic-postfix-1791139:~$ sudo sed -i 's/\(alias_.* =\).*/\1/g' /etc/postfix/main.cf
ubuntu@bionic-postfix-1791139:~$ sudo service postfix reload
ubuntu@bionic-postfix-1791139:~$
# now reinstalling the same packages:
ubuntu@bionic-postfix-1791139:~$ sudo apt install postfix postfix-mysql postfix-cdb postfix-ldap postfix-lmdb postfix-pcre postfix-pgsql -y --reinstall
(...)
Setting up postfix-pcre (3.3.0-1ubuntu0.2) ...
Adding pcre map entry to /etc/postfix/dynamicmaps.cf
Setting up postfix-mysql (3.3.0-1ubuntu0.2) ...
Adding mysql map entry to /etc/postfix/dynamicmaps.cf
Setting up postfix-lmdb (3.3.0-1ubuntu0.2) ...
Adding lmdb map entry to /etc/postfix/dynamicmaps.cf
Setting up postfix-ldap (3.3.0-1ubuntu0.2) ...
Adding ldap map entry to /etc/postfix/dynamicmaps.cf
Setting up postfix-pgsql (3.3.0-1ubuntu0.2) ...
Adding pgsql map entry to /etc/postfix/dynamicmaps.cf
Setting up postfix-cdb (3.3.0-1ubuntu0.2) ...
Adding cdb map entry to /etc/postfix/dynamicmaps.cf
Processing triggers for libc-bin (2.27-3ubuntu1) ...
ubuntu@bionic-postfix-1791139:~$
Bionic Verification
===================
First, reproducing the bug. Since the postinst of other postfix-* packages was also changed, I'm installing them as well, and not just postfix-mysql:
ubuntu@ bionic- postfix- 1791139: ~$ sudo apt install postfix postfix-mysql postfix-cdb postfix-ldap postfix-lmdb postfix-pcre postfix-pgsql -y
(...)
ubuntu@ bionic- postfix- 1791139: ~$ apt-cache policy postfix br.archive. ubuntu. com/ubuntu bionic-updates/main amd64 Packages
postfix:
Installed: 3.3.0-1ubuntu0.1
Candidate: 3.3.0-1ubuntu0.1
Version table:
*** 3.3.0-1ubuntu0.1 500
500 http://
# Creating condition for the bug: bionic- postfix- 1791139: ~$ sudo sed -i 's/\(alias_.* =\).*/\1/g' /etc/postfix/ main.cf bionic- postfix- 1791139: ~$ sudo service postfix reload bionic- postfix- 1791139: ~$
ubuntu@
ubuntu@
ubuntu@
# reinstalling the same packages, showing the failures, one per package:
ubuntu@ bionic- postfix- 1791139: ~$ sudo apt install postfix postfix-mysql postfix-cdb postfix-ldap postfix-lmdb postfix-pcre postfix-pgsql -y --reinstall dynamicmaps. cf dpkg/info/ postfix- pcre.postinst: 33: [: =: unexpected operator dynamicmaps. cf dpkg/info/ postfix- mysql.postinst: 33: [: =: unexpected operator dynamicmaps. cf dpkg/info/ postfix- lmdb.postinst: 34: [: =: unexpected operator dynamicmaps. cf dpkg/info/ postfix- ldap.postinst: 33: [: =: unexpected operator dynamicmaps. cf dpkg/info/ postfix- pgsql.postinst: 33: [: =: unexpected operator dynamicmaps. cf dpkg/info/ postfix- cdb.postinst: 33: [: =: unexpected operator
(...)
Setting up postfix-pcre (3.3.0-1ubuntu0.1) ...
Adding pcre map entry to /etc/postfix/
/var/lib/
Setting up postfix-mysql (3.3.0-1ubuntu0.1) ...
Adding mysql map entry to /etc/postfix/
/var/lib/
Setting up postfix-lmdb (3.3.0-1ubuntu0.1) ...
Adding lmdb map entry to /etc/postfix/
/var/lib/
Setting up postfix-ldap (3.3.0-1ubuntu0.1) ...
Adding ldap map entry to /etc/postfix/
/var/lib/
Setting up postfix-pgsql (3.3.0-1ubuntu0.1) ...
Adding pgsql map entry to /etc/postfix/
/var/lib/
Setting up postfix-cdb (3.3.0-1ubuntu0.1) ...
Adding cdb map entry to /etc/postfix/
/var/lib/
Processing triggers for libc-bin (2.27-3ubuntu1) ...
a) upgrading to the fixed packages bionic- postfix- 1791139: ~$ sudo apt install postfix postfix-mysql postfix-cdb postfix-ldap postfix-lmdb postfix-pcre postfix-pgsql -y dynamicmaps. cf dynamicmaps. cf dynamicmaps. cf dynamicmaps. cf dynamicmaps. cf dynamicmaps. cf bionic- postfix- 1791139: ~$
# Installing the fixed packages on top (I enabled universe for bionic-proposed because of lmdb):
ubuntu@
(...)
Setting up postfix-pcre (3.3.0-1ubuntu0.2) ...
Adding pcre map entry to /etc/postfix/
Setting up postfix-mysql (3.3.0-1ubuntu0.2) ...
Adding mysql map entry to /etc/postfix/
Setting up postfix-lmdb (3.3.0-1ubuntu0.2) ...
Adding lmdb map entry to /etc/postfix/
Setting up postfix-ldap (3.3.0-1ubuntu0.2) ...
Adding ldap map entry to /etc/postfix/
Setting up postfix-pgsql (3.3.0-1ubuntu0.2) ...
Adding pgsql map entry to /etc/postfix/
Setting up postfix-cdb (3.3.0-1ubuntu0.2) ...
Adding cdb map entry to /etc/postfix/
Processing triggers for libc-bin (2.27-3ubuntu1) ...
ubuntu@
Worked just fine.
b) fresh install scenario with the fixed packages bionic- postfix- 1791139: ~$ sudo apt install postfix postfix-mysql postfix-cdb postfix-ldap postfix-lmdb postfix-pcre postfix-pgsql -y bionic- postfix- 1791139: ~$ apt-cache policy postfix br.archive. ubuntu. com/ubuntu bionic- proposed/ main amd64 Packages
ubuntu@
...
ubuntu@
postfix:
Installed: 3.3.0-1ubuntu0.2
Candidate: 3.3.0-1ubuntu0.2
Version table:
*** 3.3.0-1ubuntu0.2 500
500 http://
# creating the conditions for the bug: bionic- postfix- 1791139: ~$ sudo sed -i 's/\(alias_.* =\).*/\1/g' /etc/postfix/ main.cf bionic- postfix- 1791139: ~$ sudo service postfix reload bionic- postfix- 1791139: ~$
ubuntu@
ubuntu@
ubuntu@
# now reinstalling the same packages: bionic- postfix- 1791139: ~$ sudo apt install postfix postfix-mysql postfix-cdb postfix-ldap postfix-lmdb postfix-pcre postfix-pgsql -y --reinstall dynamicmaps. cf dynamicmaps. cf dynamicmaps. cf dynamicmaps. cf dynamicmaps. cf dynamicmaps. cf bionic- postfix- 1791139: ~$
ubuntu@
(...)
Setting up postfix-pcre (3.3.0-1ubuntu0.2) ...
Adding pcre map entry to /etc/postfix/
Setting up postfix-mysql (3.3.0-1ubuntu0.2) ...
Adding mysql map entry to /etc/postfix/
Setting up postfix-lmdb (3.3.0-1ubuntu0.2) ...
Adding lmdb map entry to /etc/postfix/
Setting up postfix-ldap (3.3.0-1ubuntu0.2) ...
Adding ldap map entry to /etc/postfix/
Setting up postfix-pgsql (3.3.0-1ubuntu0.2) ...
Adding pgsql map entry to /etc/postfix/
Setting up postfix-cdb (3.3.0-1ubuntu0.2) ...
Adding cdb map entry to /etc/postfix/
Processing triggers for libc-bin (2.27-3ubuntu1) ...
ubuntu@
Worked just fine.
Verification succeeded.