/alcasar.sh |
---|
2134,17 → 2134,21 |
################################################################## |
mail_service() |
{ |
[ -e /etc/php.d/05_mail.ini.default ] || cp /etc/php.d/05_mail.ini /etc/php.d/05_mail.ini.default |
$SED "s?^mail.add_x_header =.*?mail.add_x_header = Off?g" /etc/php.d/05_mail.ini |
[ -e /etc/postfix/main.cf.orig ] || cp /etc/postfix/main.cf /etc/postfix/main.cf.orig |
$SED "s?^inet_protocols =.*?inet_protocols = ipv4?g" /etc/postfix/main.cf |
$SED "s?^smtp_tls_security_level =.*?smtp_tls_security_level = encrypt?g" /etc/postfix/main.cf |
cat << EOT >> /etc/postfix/main.cf |
smtp_use_tls = yes |
smtp_tls_wrappermode = yes |
smtp_sasl_auth_enable = yes |
smtp_sasl_security_options = noanonymous |
smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd |
relayhost = |
myhostname = $HOSTNAME.$DOMAIN |
smtp_tls_wrappermode = yes |
EOT |
chown -R postfix:postfix /var/lib/postfix |
$SED "s?^inet_protocols =.*?inet_protocols = ipv4?g" /etc/postfix/main.cf |
} # end of mail_service |
################################################################## |
/scripts/alcasar-mail-install.sh |
---|
15,10 → 15,20 |
## 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.free.fr:465 (expose mechanisms : PLAIN LOGIN CRAM-MD5 DIGEST-MD5) |
## smtp_sasl_security_option = noanonymous, relayhost = [smtp.free.fr]:465, smtp_tls_wrappermode = yes |
########## smtp.free.fr:587 |
########## smtp.free.fr:587 (expose mechanismes |
## smtp_sasl_security_option = noanonymous, relayhost = [smtp.free.fr]:587, smtp_tls_wrappermode = no |
########## smtp.orange.fr:465 (expose mechanisms : LOGIN PLAIN) |
## smtp_sasl_security_option = noanonymous, relayhost = [smtp.orange.fr]:465, smtp_tls_wrappermode = yes |
########## smtp.sfr.fr:465 (expose mechanisms : LOGIN PLAIN) |
## smtp_sasl_security_option = noanonymous, relayhost = [smtp.sfr.fr]:465, smtp_tls_wrappermode = yes |
########## smtp.laposte.net:465 (expose mechanisms : LOGIN PLAIN) |
## smtp_sasl_security_option = noanonymous, relayhost = [laposte.net]:465, smtp_tls_wrappermode = yes |
########## smtp.bbox.net:465 (expose mechanisms : LOGIN PLAIN) |
## 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 |
# ****** Paths ******* |
SED="/bin/sed -i" |
/web/acc/manager/htdocs/user_by_email.php |
---|
150,32 → 150,28 |
$mail_smtp_port = 465; |
break; |
case '2': |
$mail_smtp_ip = "smtp.live.com"; |
$mail_smtp_ip = "smtp.office365.com"; |
$mail_smtp_port = 587; |
break; |
case '3': |
$mail_smtp_ip = "smtp.office365.com"; |
$mail_smtp_port = 587; |
break; |
case '4': |
$mail_smtp_ip = "smtp.sfr.fr"; |
$mail_smtp_port = 465; |
break; |
case '5': |
case '4': |
$mail_smtp_ip = "smtp.free.fr"; |
$mail_smtp_port = 465; |
break; |
case '6': |
case '5': |
$mail_smtp_ip = "smtp.gmail.com"; |
$mail_smtp_port = 587; |
break; |
case '7': |
case '6': |
$mail_smtp_ip = "smtp.laposte.net"; |
$mail_smtp_port = 465; |
break; |
case '8': |
case '7': |
$mail_smtp_ip = "smtp.bbox.fr"; |
$mail_smtp_port = 587; |
$mail_smtp_port = 465; |
break; |
default: |
echo "Erreur dans la saisie !"; |
340,14 → 336,13 |
<dd> |
<select id="mail_server" name="mail_server" onchange="onMailStatusChange();"> |
<option value="1"<?= ($mail_smtp_ip == 'smtp.orange.fr') ? ' selected="selected"' : '' ?>>Orange</option> |
<option value="2"<?= ($mail_smtp_ip == 'smtp.live.com') ? ' selected="selected"' : '' ?>>Hotmail</option> |
<option value="3"<?= ($mail_smtp_ip == 'smtp.office365.com') ? ' selected="selected"' : '' ?>>Office365</option> |
<option value="4"<?= ($mail_smtp_ip == 'smtp.sfr.fr') ? ' selected="selected"' : '' ?>>SFR</option> |
<option value="5"<?= ($mail_smtp_ip == 'smtp.free.fr') ? ' selected="selected"' : '' ?>>Free</option> |
<option value="6"<?= ($mail_smtp_ip == 'smtp.gmail.com') ? ' selected="selected"' : '' ?>>Gmail</option> |
<option value="7"<?= ($mail_smtp_ip == 'smtp.laposte.net') ? ' selected="selected"' : '' ?>>Laposte</option> |
<option value="8"<?= ($mail_smtp_ip == 'smtp.bbox.fr') ? ' selected="selected"' : '' ?>>Bouygues</option> |
<option value="9">Personnalisé</option> |
<option value="2"<?= ($mail_smtp_ip == 'smtp.office365.com') ? ' selected="selected"' : '' ?>>Office365</option> |
<option value="3"<?= ($mail_smtp_ip == 'smtp.sfr.fr') ? ' selected="selected"' : '' ?>>SFR</option> |
<option value="4"<?= ($mail_smtp_ip == 'smtp.free.fr') ? ' selected="selected"' : '' ?>>Free</option> |
<option value="5"<?= ($mail_smtp_ip == 'smtp.gmail.com') ? ' selected="selected"' : '' ?>>Gmail</option> |
<option value="6"<?= ($mail_smtp_ip == 'smtp.laposte.net') ? ' selected="selected"' : '' ?>>Laposte</option> |
<option value="7"<?= ($mail_smtp_ip == 'smtp.bbox.fr') ? ' selected="selected"' : '' ?>>Bouygues</option> |
<option value="8">Personnalisé</option> |
</select> |
</dd> |
</dl> |
/web/email_registration_back.php |
---|
270,8 → 270,8 |
$subject = $l_subject; |
$message = "<!DOCTYPE html> |
<html> |
<head> |
<meta charset=\"UTF-8\" /> |
<head> |
<meta charset=\"utf-8\"> |
</head> |
<body> |
$l_hello,<br/> |
293,12 → 293,12 |
$subject = "New registration on ALCASAR"; |
$message = "<!DOCTYPE html> |
<html> |
<head> |
<meta charset=\"UTF-8\" /> |
<head> |
<meta charset=\"utf-8\"> |
</head> |
<body> |
Hello,<br/> |
<p>$l_automatic_mail<br/> |
Hello,<br> |
<p>$l_automatic_mail<br> |
<h3>A new registration on ALCASAR '$organism' has been made :</h3> |
<pre> |
@IP : $ip |