Skip to content

[BUG] Building on Ubuntu 21.10 failing to install postfix #2467

@NorseGaud

Description

@NorseGaud

Miscellaneous first checks

  • I checked that all ports are open and not blocked by my ISP / hosting provider.
  • I know that SSL errors are likely the result of a wrong setup on the user side and not caused by DMS itself. I'm confident my setup is correct.

Affected Component(s)

build

What happened and when does this occur?

`nathan@norsegaud-vm:~/docker-mailserver$ make clean all`



docker build -t mailserver-testing:ci . --build-arg VCS_VER=54e41d0 --build-arg VCS_REF=54e41d0
Sending build context to Docker daemon  543.7kB
Step 1/76 : FROM docker.io/debian:11-slim
11-slim: Pulling from library/debian
f7a1c6dad281: Pull complete 
Digest: sha256:d5cd7e54530a8523168473a2dcc30215f2c863bfa71e09f77f58a085c419155b
Status: Downloaded newer image for debian:11-slim
 ---> bfb07174f19e
Step 2/76 : ARG VCS_VER
 ---> Running in 1161b3dda1cc
Removing intermediate container 1161b3dda1cc
 ---> 9fcfe1bc3ace
Step 3/76 : ARG VCS_REF
 ---> Running in cf321e74ca7f
Removing intermediate container cf321e74ca7f
 ---> d6cf5a97132f
Step 4/76 : ARG DEBIAN_FRONTEND=noninteractive
 ---> Running in cd4636ef9e01
Removing intermediate container cd4636ef9e01
 ---> c38beb167c80
Step 5/76 : ARG FAIL2BAN_DEB_URL=https://github.com/fail2ban/fail2ban/releases/download/0.11.2/fail2ban_0.11.2-1.upstream1_all.deb
 ---> Running in 410baf31ff16
Removing intermediate container 410baf31ff16
 ---> 73db1c602963
Step 6/76 : ARG FAIL2BAN_DEB_ASC_URL=${FAIL2BAN_DEB_URL}.asc
 ---> Running in 168d066a0472
Removing intermediate container 168d066a0472
 ---> 726ec231d498
Step 7/76 : ARG FAIL2BAN_GPG_PUBLIC_KEY_ID=0x683BF1BEBD0A882C
 ---> Running in cc782fcaa6ae
Removing intermediate container cc782fcaa6ae
 ---> 95870487f43a
Step 8/76 : ARG FAIL2BAN_GPG_PUBLIC_KEY_SERVER=hkps://keyserver.ubuntu.com
 ---> Running in 5272610dff85
Removing intermediate container 5272610dff85
 ---> 3229a2eac11d
Step 9/76 : ARG FAIL2BAN_GPG_FINGERPRINT="8738 559E 26F6 71DF 9E2C  6D9E 683B F1BE BD0A 882C"
 ---> Running in 990630a338e1
Removing intermediate container 990630a338e1
 ---> b0170808a53c
Step 10/76 : LABEL org.opencontainers.image.version=${VCS_VER}
 ---> Running in 03783304cac0
Removing intermediate container 03783304cac0
 ---> cf23379c43fb
Step 11/76 : LABEL org.opencontainers.image.revision=${VCS_REF}
 ---> Running in 03aa9e036f48
Removing intermediate container 03aa9e036f48
 ---> 44f614c75e23
Step 12/76 : LABEL org.opencontainers.image.title="docker-mailserver"
 ---> Running in 650c01a440c2
Removing intermediate container 650c01a440c2
 ---> ddf2c2c05bc7
Step 13/76 : LABEL org.opencontainers.image.vendor="The Docker Mailserver Organization"
 ---> Running in 4c5f96a9b90c
Removing intermediate container 4c5f96a9b90c
 ---> 1204f8edaa50
Step 14/76 : LABEL org.opencontainers.image.authors="The Docker Mailserver Organization on GitHub"
 ---> Running in e37ad8f210ec
Removing intermediate container e37ad8f210ec
 ---> 3b5f8607f73f
Step 15/76 : LABEL org.opencontainers.image.licenses="MIT"
 ---> Running in fdee9045cb86
Removing intermediate container fdee9045cb86
 ---> 96cfcbd7db04
Step 16/76 : LABEL org.opencontainers.image.description="A fullstack but simple mail server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.). Only configuration files, no SQL database."
 ---> Running in b466f5875c32
Removing intermediate container b466f5875c32
 ---> accf11988059
Step 17/76 : LABEL org.opencontainers.image.url="https://github.com/docker-mailserver"
 ---> Running in 4de637e5bf8c
Removing intermediate container 4de637e5bf8c
 ---> 8eea386ff580
Step 18/76 : LABEL org.opencontainers.image.documentation="https://github.com/docker-mailserver/docker-mailserver/blob/master/README.md"
 ---> Running in 2e04ec74c05d
Removing intermediate container 2e04ec74c05d
 ---> b2a1370275c4
Step 19/76 : LABEL org.opencontainers.image.source="https://github.com/docker-mailserver/docker-mailserver"
 ---> Running in 343366a3113d
Removing intermediate container 343366a3113d
 ---> 872a4242dd20
Step 20/76 : ENV ENABLE_POSTGREY=0
 ---> Running in f6e4bf0a54a0
Removing intermediate container f6e4bf0a54a0
 ---> c07cb8cd7932
Step 21/76 : ENV FETCHMAIL_POLL=300
 ---> Running in eb5769763db9
Removing intermediate container eb5769763db9
 ---> 6816818ce316
Step 22/76 : ENV ONE_DIR=1
 ---> Running in 93f35e84e721
Removing intermediate container 93f35e84e721
 ---> 52d0e874ceee
Step 23/76 : ENV POSTGREY_AUTO_WHITELIST_CLIENTS=5
 ---> Running in 15f20de11f25
Removing intermediate container 15f20de11f25
 ---> b5a712bcb9bd
Step 24/76 : ENV POSTGREY_DELAY=300
 ---> Running in 415cf0e04cfd
Removing intermediate container 415cf0e04cfd
 ---> 9afa8c468f20
Step 25/76 : ENV POSTGREY_MAX_AGE=35
 ---> Running in 5554717f4b54
Removing intermediate container 5554717f4b54
 ---> a8df4615da3e
Step 26/76 : ENV POSTGREY_TEXT="Delayed by Postgrey"
 ---> Running in 2071e0a2970e
Removing intermediate container 2071e0a2970e
 ---> 5d96c63f4db0
Step 27/76 : ENV SASLAUTHD_MECHANISMS=pam
 ---> Running in 3ee94097ce78
Removing intermediate container 3ee94097ce78
 ---> cc84613208ec
Step 28/76 : ENV SASLAUTHD_MECH_OPTIONS=""
 ---> Running in 6df0e05be22e
Removing intermediate container 6df0e05be22e
 ---> f998ba655fd0
Step 29/76 : SHELL ["/bin/bash", "-o", "pipefail", "-c"]
 ---> Running in 6656a213e812
Removing intermediate container 6656a213e812
 ---> 3b54bfcbdb9e
Step 30/76 : RUN   apt-get -qq update &&   apt-get -qq install apt-utils 2>/dev/null &&   apt-get -qq dist-upgrade &&   apt-get -qq install postfix &&   apt-get -qq --no-install-recommends install   altermime amavisd-new apt-transport-https arj binutils bzip2 bsd-mailx   ca-certificates cabextract clamav clamav-daemon cpio curl   dbconfig-no-thanks dovecot-core dovecot-fts-xapian dovecot-imapd   dovecot-ldap dovecot-lmtpd dovecot-managesieved dovecot-pop3d   dovecot-sieve dovecot-solr dumb-init   ed fetchmail file gamin gnupg gzip iproute2 iptables   locales logwatch lhasa libdate-manip-perl libldap-common liblz4-tool   libmail-spf-perl libnet-dns-perl libsasl2-modules lrzip lzop   netcat-openbsd nomarch opendkim opendkim-tools opendmarc   pax pflogsumm postgrey p7zip-full postfix-ldap postfix-pcre   postfix-policyd-spf-python postsrsd pyzor   razor rpm2cpio rsyslog sasl2-bin spamassassin supervisor   unrar-free unzip uuid whois xz-utils &&   gpg --keyserver ${FAIL2BAN_GPG_PUBLIC_KEY_SERVER}     --recv-keys ${FAIL2BAN_GPG_PUBLIC_KEY_ID} 2>&1 &&   curl -Lkso fail2ban.deb ${FAIL2BAN_DEB_URL} &&   curl -Lkso fail2ban.deb.asc ${FAIL2BAN_DEB_ASC_URL} &&   FINGERPRINT="$(LANG=C gpg --verify   fail2ban.deb.asc fail2ban.deb 2>&1     | sed -n 's#Primary key fingerprint: \(.*\)#\1#p')" &&   if [[ -z ${FINGERPRINT} ]]; then     echo "ERROR: Invalid GPG signature!" >&2; exit 1; fi &&   if [[ ${FINGERPRINT} != "${FAIL2BAN_GPG_FINGERPRINT}" ]]; then     echo "ERROR: Wrong GPG fingerprint!" >&2; exit 1; fi &&   dpkg -i fail2ban.deb 2>&1 &&   rm fail2ban.deb fail2ban.deb.asc &&   apt-get -qq autoremove &&   apt-get -qq autoclean &&   apt-get -qq clean &&   rm -rf /var/lib/apt/lists/* &&   c_rehash 2>&1
 ---> Running in f7b78c1c0ec4
Selecting previously unselected package apt-utils.
(Reading database ... 6653 files and directories currently installed.)
Preparing to unpack .../apt-utils_2.2.4_amd64.deb ...
Unpacking apt-utils (2.2.4) ...
Setting up apt-utils (2.2.4) ...
Preconfiguring packages ...
Selecting previously unselected package libpython3.9-minimal:amd64.
(Reading database ... 6734 files and directories currently installed.)
Preparing to unpack .../libpython3.9-minimal_3.9.2-1_amd64.deb ...
Unpacking libpython3.9-minimal:amd64 (3.9.2-1) ...
Selecting previously unselected package libexpat1:amd64.
Preparing to unpack .../libexpat1_2.2.10-2+deb11u2_amd64.deb ...
Unpacking libexpat1:amd64 (2.2.10-2+deb11u2) ...
Selecting previously unselected package python3.9-minimal.
Preparing to unpack .../python3.9-minimal_3.9.2-1_amd64.deb ...
Unpacking python3.9-minimal (3.9.2-1) ...
Setting up libpython3.9-minimal:amd64 (3.9.2-1) ...
Setting up libexpat1:amd64 (2.2.10-2+deb11u2) ...
Setting up python3.9-minimal (3.9.2-1) ...
Selecting previously unselected package python3-minimal.
(Reading database ... 7028 files and directories currently installed.)
Preparing to unpack .../0-python3-minimal_3.9.2-3_amd64.deb ...
Unpacking python3-minimal (3.9.2-3) ...
Selecting previously unselected package media-types.
Preparing to unpack .../1-media-types_4.0.0_all.deb ...
Unpacking media-types (4.0.0) ...
Selecting previously unselected package libmpdec3:amd64.
Preparing to unpack .../2-libmpdec3_2.5.1-1_amd64.deb ...
Unpacking libmpdec3:amd64 (2.5.1-1) ...
Selecting previously unselected package libncursesw6:amd64.
Preparing to unpack .../3-libncursesw6_6.2+20201114-2_amd64.deb ...
Unpacking libncursesw6:amd64 (6.2+20201114-2) ...
Selecting previously unselected package readline-common.
Preparing to unpack .../4-readline-common_8.1-1_all.deb ...
Unpacking readline-common (8.1-1) ...
Selecting previously unselected package libreadline8:amd64.
Preparing to unpack .../5-libreadline8_8.1-1_amd64.deb ...
Unpacking libreadline8:amd64 (8.1-1) ...
Selecting previously unselected package libsqlite3-0:amd64.
Preparing to unpack .../6-libsqlite3-0_3.34.1-3_amd64.deb ...
Unpacking libsqlite3-0:amd64 (3.34.1-3) ...
Selecting previously unselected package libpython3.9-stdlib:amd64.
Preparing to unpack .../7-libpython3.9-stdlib_3.9.2-1_amd64.deb ...
Unpacking libpython3.9-stdlib:amd64 (3.9.2-1) ...
Selecting previously unselected package python3.9.
Preparing to unpack .../8-python3.9_3.9.2-1_amd64.deb ...
Unpacking python3.9 (3.9.2-1) ...
Selecting previously unselected package libpython3-stdlib:amd64.
Preparing to unpack .../9-libpython3-stdlib_3.9.2-3_amd64.deb ...
Unpacking libpython3-stdlib:amd64 (3.9.2-3) ...
Setting up python3-minimal (3.9.2-3) ...
Selecting previously unselected package python3.
(Reading database ... 7466 files and directories currently installed.)
Preparing to unpack .../00-python3_3.9.2-3_amd64.deb ...
Unpacking python3 (3.9.2-3) ...
Selecting previously unselected package cpio.
Preparing to unpack .../01-cpio_2.13+dfsg-4_amd64.deb ...
Unpacking cpio (2.13+dfsg-4) ...
Selecting previously unselected package netbase.
Preparing to unpack .../02-netbase_6.3_all.deb ...
Unpacking netbase (6.3) ...
Selecting previously unselected package openssl.
Preparing to unpack .../03-openssl_1.1.1k-1+deb11u1_amd64.deb ...
Unpacking openssl (1.1.1k-1+deb11u1) ...
Selecting previously unselected package ca-certificates.
Preparing to unpack .../04-ca-certificates_20210119_all.deb ...
Unpacking ca-certificates (20210119) ...
Selecting previously unselected package libgpm2:amd64.
Preparing to unpack .../05-libgpm2_1.20.7-8_amd64.deb ...
Unpacking libgpm2:amd64 (1.20.7-8) ...
Selecting previously unselected package libicu67:amd64.
Preparing to unpack .../06-libicu67_67.1-7_amd64.deb ...
Unpacking libicu67:amd64 (67.1-7) ...
Selecting previously unselected package libsasl2-modules-db:amd64.
Preparing to unpack .../07-libsasl2-modules-db_2.1.27+dfsg-2.1+deb11u1_amd64.deb ...
Unpacking libsasl2-modules-db:amd64 (2.1.27+dfsg-2.1+deb11u1) ...
Selecting previously unselected package libsasl2-2:amd64.
Preparing to unpack .../08-libsasl2-2_2.1.27+dfsg-2.1+deb11u1_amd64.deb ...
Unpacking libsasl2-2:amd64 (2.1.27+dfsg-2.1+deb11u1) ...
Selecting previously unselected package libsasl2-modules:amd64.
Preparing to unpack .../09-libsasl2-modules_2.1.27+dfsg-2.1+deb11u1_amd64.deb ...
Unpacking libsasl2-modules:amd64 (2.1.27+dfsg-2.1+deb11u1) ...
Selecting previously unselected package ssl-cert.
Preparing to unpack .../10-ssl-cert_1.1.0+nmu1_all.deb ...
Unpacking ssl-cert (1.1.0+nmu1) ...
Selecting previously unselected package postfix.
Preparing to unpack .../11-postfix_3.5.6-1+b1_amd64.deb ...
Unpacking postfix (3.5.6-1+b1) ...
Setting up media-types (4.0.0) ...
Setting up cpio (2.13+dfsg-4) ...
update-alternatives: using /bin/mt-gnu to provide /bin/mt (mt) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/mt.1.gz because associated file /usr/share/man/man1/mt-gnu.1.gz (of link group mt) doesn't exist
Setting up libgpm2:amd64 (1.20.7-8) ...
Setting up libicu67:amd64 (67.1-7) ...
Setting up libsqlite3-0:amd64 (3.34.1-3) ...
Setting up libsasl2-modules:amd64 (2.1.27+dfsg-2.1+deb11u1) ...
Setting up libsasl2-modules-db:amd64 (2.1.27+dfsg-2.1+deb11u1) ...
Setting up libncursesw6:amd64 (6.2+20201114-2) ...
Setting up libsasl2-2:amd64 (2.1.27+dfsg-2.1+deb11u1) ...
Setting up libmpdec3:amd64 (2.5.1-1) ...
Setting up netbase (6.3) ...
Setting up openssl (1.1.1k-1+deb11u1) ...
Setting up readline-common (8.1-1) ...
Setting up libreadline8:amd64 (8.1-1) ...
Setting up ca-certificates (20210119) ...
Updating certificates in /etc/ssl/certs...
129 added, 0 removed; done.
Setting up ssl-cert (1.1.0+nmu1) ...
Setting up postfix (3.5.6-1+b1) ...
Adding group `postfix' (GID 102) ...
Done.
Adding system user `postfix' (UID 101) ...
Adding new user `postfix' (UID 101) with group `postfix' ...
Not creating home directory `/var/spool/postfix'.
Creating /etc/postfix/dynamicmaps.cf
Adding group `postdrop' (GID 103) ...
Done.
setting myhostname: f7b78c1c0ec4..
setting alias maps
setting alias database
mailname is not a fully qualified domain name.  Not changing /etc/mailname.
setting destinations: $myhostname, f7b78c1c0ec4, localhost.localdomain, , localhost
setting relayhost: 
setting mynetworks: 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: all
setting inet_protocols: all
/etc/aliases does not exist, creating it.
WARNING: /etc/aliases exists, but does not have a root alias.

Postfix (main.cf) is now set up with a default configuration.  If you need to 
make changes, edit /etc/postfix/main.cf (and others) as needed.  To view 
Postfix configuration values, see postconf(1).

After modifying main.cf, be sure to run 'systemctl reload postfix'.

Running newaliases
newaliases: warning: valid_hostname: misplaced delimiter: f7b78c1c0ec4..
newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: f7b78c1c0ec4..
dpkg: error processing package postfix (--configure):
 installed postfix package post-installation script subprocess returned error exit status 75
Setting up libpython3.9-stdlib:amd64 (3.9.2-1) ...
Setting up libpython3-stdlib:amd64 (3.9.2-3) ...
Setting up python3.9 (3.9.2-1) ...
Setting up python3 (3.9.2-3) ...
Processing triggers for libc-bin (2.31-13+deb11u2) ...
Processing triggers for ca-certificates (20210119) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Errors were encountered while processing:
 postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)
The command '/bin/bash -o pipefail -c apt-get -qq update &&   apt-get -qq install apt-utils 2>/dev/null &&   apt-get -qq dist-upgrade &&   apt-get -qq install postfix &&   apt-get -qq --no-install-recommends install   altermime amavisd-new apt-transport-https arj binutils bzip2 bsd-mailx   ca-certificates cabextract clamav clamav-daemon cpio curl   dbconfig-no-thanks dovecot-core dovecot-fts-xapian dovecot-imapd   dovecot-ldap dovecot-lmtpd dovecot-managesieved dovecot-pop3d   dovecot-sieve dovecot-solr dumb-init   ed fetchmail file gamin gnupg gzip iproute2 iptables   locales logwatch lhasa libdate-manip-perl libldap-common liblz4-tool   libmail-spf-perl libnet-dns-perl libsasl2-modules lrzip lzop   netcat-openbsd nomarch opendkim opendkim-tools opendmarc   pax pflogsumm postgrey p7zip-full postfix-ldap postfix-pcre   postfix-policyd-spf-python postsrsd pyzor   razor rpm2cpio rsyslog sasl2-bin spamassassin supervisor   unrar-free unzip uuid whois xz-utils &&   gpg --keyserver ${FAIL2BAN_GPG_PUBLIC_KEY_SERVER}     --recv-keys ${FAIL2BAN_GPG_PUBLIC_KEY_ID} 2>&1 &&   curl -Lkso fail2ban.deb ${FAIL2BAN_DEB_URL} &&   curl -Lkso fail2ban.deb.asc ${FAIL2BAN_DEB_ASC_URL} &&   FINGERPRINT="$(LANG=C gpg --verify   fail2ban.deb.asc fail2ban.deb 2>&1     | sed -n 's#Primary key fingerprint: \(.*\)#\1#p')" &&   if [[ -z ${FINGERPRINT} ]]; then     echo "ERROR: Invalid GPG signature!" >&2; exit 1; fi &&   if [[ ${FINGERPRINT} != "${FAIL2BAN_GPG_FINGERPRINT}" ]]; then     echo "ERROR: Wrong GPG fingerprint!" >&2; exit 1; fi &&   dpkg -i fail2ban.deb 2>&1 &&   rm fail2ban.deb fail2ban.deb.asc &&   apt-get -qq autoremove &&   apt-get -qq autoclean &&   apt-get -qq clean &&   rm -rf /var/lib/apt/lists/* &&   c_rehash 2>&1' returned a non-zero code: 100
make: *** [Makefile:14: build] Error 100


### What did you expect to happen?

```Markdown
It to build the image

How do we replicate the issue?

Run the build on Ubuntu 21.10

DMS version

master branch

What operating system is DMS running on?

Linux

What instruction set architecture is DMS running on?

x86_64 / AMD64

What container orchestration tool are you using?

Docker

docker-compose.yml

No response

Relevant log output

No response

Other relevant information

No response

What level of experience do you have with Docker and mail servers?

  • I am inexperienced with docker
  • I am inexperienced with mail servers
  • I am uncomfortable with the CLI

Code of conduct

Improvements to this form?

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions