diff --git a/etc/alternc/templates/dovecot/conf.d/96_ssl.conf b/etc/alternc/templates/dovecot/conf.d/96_ssl.conf new file mode 100644 index 00000000..f46e1f8e --- /dev/null +++ b/etc/alternc/templates/dovecot/conf.d/96_ssl.conf @@ -0,0 +1,5 @@ +# Don't change this file, it will be overwriten by alternc.install. +# Change ssl parameters in a file named 99_ssl.conf instead" + +ssl_cert = /etc/proftpd/modules.conf.alternc-new - mv /etc/proftpd/modules.conf.alternc-new /etc/proftpd/modules.conf - cp /etc/proftpd/modules.conf /etc/alternc/templates/proftpd/ - # We enable apache2 SSL : - if [ ! -L /etc/apache2/mods-enabled/ssl.load ] ; then - a2enmod ssl - s="apache2" - fi - if [ ! -h /etc/apache2/conf-available/alternc-ssl.conf ] && [ -e /etc/apache2/conf-available/ ]; then - ln -sf /etc/alternc/apache2-ssl.conf /etc/apache2/conf-available/alternc-ssl.conf - a2enconf alternc-ssl - s="apache2" - fi - # We enable dovecot SSL certificate instructions: (on wheezy we should use a new file in /etc/dovecot/conf.d/ ) - ( echo "# Don't change this file, it will be overwriten by alternc.install. Change ssl parameters in a file named 99_ssl.conf instead" ; echo "ssl_cert = /etc/dovecot/conf.d/96_ssl.conf - - else - # We disable proftpd tls module - cat /etc/proftpd/modules.conf | sed -e 's/^LoadModule mod_tls.c/#LoadModule mod_tls.c/' > /etc/proftpd/modules.conf.alternc-new - mv /etc/proftpd/modules.conf.alternc-new /etc/proftpd/modules.conf - cp /etc/proftpd/modules.conf /etc/alternc/templates/proftpd/ - - # We disable dovecot SSL certificate instructions: (on wheezy we should remove a file in /etc/dovecot/conf.d/ ) - ( echo "# Don't change this file, it will be overwriten by alternc.install. Change ssl parameters in a file named 99_ssl.conf instead" ; echo "ssl_cert = /etc/dovecot/conf.d/96_ssl.conf - - echo "SSL not configured" - echo "create a certificate in /etc/alternc/apache.pem and rerun alternc.install" - fi - if [ ! -h /etc/apache2/conf-available/alternc.conf ] && [ -e /etc/apache2/conf-available/ ]; then - ln -sf /etc/alternc/apache2.conf /etc/apache2/conf-available/alternc.conf - a2enconf alternc.conf - s="apache2" - fi - if [ -e /etc/apache2/sites-enabled/000-default.conf ]; then - a2dissite 000-default - s="apache2" + if [ ! -h /etc/apache2/conf-available/alternc-ssl.conf ] && [ -e /etc/apache2/conf-available/ ]; then + ln -sf /etc/alternc/apache2-ssl.conf /etc/apache2/conf-available/alternc-ssl.conf + a2enconf alternc-ssl fi + SERVICES="$SERVICES $s" fi @@ -424,28 +389,7 @@ else postfix_conf=/etc/alternc/postfix/postfix.cf fi grep -v '^\ *#' $postfix_conf |while read line ; do - if echo "$line" | grep -qi '^smtpd_tls_dcert_file' ;then - line_strip=`echo "$line"|tr -d '[:blank:]'` - pattern="*=" - cert_file=${line_strip#$pattern} - echo $cert_file - echo $line - echo $line_strip - if [ -e $cert_file ];then - postconf -e "$line" - else - echo -e "\033[31m*****************************************************" - echo "* The certificate file : $cert_file does not exists *" - echo "* If you want to be able to use SSL/TLS *" - echo "* please go to https://alternc.com/SSL *" - echo "* to get information on how to create a certificate *" - echo "* Finally relaunch alternc.install *" - echo "*****************************************************" - echo -e "\033[0m" - fi - else - postconf -e "$line" - fi + postconf -e "$line" done # Conviguring delivery used by Postfix