From ea03808c8f8d7ed67a0a9ed6d255e62338c02e9d Mon Sep 17 00:00:00 2001 From: Brennan Kinney <5098581+polarathene@users.noreply.github.com> Date: Wed, 28 May 2025 09:03:10 +1200 Subject: [PATCH] fix: `packages.sh` - Remove Postfix hostname workaround (#4493) --- CHANGELOG.md | 1 + target/scripts/build/packages.sh | 22 ++++------------------ 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d9e9a2e..af263fef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ All notable changes to this project will be documented in this file. The format - **Internal:** - The DMS _Config Volume_ (`/tmp/docker-mailserver`) will now ensure it's file tree is accessible for services when the volume was created with missing executable bit ([#4487](https://github.com/docker-mailserver/docker-mailserver/pull/4487)) + - Removed the build-time hostname workaround for Postfix as Debian has since patched their post-install script ([#4493](https://github.com/docker-mailserver/docker-mailserver/pull/4493)) ### Updates diff --git a/target/scripts/build/packages.sh b/target/scripts/build/packages.sh index cfd510de..ece78b2c 100644 --- a/target/scripts/build/packages.sh +++ b/target/scripts/build/packages.sh @@ -78,22 +78,6 @@ function _install_utils() { | tar -xz --directory /usr/local/bin --no-same-owner --strip-components=1 "${SWAKS_RELEASE}/swaks" } -function _install_postfix() { - _log 'debug' 'Installing Postfix' - - _log 'warn' 'Applying workaround for Postfix bug (see https://github.com/docker-mailserver/docker-mailserver/issues/2023#issuecomment-855326403)' - - # Debians postfix package has a post-install script that expects a valid FQDN hostname to work: - mv /bin/hostname /bin/hostname.bak - echo "echo 'docker-mailserver.invalid'" >/bin/hostname - chmod +x /bin/hostname - apt-get "${QUIET}" install --no-install-recommends postfix - mv /bin/hostname.bak /bin/hostname - - # Irrelevant - Debian's default `chroot` jail config for Postfix needed a separate syslog socket: - rm /etc/rsyslog.d/postfix.conf -} - function _install_packages() { _log 'debug' 'Installing all packages now' @@ -125,7 +109,7 @@ function _install_packages() { ) local POSTFIX_PACKAGES=( - pflogsumm postgrey postfix-ldap postfix-mta-sts-resolver + pflogsumm postgrey postfix postfix-ldap postfix-mta-sts-resolver postfix-pcre postfix-policyd-spf-python postsrsd ) @@ -266,11 +250,13 @@ function _post_installation_steps() { _log 'trace' 'Removing leftovers from APT' apt-get "${QUIET}" clean rm -rf /var/lib/apt/lists/* + + # Irrelevant - Debian's default `chroot` jail config for Postfix needed a separate syslog socket: + rm /etc/rsyslog.d/postfix.conf } _pre_installation_steps _install_utils -_install_postfix _install_packages _install_dovecot _install_rspamd