mirror of
https://git.myvelabs.com/docker/myvemail.git
synced 2025-12-18 10:46:18 +00:00
Move dh.pem generation outside container
This commit is contained in:
parent
5b8d699ea7
commit
f0f3327b2d
2 changed files with 7 additions and 16 deletions
|
|
@ -1,22 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
# Generate ssl keys
|
||||
if [ ! -f /etc/ssl/dovecot/tls.pem ] || [ ! -f /etc/ssl/dovecot/tls.key ]
|
||||
# Check if keys exist
|
||||
if [ ! -f /etc/ssl/dovecot/tls.pem ] || [ ! -f /etc/ssl/dovecot/tls.key ] || [ ! -f /etc/ssl/dovecot/dh.pem ]
|
||||
then
|
||||
exit 1
|
||||
# mkdir -p /etc/ssl/dovecot/
|
||||
# openssl req \
|
||||
# -x509 \
|
||||
# -newkey rsa:4096 \
|
||||
# -sha512 \
|
||||
# -nodes \
|
||||
# -keyout /etc/ssl/dovecot/tls.key \
|
||||
# -out /etc/ssl/dovecot/tls.pem \
|
||||
# -subj "/CN=${MYVEMAIL_SUBDOMAIN}.${MYVEMAIL_DOMAIN}" \
|
||||
# -days 3650
|
||||
fi
|
||||
|
||||
# dh.pem
|
||||
[ -f /etc/ssl/dovecot/dh.pem ] || openssl dhparam -out /etc/ssl/dovecot/dh.pem 4096
|
||||
|
||||
# Permissions
|
||||
setfacl -R -m u:${MYVEMAIL_NGINX_USERGROUP}:rx /etc/ssl/dovecot/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue