[pve-devel] [PATCH installer] fix postfix installation
Stoiko Ivanov
s.ivanov at proxmox.com
Mon Oct 21 22:11:22 CEST 2019
by:
* running /usr/bin/newaliases (generating /etc/aliases.db)
* setting the compatibility_level to 2
** otherwise a warning was issued with broken aliases.db that the system
is using the backward compatible setting of $mydestination for $relay_domain
(see [0]).
Tested by installing from ISO and creating a cronjob which runs 'echo test'
every minute.
Thanks to Martin for reporting this!
[0] http://www.postfix.org/COMPATIBILITY_README.html#relay_domains
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
proxinstall | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/proxinstall b/proxinstall
index d9e2211..5d02b34 100755
--- a/proxinstall
+++ b/proxinstall
@@ -328,6 +328,8 @@ mynetworks = 127.0.0.0/8
inet_interfaces = loopback-only
recipient_delimiter = +
+compatibility_level = 2
+
_EOD
sub shellquote {
@@ -1641,6 +1643,8 @@ _EOD
syscmd("chroot $targetdir /usr/sbin/postfix check");
# cleanup mail queue
syscmd("chroot $targetdir /usr/sbin/postsuper -d ALL");
+ # create /etc/aliases.db (/etc/aliases is shipped in the base squashfs)
+ syscmd("chroot $targetdir /usr/bin/newaliases");
# enable NTP (timedatectl set-ntp true does not work without DBUS)
syscmd("chroot $targetdir /bin/systemctl enable systemd-timesyncd.service");
--
2.20.1
More information about the pve-devel
mailing list