8,9 → 8,18 |
## 0 : no email autoregistration |
## 1 : PostFix is the SMTP server |
## 2 : PostFix relay to an other SMTP server |
## 2 : PostFix use an external email address (with SASL) |
## 3 : PostFix use an external email address (with Cyrus-SASL) |
########################################################################################### |
|
###################################################### |
## Email configuration examples (mode = 3) |
## common parameters : smtp_use_tls = yes, smtp_tls_security_level = encrypt, smtp_sasl_auth_enable = yes |
## common rules : 'myhostname' parameter should be the domain name of the sasl_email account |
########## smtp.free.fr:465 |
## smtp_sasl_security_option = noanonymous, relayhost = [smtp.free.fr]:465, smtp_tls_wrappermode = yes |
########## smtp.free.fr:587 |
## smtp_sasl_security_option = noanonymous, relayhost = [smtp.free.fr]:587, smtp_tls_wrappermode = no |
|
# ****** Paths ******* |
SED="/bin/sed -i" |
CONF_FILE="/usr/local/etc/alcasar.conf" |
166,8 → 175,9 |
else |
$SED "s/^smtp_tls_wrappermode =.*/smtp_tls_wrappermode = no/g" $POSTFIX_CONF_FILE |
fi |
if [ "$domainName" = "localdomain" ]; then # use a real domain name to avoid extern smtp server reject |
$SED "s/^myhostname =.*/myhostname = alcasar.net/g" $POSTFIX_CONF_FILE |
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 |