Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2993 → Rev 2994

/alcasar.sh
2130,7 → 2130,7
 
##################################################################
## "mail_service" ##
## - Install mail service for email registration method ##
## - Install Postfix conf for email registration method ##
##################################################################
mail_service()
{
2137,14 → 2137,14
[ -e /etc/postfix/main.cf.default ] || cp /etc/postfix/main.cf /etc/postfix/main.cf.default
cat << EOT >> /etc/postfix/main.cf
myhostname = $HOSTNAME.$DOMAIN
EOT
# Enable SASL authentication
smtp_sasl_auth_enable = yes
$SED "s?^smtp_sasl_auth_enable =.*?smtp_sasl_auth_enable = yes?g" /etc/postfix/main.cf
# Disallow methods that allow anonymous authentication
smtp_sasl_security_options = noanonymous
$SED "s?^smtp_sasl_security_options =.*?smtp_sasl_security_options = noanonymous?g" /etc/postfix/main.cf
# Location of sasl_passwd
smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd
EOT
# postfix banner anonymisation
$SED "s?^smtp_sasl_password_maps =.*?smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd?g" /etc/postfix/main.cf
# Banner anonymisation
$SED "s?^smtpd_banner =.*?smtpd_banner = \$myhostname ESMTP?g" /etc/postfix/main.cf
chown -R postfix:postfix /var/lib/postfix
} # end of mail_service