Hello
Im running Mailu behind Traefik v3.3, sending and receiving mails via the webmail service works with no issue, additionally i've configured Thunderbird to connect to the servers IMAP and SMTPS (port 993/465).
Once Authenticated, the sent/inbox folders are retrieved with all the data, and receiving mails seems to be working, but sending mails doesn't work from Thunderbird, it keeps loading with no clear errors in logs.
This is my configuration files:
- Traefik compose file:
services:
reverse-proxy:
image: traefik:v3.3
ports:
- "80:80"
- "443:443"
- "8080:8080"
- "25:25"
- "465:465"
- "587:587"
- "110:110"
- "995:995"
- "143:143"
- "993:993"
- "4190:4190"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.yaml:/etc/traefik/traefik.yaml
- ./letsencrypt:/letsencrypt
networks:
- traefik-net
networks:
traefik-net:
external: true
- Traefik static configuration :
global:
checkNewVersion: false
sendAnonymousUsage: false
log:
level: DEBUG
format: common
accessLog:
format: common
filePath: /var/log/traefik/access.log
api:
dashboard: true
insecure: true
entryPoints:
web:
address: :80
# Redirect all HTTP to HTTPS
http:
redirections:
entryPoint:
to: websecure
scheme: https
websecure:
address: :443
imaps:
address: :993
imap:
address: :143
pop3s:
address: :995
smtps:
address: :465
smtp:
address: :587
sieve:
address: :4190
smtp-relay:
address: :25
providers:
docker:
exposedByDefault: false
file:
directory: /etc/traefik
watch: true
certificatesResolvers:
le:
acme:
email: user@gmail.com
storage: /letsencrypt/acme.json
httpChallenge:
entryPoint: web
- Mailu front service:
front:
image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}nginx:${MAILU_VERSION:-2024.06}
restart: always
env_file: mailu.env
logging:
driver: journald
options:
tag: mailu-front
networks:
- default
- webmail
- traefik-net
volumes:
- "/mailu/certs:/certs"
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-net"
- "traefik.http.routers.mail.rule=Host(`mail.mydomain.org`)"
- "traefik.http.routers.mail.entrypoints=websecure"
- "traefik.http.routers.mail.tls=true"
- "traefik.http.routers.mail.tls.certresolver=le"
- "traefik.http.services.mail.loadbalancer.server.port=80"
# IMAPS (993)
- "traefik.tcp.routers.mail-imaps.rule=HostSNI(`*`)"
- "traefik.tcp.routers.mail-imaps.entrypoints=imaps"
- "traefik.tcp.routers.mail-imaps.tls.passthrough=true"
- "traefik.tcp.routers.mail-imaps.service=mail-imaps"
- "traefik.tcp.services.mail-imaps.loadbalancer.server.port=993"
# IMAP (143)
- "traefik.tcp.routers.mail-imap.rule=HostSNI(`*`)"
- "traefik.tcp.routers.mail-imap.entrypoints=imap"
- "traefik.tcp.routers.mail-imap.service=mail-imap"
- "traefik.tcp.services.mail-imap.loadbalancer.server.port=143"
# POP3S (995)
- "traefik.tcp.routers.mail-pop3s.rule=HostSNI(`*`)"
- "traefik.tcp.routers.mail-pop3s.entrypoints=pop3s"
- "traefik.tcp.routers.mail-pop3s.tls.passthrough=true"
- "traefik.tcp.routers.mail-pop3s.service=mail-pop3s"
- "traefik.tcp.services.mail-pop3s.loadbalancer.server.port=995"
# relay SMTP (25)
- "traefik.tcp.routers.smtp-insecure.rule=HostSNI(`*`)"
- "traefik.tcp.routers.smtp-insecure.entrypoints=smtp-relay"
- "traefik.tcp.routers.smtp-insecure.service=smtp-insecure"
- "traefik.tcp.services.smtp-insecure.loadbalancer.server.port=25"
# SMTPS (465)
- "traefik.tcp.routers.mail-smtps.rule=HostSNI(`*`)"
- "traefik.tcp.routers.mail-smtps.entrypoints=smtps"
- "traefik.tcp.routers.mail-smtps.tls.passthrough=true"
- "traefik.tcp.routers.mail-smtps.service=mail-smtps"
- "traefik.tcp.services.mail-smtps.loadbalancer.server.port=465"
# SMTP Submission (587)
- "traefik.tcp.routers.mail-smtp.rule=HostSNI(`*`)"
- "traefik.tcp.routers.mail-smtp.entrypoints=smtp"
- "traefik.tcp.routers.mail-smtp.service=mail-smtp"
- "traefik.tcp.services.mail-smtp.loadbalancer.server.port=587"
# SIEVE (4190)
- "traefik.tcp.routers.mail-sieve.rule=HostSNI(`*`)"
- "traefik.tcp.routers.mail-sieve.entrypoints=sieve"
- "traefik.tcp.routers.mail-sieve.service=mail-sieve"
- "traefik.tcp.services.mail-sieve.loadbalancer.server.port=4190"
depends_on:
- resolver
dns:
- 192.168.203.254
- mailu.env:
TLS_FLAVOR=mail-letsencrypt
- Connecting with openssl command to verify the certificate on port 465 seem to have the right one:
openssl s_client -connect mail.mydomain.org:465 -4
CONNECTED(00000003)
depth=2 C = US, O = Internet Security Research Group, CN = ISRG Root X1
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = E5
verify return:1
depth=0 CN = mail.mydomain.org
verify return:1
---
Certificate chain
0 s:CN = mail.mydomain.org
i:C = US, O = Let's Encrypt, CN = E5
a:PKEY: id-ecPublicKey, 256 (bit); sigalg: ecdsa-with-SHA384
v:NotBefore: Mar 11 06:14:12 2025 GMT; NotAfter: Jun 9 06:14:11 2025 GMT
1 s:C = US, O = Let's Encrypt, CN = E5
i:C = US, O = Internet Security Research Group, CN = ISRG Root X1
a:PKEY: id-ecPublicKey, 384 (bit); sigalg: RSA-SHA256
v:NotBefore: Mar 13 00:00:00 2024 GMT; NotAfter: Mar 12 23:59:59 2027 GMT
2 s:C = US, O = Internet Security Research Group, CN = ISRG Root X1
i:C = US, O = Internet Security Research Group, CN = ISRG Root X1
a:PKEY: rsaEncryption, 4096 (bit); sigalg: RSA-SHA256
v:NotBefore: Jun 4 11:04:38 2015 GMT; NotAfter: Jun 4 11:04:38 2035 GMT
...
...
I've tried the solution provided in Mailu docs, but no luck on making things works, the closest working configuration to our needs is the one above.
I appreciate any help or guidance on fixing this problem