Use SWAG TLS for Mailrise #81
karlis-vagalis
started this conversation in
Show and tell
Replies: 1 comment 3 replies
-
I personally would connect to the Mailrise container by hostname/container name rather than IP address, but this is a fantastic guide regardless. Thanks for your contribution! |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Example:
Domain: example.com
Mailrise open port: 25
IP addr where Mailrise is running: 192.168.1.100
NGINX Mailrise port: 465
A short description to get SSL/TLS termination done by NGINX for Mailrise. As I could only find tutorial for Mailrise to use Traefik, I tried many ways to get it working with reverse proxy I use: NGINX (SWAG, linuxserver.io) flavour.
NGINX settings
As we are going to use NGINX
stream
to route requests to our domain on specific port to the machine running Mailrise, we should mount/etc/nginx/stream.d
folder of SWAG container (the conf files in this directory are loaded as streams for NGINX):In SWAG docker compose that would be additional entry for volumes and port:
Secondly, in the
<folder_of_your_choice>
we create a new file with.conf
ending, for example,mailrise.conf
In this file we enter:
Explained:
This server block will listen to port 465 running on NGINX machine and force SSL usage and will use already downloaded certificates for your domain name and pass them to the IP
192.168.1.100
and port25
where the Mailrise is running.Make sure to open that port for Mailrise container like:
Restart SWAG.
Try to send email to your domain name (examples.org) on port 465.
Also, do not forget to open router port 465 if you want to access Mailrise from outside the local network. Would not recommend. This tutorial is more for use in LAN where
example.org
is resolved by DNS to local address.Beta Was this translation helpful? Give feedback.
All reactions