mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-17 00:01:28 +02:00
chore: packages.sh
- Remove postfix hostname workaround
This commit is contained in:
parent
6ed1455ec1
commit
66315ad7c0
1 changed files with 4 additions and 20 deletions
|
@ -78,24 +78,6 @@ function _install_utils() {
|
||||||
| tar -xz --directory /usr/local/bin --no-same-owner --strip-components=1 "${SWAKS_RELEASE}/swaks"
|
| 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() {
|
function _install_packages() {
|
||||||
_log 'debug' 'Installing all packages now'
|
_log 'debug' 'Installing all packages now'
|
||||||
|
|
||||||
|
@ -127,7 +109,7 @@ function _install_packages() {
|
||||||
)
|
)
|
||||||
|
|
||||||
local POSTFIX_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
|
postfix-pcre postfix-policyd-spf-python postsrsd
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -268,11 +250,13 @@ function _post_installation_steps() {
|
||||||
_log 'trace' 'Removing leftovers from APT'
|
_log 'trace' 'Removing leftovers from APT'
|
||||||
apt-get "${QUIET}" clean
|
apt-get "${QUIET}" clean
|
||||||
rm -rf /var/lib/apt/lists/*
|
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
|
_pre_installation_steps
|
||||||
_install_utils
|
_install_utils
|
||||||
_install_postfix
|
|
||||||
_install_packages
|
_install_packages
|
||||||
_install_dovecot
|
_install_dovecot
|
||||||
_install_rspamd
|
_install_rspamd
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue