Stick with initial dovecot self-signed cert
This avoids possible letsencrypt initial install problems
This commit is contained in:
parent
74bd83ca08
commit
4c19fb89ba
|
@ -1285,24 +1285,11 @@ function configure_imap {
|
||||||
exit 48
|
exit 48
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $ONION_ONLY == 'no' ]]; then
|
if [[ "$(cert_exists dovecot)" == "0" ]]; then
|
||||||
# obtain a cert for the default domain
|
|
||||||
if [[ "$(cert_exists ${DEFAULT_DOMAIN_NAME} pem)" == "0" ]]; then
|
|
||||||
echo $'Obtaining certificate for the main domain'
|
|
||||||
create_site_certificate ${DEFAULT_DOMAIN_NAME} 'yes'
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
${PROJECT_NAME}-addcert -h dovecot --dhkey $DH_KEYLENGTH
|
${PROJECT_NAME}-addcert -h dovecot --dhkey $DH_KEYLENGTH
|
||||||
check_certificates dovecot
|
check_certificates dovecot
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$(cert_exists ${DEFAULT_DOMAIN_NAME} pem)" == "0" ]]; then
|
|
||||||
if [[ "$(cert_exists dovecot)" == "0" ]]; then
|
|
||||||
${PROJECT_NAME}-addcert -h dovecot --dhkey $DH_KEYLENGTH
|
|
||||||
check_certificates dovecot
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
chmod 600 /etc/shadow
|
chmod 600 /etc/shadow
|
||||||
chmod 600 /etc/gshadow
|
chmod 600 /etc/gshadow
|
||||||
groupadd default
|
groupadd default
|
||||||
|
@ -1321,25 +1308,11 @@ function configure_imap {
|
||||||
fi
|
fi
|
||||||
sed -i 's|#ssl =.*|ssl = required|g' /etc/dovecot/conf.d/10-ssl.conf
|
sed -i 's|#ssl =.*|ssl = required|g' /etc/dovecot/conf.d/10-ssl.conf
|
||||||
sed -i 's|ssl =.*|ssl = required|g' /etc/dovecot/conf.d/10-ssl.conf
|
sed -i 's|ssl =.*|ssl = required|g' /etc/dovecot/conf.d/10-ssl.conf
|
||||||
if [[ $ONION_ONLY == 'no' ]]; then
|
sed -i "s|#ssl_cert =.*|ssl_cert = </etc/ssl/certs/dovecot.crt|g" /etc/dovecot/conf.d/10-ssl.conf
|
||||||
if [[ "$(cert_exists ${DEFAULT_DOMAIN_NAME} pem)" == "1" ]]; then
|
sed -i "s|ssl_cert =.*|ssl_cert = </etc/ssl/certs/dovecot.crt|g" /etc/dovecot/conf.d/10-ssl.conf
|
||||||
sed -i "s|#ssl_cert =.*|ssl_cert = </etc/ssl/certs/${DEFAULT_DOMAIN_NAME}.pem|g" /etc/dovecot/conf.d/10-ssl.conf
|
sed -i "s|#ssl_key =.*|ssl_key = </etc/ssl/private/dovecot.key|g" /etc/dovecot/conf.d/10-ssl.conf
|
||||||
sed -i "s|ssl_cert =.*|ssl_cert = </etc/ssl/certs/${DEFAULT_DOMAIN_NAME}.pem|g" /etc/dovecot/conf.d/10-ssl.conf
|
sed -i "s|ssl_key =.*|ssl_key = </etc/ssl/private/dovecot.key|g" /etc/dovecot/conf.d/10-ssl.conf
|
||||||
else
|
sed -i "s|#ssl_dh_parameters_length.*|ssl_dh_parameters_length = ${DH_KEYLENGTH}|g" /etc/dovecot/conf.d/10-ssl.conf
|
||||||
sed -i "s|#ssl_cert =.*|ssl_cert = </etc/ssl/certs/${DEFAULT_DOMAIN_NAME}.crt|g" /etc/dovecot/conf.d/10-ssl.conf
|
|
||||||
sed -i "s|ssl_cert =.*|ssl_cert = </etc/ssl/certs/${DEFAULT_DOMAIN_NAME}.crt|g" /etc/dovecot/conf.d/10-ssl.conf
|
|
||||||
fi
|
|
||||||
sed -i "s|#ssl_key =.*|ssl_key = </etc/ssl/private/${DEFAULT_DOMAIN_NAME}.key|g" /etc/dovecot/conf.d/10-ssl.conf
|
|
||||||
sed -i "s|ssl_key =.*|ssl_key = </etc/ssl/private/${DEFAULT_DOMAIN_NAME}.key|g" /etc/dovecot/conf.d/10-ssl.conf
|
|
||||||
else
|
|
||||||
sed -i "s|#ssl_cert =.*|ssl_cert = </etc/ssl/certs/dovecot.crt|g" /etc/dovecot/conf.d/10-ssl.conf
|
|
||||||
sed -i "s|ssl_cert =.*|ssl_cert = </etc/ssl/certs/dovecot.crt|g" /etc/dovecot/conf.d/10-ssl.conf
|
|
||||||
sed -i "s|#ssl_key =.*|ssl_key = </etc/ssl/private/dovecot.key|g" /etc/dovecot/conf.d/10-ssl.conf
|
|
||||||
sed -i "s|ssl_key =.*|ssl_key = </etc/ssl/private/dovecot.key|g" /etc/dovecot/conf.d/10-ssl.conf
|
|
||||||
fi
|
|
||||||
if [[ "$(cert_exists ${DEFAULT_DOMAIN_NAME})" == "1" ]]; then
|
|
||||||
sed -i "s|#ssl_dh_parameters_length.*|ssl_dh_parameters_length = ${DH_KEYLENGTH}|g" /etc/dovecot/conf.d/10-ssl.conf
|
|
||||||
fi
|
|
||||||
sed -i 's/#ssl_prefer_server_ciphers.*/ssl_prefer_server_ciphers = yes/g' /etc/dovecot/conf.d/10-ssl.conf
|
sed -i 's/#ssl_prefer_server_ciphers.*/ssl_prefer_server_ciphers = yes/g' /etc/dovecot/conf.d/10-ssl.conf
|
||||||
sed -i "s|#ssl_protocols =.*|ssl_protocols = '$SSL_PROTOCOLS'|g" /etc/dovecot/conf.d/10-ssl.conf
|
sed -i "s|#ssl_protocols =.*|ssl_protocols = '$SSL_PROTOCOLS'|g" /etc/dovecot/conf.d/10-ssl.conf
|
||||||
sed -i "s|ssl_protocols =.*|ssl_protocols = '$SSL_PROTOCOLS'|g" /etc/dovecot/conf.d/10-ssl.conf
|
sed -i "s|ssl_protocols =.*|ssl_protocols = '$SSL_PROTOCOLS'|g" /etc/dovecot/conf.d/10-ssl.conf
|
||||||
|
|
Loading…
Reference in New Issue