diff -Nru postfix-3.3.0/debian/changelog postfix-3.3.0/debian/changelog --- postfix-3.3.0/debian/changelog 2020-07-10 20:08:22.000000000 +0000 +++ postfix-3.3.0/debian/changelog 2021-08-12 12:43:19.000000000 +0000 @@ -1,3 +1,10 @@ +postfix (3.3.0-1ubuntu0.4) bionic; urgency=medium + + * d/postfix.postinst: tolerate search domain with a leading dot + (LP: #1906970) + + -- Paride Legovini Thu, 12 Aug 2021 14:43:19 +0200 + postfix (3.3.0-1ubuntu0.3) bionic; urgency=medium * d/p/fix_tls_deploy-server-cert.patch: handle missing opt arg (LP: #1881196) diff -Nru postfix-3.3.0/debian/control postfix-3.3.0/debian/control --- postfix-3.3.0/debian/control 2018-10-11 20:15:25.000000000 +0000 +++ postfix-3.3.0/debian/control 2021-08-12 12:43:19.000000000 +0000 @@ -1,7 +1,8 @@ Source: postfix Section: mail Priority: optional -Maintainer: LaMont Jones +Maintainer: Ubuntu Developers +XSBC-Original-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.3.0/debian/postfix.postinst postfix-3.3.0/debian/postfix.postinst --- postfix-3.3.0/debian/postfix.postinst 2018-10-11 20:15:25.000000000 +0000 +++ postfix-3.3.0/debian/postfix.postinst 2021-08-12 12:43:19.000000000 +0000 @@ -49,7 +49,7 @@ if [ $myhostname = ${myhostname%.*} ]; then if [ -f /etc/resolv.conf ]; then # The resolver uses the last one found, and ignores the rest - mydom=$(sed -n 's/^search[[:space:]]*\([^[:space:]]*\).*/\1/p;s/^domain[[:space:]]*\([^[:space:]]*\).*/\1/p' /etc/resolv.conf | tail -1) + mydom=$(sed -n 's/^search[[:space:]]*\.*\([^[:space:]]*\).*/\1/p;s/^domain[[:space:]]*\.*\([^[:space:]]*\).*/\1/p' /etc/resolv.conf | tail -1) myhostname="$myhostname${mydom:+.$mydom}" else myhostname="$myhostname.UNKNOWN"