Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
ca34c1b1
Commit
ca34c1b1
authored
Jun 07, 2014
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #68 from mkropat/protect-key
Protect private key from being world-readable
parents
3fa8e384
42bf6240
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
mail.sh
setup/mail.sh
+3
-2
No files found.
setup/mail.sh
View file @
ca34c1b1
...
@@ -217,11 +217,12 @@ tools/editconf.py /etc/dovecot/conf.d/10-ssl.conf \
...
@@ -217,11 +217,12 @@ tools/editconf.py /etc/dovecot/conf.d/10-ssl.conf \
"ssl_key=<
$STORAGE_ROOT
/ssl/ssl_private_key.pem"
\
"ssl_key=<
$STORAGE_ROOT
/ssl/ssl_private_key.pem"
\
# SSL CERTIFICATE
# SSL CERTIFICATE
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
# Generate a new private key if one doesn't already exist.
# Generate a new private key if one doesn't already exist.
openssl genrsa
-out
$STORAGE_ROOT
/ssl/ssl_private_key.pem 2048
# Set the umask so the key file is not world-readable.
(
umask
077
;
openssl genrsa
-out
$STORAGE_ROOT
/ssl/ssl_private_key.pem 2048
)
fi
fi
if
[
!
-f
$STORAGE_ROOT
/ssl/ssl_cert_sign_req.csr
]
;
then
if
[
!
-f
$STORAGE_ROOT
/ssl/ssl_cert_sign_req.csr
]
;
then
# Generate a certificate signing request if one doesn't already exist.
# Generate a certificate signing request if one doesn't already exist.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment