home · contact · privacy
Replace hostname in postfix/main.cf with proper value on post-install.
authorChristian Heller <c.heller@plomlompom.de>
Sun, 7 Feb 2016 23:03:32 +0000 (00:03 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 7 Feb 2016 23:03:32 +0000 (00:03 +0100)
jessie_postinstall.sh
systemfiles/main.cf

index 587f30b35dbc3214b34b7d411a7eec49de051211..98e8a8182b51b04ddecd2233df61b00628b3fbab 100755 (executable)
@@ -182,6 +182,7 @@ if [ "$1" = "server" ]; then
     DEBIAN_FRONTEND=noninteractive apt-get -y install getmail4 procmail mutt \
         postfix maildrop
     cp config/systemfiles/main.cf /etc/postfix/main.cf
+    sed -i 's/HOSTNAME/'.$2.'/g' /etc/postfix/main.cf
     cp config/systemfiles/aliases /etc/aliases
     newaliases
     service postfix restart
index bcb733c1d171f00f857a9bf78a014ac9c5b809c2..f1a7a8d38f28556d7c78da44254799c6eeff2559 100644 (file)
@@ -7,7 +7,7 @@ mailbox_command = /usr/bin/maildrop
 smtpd_relay_restrictions = permit_mynetworks defer_unauth_destination
 
 # What domains to receive mail for: names of local server.
-mydestination = plomlompom.com, localhost
+mydestination = HOSTNAME, localhost
 
 # What clients to relay mail from: only local server.
 mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128