Browse Source

Hostname must be a FQDN, so checking and appening domain if not

master 3.7.2
Fábio Kaiser Rauber 2 years ago
parent
commit
ae2fdc9db8
  1. 7
      conf/postfix-service.sh

7
conf/postfix-service.sh

@ -5,6 +5,11 @@ function log {
} }
function serviceConf { function serviceConf {
# Check hostname variable
if [[ ! ${HOSTNAME} =~ \. ]]; then
HOSTNAME=$HOSTNAME.$DOMAIN
fi
# Substitute configuration # Substitute configuration
for VARIABLE in `env | cut -f1 -d=`; do for VARIABLE in `env | cut -f1 -d=`; do
VAR=${VARIABLE//:/_} VAR=${VARIABLE//:/_}
@ -41,7 +46,7 @@ function serviceStart {
/usr/sbin/postfix start-fg /usr/sbin/postfix start-fg
} }
export DOMAIN=${DOMAIN:-"localhost"} export DOMAIN=${DOMAIN:-"localdomain"}
export HOSTNAME=${HOSTNAME:-"localhost"} export HOSTNAME=${HOSTNAME:-"localhost"}
export MESSAGE_SIZE_LIMIT=${MESSAGE_SIZE_LIMIT:-"50000000"} export MESSAGE_SIZE_LIMIT=${MESSAGE_SIZE_LIMIT:-"50000000"}
export RELAYNETS=${RELAYNETS:-""} export RELAYNETS=${RELAYNETS:-""}

Loading…
Cancel
Save