mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-07-21 19:24:46 +02:00
chore: packages.sh
- Revise Postfix hostname workaround
This commit is contained in:
parent
f6381d3bb0
commit
6ed1455ec1
1 changed files with 7 additions and 5 deletions
|
@ -83,12 +83,14 @@ function _install_postfix() {
|
||||||
|
|
||||||
_log 'warn' 'Applying workaround for Postfix bug (see https://github.com/docker-mailserver/docker-mailserver/issues/2023#issuecomment-855326403)'
|
_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:
|
# Debians postfix package has a post-install script that expects a valid FQDN hostname to work.
|
||||||
mv /bin/hostname /bin/hostname.bak
|
# Replace the hostname command to instead output temporary hostname that is fully-qualified:
|
||||||
echo "echo 'docker-mailserver.invalid'" >/bin/hostname
|
mv /usr/bin/hostname /usr/bin/hostname.bak
|
||||||
chmod +x /bin/hostname
|
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
|
apt-get "${QUIET}" install --no-install-recommends postfix
|
||||||
mv /bin/hostname.bak /bin/hostname
|
mv /usr/bin/hostname.bak /usr/bin/hostname
|
||||||
|
|
||||||
# Irrelevant - Debian's default `chroot` jail config for Postfix needed a separate syslog socket:
|
# Irrelevant - Debian's default `chroot` jail config for Postfix needed a separate syslog socket:
|
||||||
rm /etc/rsyslog.d/postfix.conf
|
rm /etc/rsyslog.d/postfix.conf
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue