From: Michael Prokop Date: Fri, 21 Nov 2008 11:36:05 +0000 (+0100) Subject: Adjust postfix configuration X-Git-Tag: v0.23~4 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=420ac27e61ea1add01319a4f666bd8fb9dc72bd1 Adjust postfix configuration --- diff --git a/chroot-script b/chroot-script index b5f1abe..072fb4c 100755 --- a/chroot-script +++ b/chroot-script @@ -253,6 +253,10 @@ hosts() { echo "Setting up /etc/hosts" echo "127.0.0.1 localhost $HOSTNAME" > /etc/hosts fi + + if [ -n "$HOSTNAME" ] ; then + sed -i "s/grml/$HOSTNAME/g" /etc/hosts + fi } # }}} @@ -329,7 +333,14 @@ hostname() { # adjust postfix configuration if [ -r /etc/postfix/main.cf ] ; then + # adjust hostname related options: sed -i "s/grml/$HOSTNAME/g" /etc/postfix/main.cf + sed -i "s/^myhostname = .*/myhostname = $HOSTNAME/" /etc/postfix/main.cf + sed -i "s/^mydestination = .*/mydestination = localdomain, localhost, localhost.localdomain, $HOSTNAME/" /etc/postfix/main.cf + + # listen on loopback interface only: + sed -i "s/^inet_interfaces = .*/inet_interfaces = loopback-only/" /etc/postfix/main.cf + grep inet_interfaces /etc/postfix/main.cf || echo 'inet_interfaces = loopback-only' >> /etc/postfix/main.cf fi fi } diff --git a/debian/changelog b/debian/changelog index 4b938b9..78bfe51 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,7 +24,9 @@ grml-debootstrap (0.23) unstable; urgency=low - do not create stage file at finalize() * Edit /etc/network/interfaces as well if the file exists already, we definitely need at least a loopback interface. - * Adjust hostname in /etc/postfix/main.cf. + * Adjust postfix configuration: + - modify hostname related options in /etc/postfix/main.cf + - listen on loopback interface by default (thanks for suggestion, gebi) * Unify the --bootappend option, it's not --boot_append (thanks for the hint, Tong Sun). * Support execution of further scripts via options --scripts and