Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 3063 → Rev 3064

/scripts/alcasar-mail-install.sh
29,6 → 29,7
## 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"
185,12 → 186,8
else
$SED "s/^smtp_tls_wrappermode =.*/smtp_tls_wrappermode = no/g" $POSTFIX_CONF_FILE
fi
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
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
[ -d ${SASLPATH} ] || mkdir ${SASLPATH}
echo "[${smtpIP}]:${smtpPort} ${mailAddr}:${mailMdp}" > ${SASLPATH}/sasl_passwd
postmap ${SASLPATH}/sasl_passwd