From dc6a7e8450207b625dc1755826f34645e2af4fa4 Mon Sep 17 00:00:00 2001 From: Alan Garcia Date: Mon, 3 Mar 2014 08:51:12 +0000 Subject: [PATCH] Fix #1495 --- install/alternc.install | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install/alternc.install b/install/alternc.install index 74bcc59d..a95a5243 100644 --- a/install/alternc.install +++ b/install/alternc.install @@ -484,10 +484,12 @@ fi ####################################################################### # populate alternc database with the mailname used by postfix to send mail for each vhost # -mailname=`cat /etc/mailname` -mysql_query "update variable SET value='"$mailname"' where name='mailname_bounce';" +# If mailname does not exist, create it. Fix #1495 +test -e "/etc/mailname" || hostname -f > "/etc/mailname" # Allow for all the users to view /etc/mailname chmod +r "/etc/mailname" +mailname=`cat /etc/mailname` +mysql_query "update variable SET value='"$mailname"' where name='mailname_bounce';" ####################################################################### # Save installed files to check them during next install