sync
All checks were successful
Deployment Verification / deploy-and-test (push) Successful in 25s

This commit is contained in:
Hubert Cornet 2024-11-28 20:13:48 +01:00
parent 4db8fcfb6e
commit 5072920803
2 changed files with 25 additions and 7 deletions

6
.env
View File

@ -238,12 +238,12 @@ SMTP_ONLY=
# custom => Enables custom certificates # custom => Enables custom certificates
# manual => Let's you manually specify locations of your SSL certificates for non-standard cases # manual => Let's you manually specify locations of your SSL certificates for non-standard cases
# self-signed => Enables self-signed certificates # self-signed => Enables self-signed certificates
SSL_TYPE= SSL_TYPE=manual
# These are only supported with `SSL_TYPE=manual`. # These are only supported with `SSL_TYPE=manual`.
# Provide the path to your cert and key files that you've mounted access to within the container. # Provide the path to your cert and key files that you've mounted access to within the container.
SSL_CERT_PATH= SSL_CERT_PATH=/certs/cert.crt
SSL_KEY_PATH= SSL_KEY_PATH=/certs/cert.key
# Optional: A 2nd certificate can be supported as fallback (dual cert support), eg ECDSA with an RSA fallback. # Optional: A 2nd certificate can be supported as fallback (dual cert support), eg ECDSA with an RSA fallback.
# Useful for additional compatibility with older MTA and MUA (eg pre-2015). # Useful for additional compatibility with older MTA and MUA (eg pre-2015).
SSL_ALT_CERT_PATH= SSL_ALT_CERT_PATH=

View File

@ -30,12 +30,30 @@ services:
restart: always restart: always
stop_grace_period: 1m stop_grace_period: 1m
# Uncomment if using `ENABLE_FAIL2BAN=1`: # Uncomment if using `ENABLE_FAIL2BAN=1`:
# cap_add: cap_add:
# - NET_ADMIN - NET_ADMIN
healthcheck: healthcheck:
test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1" test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1"
timeout: 3s timeout: 3s
retries: 0 retries: 0
networks: networks:
- back_network_mailserver - traefik_front_network
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik_front_network"
# HTTP
- "traefik.http.routers.mailserver-http.rule=Host(`mailserver.tips-of-mine.com`)"
- "traefik.http.routers.mailserver-http.entrypoints=http"
- "traefik.http.routers.mailserver-http.priority=49"
# HTTPS
- "traefik.http.routers.mailserver-https.rule=Host(`mailserver.tips-of-mine.com`)"
- "traefik.http.routers.mailserver-https.entrypoints=https"
- "traefik.http.routers.mailserver-https.tls=true"
- "traefik.http.routers.mailserver-https.priority=50"
- "traefik.http.routers.mailserver.service=mailserver-https-service"
# Middleware
- "traefik.http.routers.mailserver.middlewares=redirect-webmail@docker"
# - "traefik.http.middlewares.redirect-webmail.redirectregex.regex=.*"
# - "traefik.http.middlewares.redirect-webmail.redirectregex.replacement=https://webmail.tips-of-mine.com/"
# Service
- "traefik.http.services.mailserver-https-service.loadbalancer.server.port=443"