mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-07-18 01:30:55 +00:00
mail.sh OK : x10 duration of ssl certificate + double the encryption key
This commit is contained in:
parent
8a5bdc0213
commit
ebb0c04e40
@ -200,12 +200,12 @@ tools/editconf.py /etc/dovecot/conf.d/10-ssl.conf \
|
|||||||
# Create a self-signed certifiate.
|
# Create a self-signed certifiate.
|
||||||
mkdir -p $STORAGE_ROOT/ssl
|
mkdir -p $STORAGE_ROOT/ssl
|
||||||
if [ ! -f $STORAGE_ROOT/ssl/ssl_certificate.pem ]; then
|
if [ ! -f $STORAGE_ROOT/ssl/ssl_certificate.pem ]; then
|
||||||
openssl genrsa -des3 -passout pass:x -out /tmp/server.key 2048 # create key, but it has a password...
|
openssl genrsa -des3 -passout pass:x -out /tmp/server.key 4096 # create key, but it has a password...
|
||||||
openssl rsa -passin pass:x -in /tmp/server.key -out $STORAGE_ROOT/ssl/ssl_private_key.pem # remove password and save it to the right location
|
openssl rsa -passin pass:x -in /tmp/server.key -out $STORAGE_ROOT/ssl/ssl_private_key.pem # remove password and save it to the right location
|
||||||
rm /tmp/server.key # remove temporary password-laden key
|
rm /tmp/server.key # remove temporary password-laden key
|
||||||
openssl req -new -key $STORAGE_ROOT/ssl/ssl_private_key.pem -out $STORAGE_ROOT/ssl/ssl_cert_sign_req.csr \
|
openssl req -new -key $STORAGE_ROOT/ssl/ssl_private_key.pem -out $STORAGE_ROOT/ssl/ssl_cert_sign_req.csr \
|
||||||
-subj "/C=/ST=/L=/O=/CN=$PUBLIC_HOSTNAME"
|
-subj "/C=/ST=/L=/O=/CN=$PUBLIC_HOSTNAME"
|
||||||
openssl x509 -req -days 365 \
|
openssl x509 -req -days 3650 \
|
||||||
-in $STORAGE_ROOT/ssl/ssl_cert_sign_req.csr -signkey $STORAGE_ROOT/ssl/ssl_private_key.pem -out $STORAGE_ROOT/ssl/ssl_certificate.pem
|
-in $STORAGE_ROOT/ssl/ssl_cert_sign_req.csr -signkey $STORAGE_ROOT/ssl/ssl_private_key.pem -out $STORAGE_ROOT/ssl/ssl_certificate.pem
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -227,4 +227,3 @@ service dovecot restart
|
|||||||
ufw allow smtp
|
ufw allow smtp
|
||||||
ufw allow submission
|
ufw allow submission
|
||||||
ufw allow imaps
|
ufw allow imaps
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user