Disable ssl when no certificate is set (Closes: #1083, #1085)

* Modified start-mailserver.sh with two new options for SSL certificate Configuration ():
+ ‘’ (empty string) modifies dovecot configs to allow plain text access
+ * (default) does nothing but warn with message ‘SSL configured by default’

* Updated README.md:
SSL_TYPE environment variable with unknown value will set SSL by default
This commit is contained in:
Andrey Likhodievskiy 2018-12-02 14:59:16 +03:00 committed by Johan Smits
parent 0fb4a6d082
commit a989d77a87
2 changed files with 16 additions and 1 deletions

View file

@ -953,6 +953,20 @@ function _setup_ssl() {
notify 'inf' "SSL configured with 'self-signed' certificates"
fi
;;
'' )
# $SSL_TYPE=empty, no SSL certificate, plain text access
# Dovecot configuration
sed -i -e 's~#disable_plaintext_auth = yes~disable_plaintext_auth = no~g' /etc/dovecot/conf.d/10-auth.conf
sed -i -e 's~ssl = required~ssl = yes~g' /etc/dovecot/conf.d/10-ssl.conf
notify 'inf' "SSL configured with plain text access"
;;
* )
# Unknown option, default behavior, no action is required
notify 'warn' "SSL configured by default"
;;
esac
}