Set mailname at the same time as hostname
This commit is contained in:
parent
4406b117ea
commit
2f5deb0c01
|
@ -671,8 +671,6 @@ function install_email {
|
|||
return
|
||||
fi
|
||||
|
||||
echo "$DEFAULT_DOMAIN_NAME" > /etc/mailname
|
||||
|
||||
apt-get -y remove postfix
|
||||
apt-get -y install exim4 sasl2-bin swaks libnet-ssleay-perl procmail xinetd
|
||||
|
||||
|
|
|
@ -184,6 +184,7 @@ function set_hostname {
|
|||
|
||||
echo "$DEFAULT_DOMAIN_NAME" > /etc/hostname
|
||||
hostname $DEFAULT_DOMAIN_NAME
|
||||
echo "$DEFAULT_DOMAIN_NAME" > /etc/mailname
|
||||
|
||||
if grep -q "127.0.1.1" /etc/hosts; then
|
||||
sed -i "s/127.0.1.1.*/127.0.1.1 $DEFAULT_DOMAIN_NAME/g" /etc/hosts
|
||||
|
|
Loading…
Reference in New Issue