From 3ad9fa487bc3e19e267d97c911d880333b473680 Mon Sep 17 00:00:00 2001 From: oxmox Date: Fri, 8 Sep 2023 21:05:02 +0200 Subject: [PATCH] work on the mailserver for oxmox.dev --- dms/docker-compose.yaml | 9 ++++++--- dms/mailserver.env | 2 +- docker-compose.yml | 5 +++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/dms/docker-compose.yaml b/dms/docker-compose.yaml index 4728e06..0a9b5bc 100644 --- a/dms/docker-compose.yaml +++ b/dms/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.3" +version: "3.8" # logger driver - change this driver to ship all container logs to a different location x-logging: &logging @@ -6,13 +6,16 @@ x-logging: &logging driver: loki options: loki-url: "http://localhost:3100/loki/api/v1/push" + mode: "non-blocking" + max-buffer-size: "32m" + loki-retries: "3" services: mailserver: image: ghcr.io/docker-mailserver/docker-mailserver:latest container_name: "mailserver" # Provide the FQDN of your mail server here (Your DNS MX record should point to this value) - hostname: oxmox.dev + hostname: mail.oxmox.dev env_file: mailserver.env # More information about the mail-server ports: # https://docker-mailserver.github.io/docker-mailserver/latest/config/security/understanding-the-ports/ @@ -21,7 +24,7 @@ services: - "25:25" # SMTP (explicit TLS => STARTTLS, Authentication is DISABLED => use port 465/587 instead) - "143:143" # IMAP4 (explicit TLS => STARTTLS) - "465:465" # ESMTP (implicit TLS) - - "587:587" # ESMTP (explicit TLS => STARTTLS) + #- "587:587" # ESMTP (explicit TLS => STARTTLS) - "993:993" # IMAP4 (implicit TLS) volumes: - ./dms-data/mail-data/:/var/mail/ diff --git a/dms/mailserver.env b/dms/mailserver.env index 456109a..d02b736 100644 --- a/dms/mailserver.env +++ b/dms/mailserver.env @@ -217,7 +217,7 @@ SMTP_ONLY= # manual => Let's you manually specify locations of your SSL certificates for non-standard cases # self-signed => Enables self-signed certificates SSL_TYPE=letsencrypt -SSL_DOMAIN=oxmox.dev +SSL_DOMAIN=mail.oxmox.dev # 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. diff --git a/docker-compose.yml b/docker-compose.yml index cf1f2c7..ad2ee23 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: "3.3" +version: "3.8" # logger driver - change this driver to ship all container logs to a different location x-logging: &logging @@ -60,7 +60,8 @@ services: container_name: "simple-service" labels: - "traefik.enable=true" - - "traefik.http.routers.whoami.rule=Host(`oxmox.dev`) && Path(`/whoami`)" + # Note: mail.oxmox.dev is used here to make traefik request the certificate used by docker mailserver. + - "traefik.http.routers.whoami.rule=(Host(`oxmox.dev`) || Host(`mail.oxmox.dev`)) && Path(`/whoami`)" - "traefik.http.routers.whoami.entrypoints=websecure" - "traefik.http.routers.whoami.tls.certresolver=myresolver"