grml-hostname: adjust mydestination as well in /etc/postfix/main.cf 1.0.9
authorMichael Prokop <mika@grml.org>
Wed, 11 Jul 2007 19:32:07 +0000 (21:32 +0200)
committerMichael Prokop <mika@grml.org>
Wed, 11 Jul 2007 19:32:07 +0000 (21:32 +0200)
debian/changelog
usr_sbin/grml-hostname

index d013d03..fa90776 100644 (file)
@@ -1,3 +1,9 @@
+grml-scripts (1.0.9) unstable; urgency=low
+
+  * grml-hostname: adjust mydestination as well in /etc/postfix/main.cf.
+
+ -- Michael Prokop <mika@grml.org>  Wed, 11 Jul 2007 21:31:52 +0200
+
 grml-scripts (1.0.8) unstable; urgency=low
 
   * cpufreq-detect.sh: merge in code from /etc/init.d/loadcpufreq for
index 644b798..c844a44 100755 (executable)
@@ -43,6 +43,7 @@ case $retval in
      sed -i "s/^::1[ \t]*ip6-localhost ip6-loopback[ \t]*$OLDHOSTNAME/::1     ip6-localhost ip6-loopback $HOSTNAME/" /etc/hosts
      POSTFIX=''
      if [ -r /etc/postfix/main.cf ] ; then
+       sed -i "s/^mydestination = .*/mydestination = $HOSTNAME, localhost, localhost.localdomain/" /etc/postfix/main.cf && \
        sed -i "s/^myhostname = .*/myhostname = $HOSTNAME/" /etc/postfix/main.cf && POSTFIX='
 Configuration of myhostname in /etc/postfix/main.cf has been adjusted as well. Do not forget to restart postfix if necessary.'
      fi