From 48edbae1b354cca43ef5b0df2c43c38395fae357 Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Tue, 10 Dec 2013 12:18:08 +0000 Subject: Rewrite myhostname in /etc/postfix/main.cf in the install script This is necessary because the install script is also run on creating a new EC2 instance from the AMI in order to update the configuration with the new internal and external names; the hostname will be different in this case and otherwise myhostname wouldn't be rewritten. --- script/site-specific-install.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'script/site-specific-install.sh') diff --git a/script/site-specific-install.sh b/script/site-specific-install.sh index 8917fd577..7d47a5990 100755 --- a/script/site-specific-install.sh +++ b/script/site-specific-install.sh @@ -65,6 +65,11 @@ ensure_line_present \ "mydestination = $HOST, $(hostname --fqdn), localhost.localdomain, localhost" \ /etc/postfix/main.cf 644 +ensure_line_present \ + "^ *myhostname *=" \ + "myhostname = $(hostname --fqdn)" \ + /etc/postfix/main.cf 644 + ensure_line_present \ "^do-not-reply" \ "do-not-reply-to-this-address: :blackhole:" \ -- cgit v1.2.3