Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 3064 → Rev 3063

/scripts/alcasar-mail-install.sh
29,7 → 29,6
## smtp_sasl_security_option = noanonymous, relayhost = [laposte.net]:465, smtp_tls_wrappermode = yes
########## smtp.gmail.com:587 (expose mechanisms : LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH)
## smtp_sasl_security_option = noanonymous, relayhost = [gmail.com]:587, smtp_tls_wrappermode = no
## In this case (gmail) the password must be an "application password" created via the gmail account manager (security tab)
 
# ****** Paths *******
SED="/bin/sed -i"
186,8 → 185,12
else
$SED "s/^smtp_tls_wrappermode =.*/smtp_tls_wrappermode = no/g" $POSTFIX_CONF_FILE
fi
domain_of_smtpIP=`echo $smtpIP|rev|cut -d '.' -f1-2|rev`
$SED "s/^myhostname =.*/myhostname = $domain_of_smtpIP/g" $POSTFIX_CONF_FILE # use the domain name of $mail_Addr to avoid extern smtp servers reject
if [ "$domainName" = "localdomain" ]; then # use the domain name of $mail_Addr to avoid extern smtp servers reject
domain_of_smtpIP=`echo $smtp_IP|rev|cut -d '.' -f1-2|rev`
$SED "s/^myhostname =.*/myhostname = $domain_of_smtpIP/g" $POSTFIX_CONF_FILE
else
$SED "s/^myhostname =.*/myhostname = $hostName.$domainName/g" $POSTFIX_CONF_FILE
fi
[ -d ${SASLPATH} ] || mkdir ${SASLPATH}
echo "[${smtpIP}]:${smtpPort} ${mailAddr}:${mailMdp}" > ${SASLPATH}/sasl_passwd
postmap ${SASLPATH}/sasl_passwd