Update README.md

This commit is contained in:
2025-06-17 13:38:30 +00:00
parent a2535f9867
commit 70767565bb

View File

@ -46,9 +46,10 @@
- [Stalwart UI First Logon and Configuration](#stalwart-ui-first-logon-and-configuration) - [Stalwart UI First Logon and Configuration](#stalwart-ui-first-logon-and-configuration)
- [Configuring Caddyfile](#configuring-caddyfile) - [Configuring Caddyfile](#configuring-caddyfile)
- [Configuring haproxy.cfg file](#configuring-haproxycfg-file) - [Configuring haproxy.cfg file](#configuring-haproxycfg-file)
- [Configuring Stalwarts .toml file](#configuring-stalwart-toml-file) - [Configuring Stalwarts .toml file](#configuring-stalwarts-toml-file)
- [Stalwart UI SSL and Domain Configuration](#stalwart-ui-ssl-and-domain-configuration) - [Stalwart UI SSL Configuration](#stalwart-ui-ssl-configuration)
- [Testing Mail Flow](#testint-mail-flow) - [Stalwart UI Domain Configuration](#stalwart-ui-domain-configuration)
- [Testing Mail Flow](#testing-mail-flow)
<br> <br>
@ -72,9 +73,9 @@
**6. You should already have your Caddyfile routing 'webmail.yourdomain.com' to port 680.** **6. You should already have your Caddyfile routing 'webmail.yourdomain.com' to port 680.**
**7. You should already have an smtp2go.com account created and setup.** **7. You should already have an <a href="https://smtp2go.com">SMTP2GO</a> account created and setup.**
**8. You should use an advanced text editor like Notepadd++ or something like it that's designed for coding.** **8. You should use an advanced text editor like <a href="https://notepad-plus-plus.org/downloads/">Notepadd++</a> or something like it that's designed for coding.**
**9. You should already have ports 25, 80, 110, 143, 443, 465, 587, 993, & 4190 opened inside your router pointing to your host machine's IP address.** **9. You should already have ports 25, 80, 110, 143, 443, 465, 587, 993, & 4190 opened inside your router pointing to your host machine's IP address.**
@ -104,7 +105,9 @@
* **We're also making HAProxy's container depend on Stalwart's container** * **We're also making HAProxy's container depend on Stalwart's container**
* **And finally we are creating a custom "hap-network" for all of these containers. Read the comments in the file and make any changes if needed.** * **And finally we are creating a custom "hap-network" for all of these containers.
* **If you need to make any changes of IP's or ports, you can do so in this file. If you're good with the assigned IP's and ports, then this file should be ready to rock n roll.**
<p align="center"> <p align="center">
<a href="https://tip.jhammah.com"> <a href="https://tip.jhammah.com">
@ -120,7 +123,9 @@
## stalwart.yml file ## stalwart.yml file
* **This is the stalwart.yml file. - IMPORTANT NOTE - The image was renamed by Stalwart recently so the image that we're pulling in the video is outdated. But don't worry, I updated the files that you can download.** * **This is the stalwart.yml file where we define all the differnt aspects of how we want this container to be built.
* **~ IMPORTANT NOTE ~ Due to Stalwart updating their image, I've made some adjustments in the yml file that you can download. It will look a little different than what is in the video but it will work better.**
* **The container will be named "stalwart"** * **The container will be named "stalwart"**
@ -132,6 +137,8 @@
* **We are adding this container to our custom "hap-network" and assign it a static IP address.** * **We are adding this container to our custom "hap-network" and assign it a static IP address.**
* **If you need to make any changes of IP's or ports, you can do so in this file. If you're good with the assigned IP's and ports, then this file should be ready to rock n roll.**
<p align="center"> <p align="center">
<a href="https://tip.jhammah.com"> <a href="https://tip.jhammah.com">
<picture> <picture>
@ -160,6 +167,8 @@
* **We are adding this container to our custom "hap-network".** * **We are adding this container to our custom "hap-network".**
* **If you need to make any changes of IP's or ports, you can do so in this file. If you're good with the assigned IP's and ports, then this file should be ready to rock n roll.**
<p align="center"> <p align="center">
<a href="https://tip.jhammah.com"> <a href="https://tip.jhammah.com">
<picture> <picture>
@ -201,7 +210,7 @@ docker-compose up -d
* **SMTP > Outbound > TLS. Disable DANE and MTA-STS. Save & Reload** * **SMTP > Outbound > TLS. Disable DANE and MTA-STS. Save & Reload**
* **Server > Network. Add your mail server's URL. Save & Reload** * **Server > Network. Add your mail server's URL as the Hostname. Save & Reload**
* **Click + Add and add the hap-network as a proxy network. Save & Reload** * **Click + Add and add the hap-network as a proxy network. Save & Reload**
@ -219,7 +228,11 @@ docker-compose up -d
## Configuring Caddyfile ## Configuring Caddyfile
* **This is the Caddyfile. This file tells Caddy what and how to do things.** * **This is an example of a working Caddyfile. This file tells Caddy what and how to do things. Make the appropriate changes and save it. Then restart Caddy so the changes can be applied.**
* **~ IMPORTANT NOTE ~ Due to Stalwart updating their image, I've made some adjustments in the Caddyfile that you can download. It will look a little different than what is in the video but it will work better.**
* **If you changed any IP's or ports in the yml files, they would need to be updated here. Otherwise, this file should be ready to rock n roll.**
<p align="center"> <p align="center">
<a href="https://tip.jhammah.com"> <a href="https://tip.jhammah.com">
@ -235,7 +248,11 @@ docker-compose up -d
## Configuring haproxy.cfg file ## Configuring haproxy.cfg file
* **Configuring haproxy.cfg file** * **This is HAProxy's configuration file which tells HAProxy what and how to do everything.**
* **~ IMPORTANT NOTE ~ Due to Stalwart updating their image, I've made some adjustments in HAProxy's configuration file that you can download. It will look a little different than what is in the video but it will work better.**
* **If you changed any IP's or ports in the yml files, they would need to be updated here. Otherwise, this file should be ready to rock n roll.**
<p align="center"> <p align="center">
<a href="https://tip.jhammah.com"> <a href="https://tip.jhammah.com">
@ -251,7 +268,17 @@ docker-compose up -d
## Configuring Stalwarts .toml file ## Configuring Stalwarts .toml file
* **Configuring Stalwarts .toml file** * **This is Stalwart's TOML file. Basically its configuration file. Here is where you can make any changes without going through the UI. This file is important because you can make changes in here that you CANNOT make in the UI, too.**
* **Update the server listener http bind port to 7080**
* **Tell Stalwart to listen to http proxy protocols**
* **Tell Stalwart to listen to imap tls proxy protocols**
* **Save the file and restart the Stalwart container.**
* **After making all the changes so far, you'll now ONLY be able to get to Stalwart's Admin UI and Mail Server via the subdomain you chose. Caddy will route your subdomain request to port 8404. HAProxy will be listening to port 8404 and then route it to 7080.**
<p align="center"> <p align="center">
<a href="https://tip.jhammah.com"> <a href="https://tip.jhammah.com">
@ -265,9 +292,53 @@ docker-compose up -d
<br> <br>
## Stalwart UI SSL and Domain Configuration ## Stalwart UI SSL Configuration
* **Stalwart UI SSL and Domain Configuration** * **Settings > TLS > ACME Providers. and make the following changes.**
* **Directory ID: lets**
* **Challenge type: DNS-01**
* **Contact type: something@yourdomain.com**
* **Contact email: mail.yourdomain.com**
* **DNS Provider: Cloudflare**
* **Secret: your_whole_cloudflare_api_token**
* **Save & Reload. Then restar the Stalwart container.**
<p align="center">
<a href="https://tip.jhammah.com">
<picture>
<img src="URL GOES HERE" alt="IMAGE GOES HERE" width="1280">
</picture>
</a>
</p>
<br>
<br>
## Stalwart UI Domain Configuration
* **Management > Directory > Domains and Create a new account.**
* **Domain name: yourdomain.com > Save changes**
* **Next to yourdomain.com, click the 3 dots and select View DNS Records.**
* **Copy everything under Zonefile and paste it into the blank txt file I provided in the download.**
* **Upload that Zonefile to Cloudflare's DNS records for your domain.**
* **Management > Directory > Accounts and Create a new account.**
* **Login name: something@yourdomain.com**
* **Save & Reload. Then restar the Stalwart container.**
<p align="center"> <p align="center">
<a href="https://tip.jhammah.com"> <a href="https://tip.jhammah.com">
@ -317,4 +388,4 @@ docker-compose up -d
<H1 align="center">Support the channel so I can make more tutorials!</h1> <H1 align="center">Support the channel so I can make more tutorials!</h1>
<H1 align="center"><a href="https://tip.jhammah.com">If this tutorial helped you out, feel free to buy me a coffee!</h1> <H1 align="center"><a href="https://tip.jhammah.com">If this tutorial helped you out, feel free to buy me a coffee!</a></h1>