Skip to content

Commit ea03808

Browse files
authored
fix: packages.sh - Remove Postfix hostname workaround (docker-mailserver#4493)
1 parent f6381d3 commit ea03808

2 files changed

Lines changed: 5 additions & 18 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ All notable changes to this project will be documented in this file. The format
1717

1818
- **Internal:**
1919
- 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))
20+
- 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))
2021

2122
### Updates
2223

target/scripts/build/packages.sh

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -78,22 +78,6 @@ function _install_utils() {
7878
| tar -xz --directory /usr/local/bin --no-same-owner --strip-components=1 "${SWAKS_RELEASE}/swaks"
7979
}
8080

81-
function _install_postfix() {
82-
_log 'debug' 'Installing Postfix'
83-
84-
_log 'warn' 'Applying workaround for Postfix bug (see https://github.com/docker-mailserver/docker-mailserver/issues/2023#issuecomment-855326403)'
85-
86-
# Debians postfix package has a post-install script that expects a valid FQDN hostname to work:
87-
mv /bin/hostname /bin/hostname.bak
88-
echo "echo 'docker-mailserver.invalid'" >/bin/hostname
89-
chmod +x /bin/hostname
90-
apt-get "${QUIET}" install --no-install-recommends postfix
91-
mv /bin/hostname.bak /bin/hostname
92-
93-
# Irrelevant - Debian's default `chroot` jail config for Postfix needed a separate syslog socket:
94-
rm /etc/rsyslog.d/postfix.conf
95-
}
96-
9781
function _install_packages() {
9882
_log 'debug' 'Installing all packages now'
9983

@@ -125,7 +109,7 @@ function _install_packages() {
125109
)
126110

127111
local POSTFIX_PACKAGES=(
128-
pflogsumm postgrey postfix-ldap postfix-mta-sts-resolver
112+
pflogsumm postgrey postfix postfix-ldap postfix-mta-sts-resolver
129113
postfix-pcre postfix-policyd-spf-python postsrsd
130114
)
131115

@@ -266,11 +250,13 @@ function _post_installation_steps() {
266250
_log 'trace' 'Removing leftovers from APT'
267251
apt-get "${QUIET}" clean
268252
rm -rf /var/lib/apt/lists/*
253+
254+
# Irrelevant - Debian's default `chroot` jail config for Postfix needed a separate syslog socket:
255+
rm /etc/rsyslog.d/postfix.conf
269256
}
270257

271258
_pre_installation_steps
272259
_install_utils
273-
_install_postfix
274260
_install_packages
275261
_install_dovecot
276262
_install_rspamd

0 commit comments

Comments
 (0)