Update Servers/Email/Mailcow.md
All checks were successful
GitOps Automatic Deployment / GitOps Automatic Deployment (push) Successful in 5s

This commit is contained in:
2025-07-17 17:01:26 -06:00
parent b20afd9446
commit 94050b639e

View File

@ -44,6 +44,13 @@ docker-compose up -d
### Reverse-Proxy Configuration ### Reverse-Proxy Configuration
For the purposes of this document, it will be assumed that you are deploying Mailcow behind Traefik. You can use the following dynamic configuration file to achieve this: For the purposes of this document, it will be assumed that you are deploying Mailcow behind Traefik. You can use the following dynamic configuration file to achieve this:
```yaml title="/srv/containers/traefik/config/dynamic/mail.bunny-lab.io.yml" ```yaml title="/srv/containers/traefik/config/dynamic/mail.bunny-lab.io.yml"
# ========================
# Mailcow / Traefik Config
# ========================
# ----------------------------------------------------
# HTTP Section - Handles Mailcow web UI via Traefik
# ----------------------------------------------------
http: http:
routers: routers:
mailcow-server: mailcow-server:
@ -60,96 +67,124 @@ http:
- url: http://192.168.3.61:80 - url: http://192.168.3.61:80
passHostHeader: true passHostHeader: true
# ----------------------------------------------------
# TCP Section - Handles all mail protocols
# ----------------------------------------------------
tcp: tcp:
routers: routers:
# -----------
# SMTP Router (Port 25, non-TLS, all mail deliveries)
# -----------
mailcow-smtp: mailcow-smtp:
entryPoints: entryPoints:
- smtp - smtp
rule: "HostSNI(`mail.bunny-lab.io`)" rule: "" # Empty rule = accept ALL connections on port 25 (plain SMTP)
service: mailcow-smtp service: mailcow-smtp
tls:
passthrough: true
# -----------
# SMTPS Router (Port 465, implicit TLS)
# -----------
mailcow-smtps: mailcow-smtps:
entryPoints: entryPoints:
- smtps - smtps
rule: "HostSNI(`mail.bunny-lab.io`)" rule: "HostSNI(`*`)" # Match any SNI (required for TLS)
service: mailcow-smtps service: mailcow-smtps
tls: tls:
passthrough: true passthrough: true
# -----------
# Submission Router (Port 587, implicit TLS or STARTTLS)
# -----------
mailcow-submission: mailcow-submission:
entryPoints: entryPoints:
- submission - submission
rule: "HostSNI(`mail.bunny-lab.io`)" rule: "HostSNI(`*`)" # Match any SNI (required for TLS)
service: mailcow-submission service: mailcow-submission
tls: tls:
passthrough: true passthrough: true
# -----------
# IMAPS Router (Port 993, implicit TLS)
# -----------
mailcow-imaps: mailcow-imaps:
entryPoints: entryPoints:
- imaps - imaps
rule: "HostSNI(`mail.bunny-lab.io`)" rule: "HostSNI(`*`)" # Match any SNI (required for TLS)
service: mailcow-imaps service: mailcow-imaps
tls: tls:
passthrough: true passthrough: true
# -----------
# IMAP Router (Port 143, can be STARTTLS)
# -----------
mailcow-imap: mailcow-imap:
entryPoints: entryPoints:
- imap - imap
rule: "HostSNI(`mail.bunny-lab.io`)" rule: "HostSNI(`*`)" # Match any SNI (for TLS connections)
service: mailcow-imap service: mailcow-imap
tls: tls:
passthrough: true passthrough: true
# Optional: POP3(s) # -----------
# POP3S Router (Port 995, implicit TLS)
# -----------
mailcow-pop3s: mailcow-pop3s:
entryPoints: entryPoints:
- pop3s - pop3s
rule: "HostSNI(`mail.bunny-lab.io`)" rule: "HostSNI(`*`)" # Match any SNI (required for TLS)
service: mailcow-pop3s service: mailcow-pop3s
tls: tls:
passthrough: true passthrough: true
# -----------
# Dovecot Managesieve (Port 4190, implicit TLS)
# -----------
mailcow-dovecot-managesieve: mailcow-dovecot-managesieve:
entryPoints: entryPoints:
- pop3s - pop3s
rule: "HostSNI(`mail.bunny-lab.io`)" rule: "HostSNI(`*`)" # Match any SNI (required for TLS)
service: dovecot-managesieve service: dovecot-managesieve
tls: tls:
passthrough: true passthrough: true
services: services:
# SMTP (Port 25, plain)
mailcow-smtp: mailcow-smtp:
loadBalancer: loadBalancer:
servers: servers:
- address: "192.168.3.61:25" - address: "192.168.3.61:25"
# SMTPS (Port 465, implicit TLS)
mailcow-smtps: mailcow-smtps:
loadBalancer: loadBalancer:
servers: servers:
- address: "192.168.3.61:465" - address: "192.168.3.61:465"
# Submission (Port 587, implicit TLS or STARTTLS)
mailcow-submission: mailcow-submission:
loadBalancer: loadBalancer:
servers: servers:
- address: "192.168.3.61:587" - address: "192.168.3.61:587"
# IMAPS (Port 993, implicit TLS)
mailcow-imaps: mailcow-imaps:
loadBalancer: loadBalancer:
servers: servers:
- address: "192.168.3.61:993" - address: "192.168.3.61:993"
# IMAP (Port 143, plain/STARTTLS)
mailcow-imap: mailcow-imap:
loadBalancer: loadBalancer:
servers: servers:
- address: "192.168.3.61:143" - address: "192.168.3.61:143"
# POP3S (Port 995, implicit TLS)
mailcow-pop3s: mailcow-pop3s:
loadBalancer: loadBalancer:
servers: servers:
- address: "192.168.3.61:995" - address: "192.168.3.61:995"
# Dovecot Managesieve (Port 4190, implicit TLS)
dovecot-managesieve: dovecot-managesieve:
loadBalancer: loadBalancer:
servers: servers: