diff --git a/target/scripts/build/packages.sh b/target/scripts/build/packages.sh index bfdf0a15..ece78b2c 100644 --- a/target/scripts/build/packages.sh +++ b/target/scripts/build/packages.sh @@ -78,24 +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. - # Replace the hostname command to instead output temporary hostname that is fully-qualified: - mv /usr/bin/hostname /usr/bin/hostname.bak - echo -e "#!/bin/bash\necho 'docker-mailserver.invalid'" >/usr/bin/hostname - chmod +x /usr/bin/hostname - # Install the postfix package, then restore the original hostname command afterwards: - apt-get "${QUIET}" install --no-install-recommends postfix - mv /usr/bin/hostname.bak /usr/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' @@ -127,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 ) @@ -268,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