Merge pull request #468 from dtwardow/flex_tls_filenames

TLS using configurable filenames
master
kaiyou 7 years ago committed by GitHub
commit a9e41960a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -22,11 +22,13 @@ if "HOST_ANTISPAM" not in args:
args["HOST_ANTISPAM"] = "antispam:11334" args["HOST_ANTISPAM"] = "antispam:11334"
# TLS configuration # TLS configuration
cert_name = os.getenv("TLS_CERT_FILENAME", default="cert.pem")
keypair_name = os.getenv("TLS_KEYPAIR_FILENAME", default="key.pem")
args["TLS"] = { args["TLS"] = {
"cert": ("/certs/cert.pem", "/certs/key.pem"), "cert": ("/certs/%s" % cert_name, "/certs/%s" % keypair_name),
"letsencrypt": ("/certs/letsencrypt/live/mailu/fullchain.pem", "letsencrypt": ("/certs/letsencrypt/live/mailu/fullchain.pem",
"/certs/letsencrypt/live/mailu/privkey.pem"), "/certs/letsencrypt/live/mailu/privkey.pem"),
"mail": ("/certs/cert.pem", "/certs/key.pem"), "mail": ("/certs/%s" % cert_name, "/certs/%s" % keypair_name),
"mail-letsencrypt": ("/certs/letsencrypt/live/mailu/fullchain.pem", "mail-letsencrypt": ("/certs/letsencrypt/live/mailu/fullchain.pem",
"/certs/letsencrypt/live/mailu/privkey.pem"), "/certs/letsencrypt/live/mailu/privkey.pem"),
"notls": None "notls": None

@ -107,10 +107,11 @@ Finish setting up TLS
Mailu relies heavily on TLS and must have a key pair and a certificate Mailu relies heavily on TLS and must have a key pair and a certificate
available, at least for the hostname configured in the ``.env`` file. available, at least for the hostname configured in the ``.env`` file.
If you set ``TLS_FLAVOR`` to ``cert`` or if then you must create a ``certs`` directory If you set ``TLS_FLAVOR`` to ``cert`` or ``mail`` then you must create a ``certs`` directory
in your root path and setup a key-certificate pair there: in your root path and setup a key-certificate pair there:
- ``cert.pem`` contains the certificate,
- ``key.pem`` contains the key pair. - ``cert.pem`` contains the certificate (override with ``TLS_CERT_FILENAME``),
- ``key.pem`` contains the key pair (override with ``TLS_KEYPAIR_FILENAME``).
Start Mailu Start Mailu
----------- -----------

Loading…
Cancel
Save