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
24edd5ce
Commit
24edd5ce
authored
Jun 03, 2014
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
the SSL CSR must be generated with a country code
parent
89730bd6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
mail.sh
setup/mail.sh
+8
-2
start.sh
setup/start.sh
+10
-0
No files found.
setup/mail.sh
View file @
24edd5ce
...
...
@@ -218,12 +218,18 @@ tools/editconf.py /etc/dovecot/conf.d/10-ssl.conf \
# SSL CERTIFICATE
# Create a self-signed certifiate.
mkdir
-p
$STORAGE_ROOT
/ssl
if
[
!
-f
$STORAGE_ROOT
/ssl/ssl_certificate.pem
]
;
then
# Generate a new private key if one doesn't already exist.
openssl genrsa
-out
$STORAGE_ROOT
/ssl/ssl_private_key.pem 2048
fi
if
[
!
-f
$STORAGE_ROOT
/ssl/ssl_cert_sign_req.csr
]
;
then
# Generate a certificate signing request if one doesn't already exist.
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=
$CSR_COUNTRY
/ST=/L=/O=/CN=
$PUBLIC_HOSTNAME
"
fi
if
[
!
-f
$STORAGE_ROOT
/ssl/ssl_certificate.pem
]
;
then
# Generate a SSL certificate by self-signing if a SSL certificate doesn't yet exist.
openssl x509
-req
-days
365
\
-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
...
...
setup/start.sh
View file @
24edd5ce
...
...
@@ -35,6 +35,15 @@ if [ -z "$PUBLIC_IP" ]; then
read
-e
-i
"
`
hostname
-i
`
"
-p
"Public IP: "
PUBLIC_IP
fi
if
[
-z
"
$CSR_COUNTRY
"
]
;
then
echo
echo
"Enter the two-letter, uppercase country code for where you"
echo
"live or where your organization is based. (This is used to"
echo
"create an SSL certificate.)"
echo
read
-e
-p
"Country Code: "
CSR_COUNTRY
fi
# Create the user named "user-data" and store all persistent user
# data (mailboxes, etc.) in that user's home directory.
if
[
-z
"
$STORAGE_ROOT
"
]
;
then
...
...
@@ -50,6 +59,7 @@ cat > /etc/mailinabox.conf << EOF;
STORAGE_ROOT=
$STORAGE_ROOT
PUBLIC_HOSTNAME=
$PUBLIC_HOSTNAME
PUBLIC_IP=
$PUBLIC_IP
CSR_COUNTRY=
$CSR_COUNTRY
EOF
# For docker, we don't want any of our scripts to start daemons.
...
...
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