Sauvegarde
This commit is contained in:
parent
dc48c390e3
commit
9bc98d11f6
@ -62,6 +62,8 @@ then
|
|||||||
echo "-- Installation du plugin postfix-mysql terminé !"
|
echo "-- Installation du plugin postfix-mysql terminé !"
|
||||||
apt-get install dovecot-core dovecot-imapd dovecot-lmtpd dovecot-mysql -y
|
apt-get install dovecot-core dovecot-imapd dovecot-lmtpd dovecot-mysql -y
|
||||||
echo "-- Installation de Dovecot terminé !"
|
echo "-- Installation de Dovecot terminé !"
|
||||||
|
apt-get install spamassassin spamc -y
|
||||||
|
echo "-- Installation de SpamAssassin terminé !"
|
||||||
apt-get install apache2 -y
|
apt-get install apache2 -y
|
||||||
echo "-- Installation de Apache terminé !"
|
echo "-- Installation de Apache terminé !"
|
||||||
apt-get install php php-mysql php-imap -y
|
apt-get install php php-mysql php-imap -y
|
||||||
@ -166,8 +168,13 @@ then
|
|||||||
echo -e "service imap-login {\n\tinet_listener imap {\n\t\tport = 143\n\t}\n\tinet_listener imaps {\n\t\tport = 993\n\t\tssl = yes\n\t}\n\tservice_count = 0\n}\nservice lmtp {\n\tunix_listener /var/spool/postfix/private/dovecot-lmtp {\n\t\tmode = 0600\n\t\tuser = postfix\n\t\tgroup = postfix\n\t}\n}\nservice auth {\n\tunix_listener auth-userdb {\n\t\tmode = 0600\n\t\tuser = vmail\n\t\tgroup = vmail\n\t}\n\tunix_listener /var/spool/postfix/private/auth {\n\t\tmode = 0666\n\t\tuser = postfix\n\t\tgroup = postfix\n\t}\n\tuser = dovecot\n}\nservice auth-worker {\n\tuser = vmail\n}" >> /etc/dovecot/conf.d/10-master.conf
|
echo -e "service imap-login {\n\tinet_listener imap {\n\t\tport = 143\n\t}\n\tinet_listener imaps {\n\t\tport = 993\n\t\tssl = yes\n\t}\n\tservice_count = 0\n}\nservice lmtp {\n\tunix_listener /var/spool/postfix/private/dovecot-lmtp {\n\t\tmode = 0600\n\t\tuser = postfix\n\t\tgroup = postfix\n\t}\n}\nservice auth {\n\tunix_listener auth-userdb {\n\t\tmode = 0600\n\t\tuser = vmail\n\t\tgroup = vmail\n\t}\n\tunix_listener /var/spool/postfix/private/auth {\n\t\tmode = 0666\n\t\tuser = postfix\n\t\tgroup = postfix\n\t}\n\tuser = dovecot\n}\nservice auth-worker {\n\tuser = vmail\n}" >> /etc/dovecot/conf.d/10-master.conf
|
||||||
echo "" > /etc/dovecot/conf.d/10-ssl.conf
|
echo "" > /etc/dovecot/conf.d/10-ssl.conf
|
||||||
echo -e "ssl = required\nssl_cert = </etc/ssl/certs/mailserver.crt\nssl_key = </etc/ssl/private/mailserver.key\nssl_dh_parameters_length = 2048\nssl_protocols = !SSLv3\nssl_cipher_list = ALL:!aNULL:!eNULL:!LOW:!MEDIUM:!EXP:!RC2:!RC4:!DES:!3DES:!MD5:!PSK:!SRP:!DSS:!AECDH:!ADH:@STRENGTH\nssl_prefer_server_ciphers = yes" >> /etc/dovecot/conf.d/10-ssl.conf
|
echo -e "ssl = required\nssl_cert = </etc/ssl/certs/mailserver.crt\nssl_key = </etc/ssl/private/mailserver.key\nssl_dh_parameters_length = 2048\nssl_protocols = !SSLv3\nssl_cipher_list = ALL:!aNULL:!eNULL:!LOW:!MEDIUM:!EXP:!RC2:!RC4:!DES:!3DES:!MD5:!PSK:!SRP:!DSS:!AECDH:!ADH:@STRENGTH\nssl_prefer_server_ciphers = yes" >> /etc/dovecot/conf.d/10-ssl.conf
|
||||||
|
echo "#################################"
|
||||||
|
echo "# Configuration de SpamAssassin #"
|
||||||
|
echo "#################################"
|
||||||
|
echo "" > /etc/spamassassin/local.cf
|
||||||
|
echo -e "rewrite_header Subject *****SPAM*****\n\nifplugin Mail::SpamAssassin::Plugin::Shortcircuit\n\nendif # Mail::SpamAssassin::Plugin::Shortcircuit\n\nreport_safe 0\nwhitelist_auth *@$DOMAIN\n\nadd_header all Report _REPORT_\nadd_header spam Flag _YESNOCAPS_\nadd_header all Status _YESNO_, score=_SCORE_ required=_REQD_ tests=_TESTS_ autolearn=_AUTOLEARN_ version=_VERSION_\nadd_header all Level _STARS(*)_\nadd_header all Checker-Version SpamAssassin _VERSION_ (_SUBVERSION_) on _HOSTNAME_" >> /etc/spamassassin/local.cf
|
||||||
|
echo "" > /etc/default/spamassassin
|
||||||
|
echo -e "ENABLED=0\nOPTIONS=\"--create-prefs --max-children 5 --helper-home-dir\"\nPIDFILE=\"/var/run/spamd.pid\"\nCRON=0\n" >> /etc/default/spamassassin
|
||||||
|
|
||||||
|
|
||||||
echo "#############################"
|
echo "#############################"
|
||||||
@ -217,10 +224,18 @@ echo "# Redémarrage des services #"
|
|||||||
echo "############################"
|
echo "############################"
|
||||||
if [ $MAIL == 'O' ];
|
if [ $MAIL == 'O' ];
|
||||||
then
|
then
|
||||||
|
systemctl enable postfix.service
|
||||||
|
echo "-- Postfix activé !"
|
||||||
service postfix restart
|
service postfix restart
|
||||||
echo "-- Postfix redémarré !"
|
echo "-- Postfix redémarré !"
|
||||||
|
systemctl enable dovecot.service
|
||||||
|
echo "-- Dovecot activé !"
|
||||||
service dovecot restart
|
service dovecot restart
|
||||||
echo "-- dovecot redémarré !"
|
echo "-- Dovecot redémarré !"
|
||||||
|
systemctl enable spamassassin.service
|
||||||
|
echo "-- SpamAssassin activé !"
|
||||||
|
service spamassassin restart
|
||||||
|
echo "-- SpamAssassin redémarré !"
|
||||||
fi
|
fi
|
||||||
cd $SOURCE
|
cd $SOURCE
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user