Hi Everyone,
i recently found Mailcow and want to switch from another Docker Mailserver. My System is running with Docker Compose and i use Traefik as my Reverse Proxy. With my old Mail Solution i used Traefik Labels to assign Ports for smtp etc. For Traefik i configured the necessary Entrypoints and my config file looks like this:
#Entry Points configuration
entryPoints:
web:
address: :80
http:
redirections:
entryPoint:
to: websecure
scheme: https
websecure:
address: :443
smtp:
address: :25
submission:
address: :587
imap:
address: :143
imaps:
address: :993
smtps:
address: :465

With my old Mailserver i had one Container that needed all these Ports. I used these labels to assign them:
#SMTP Relay
- "traefik.tcp.routers.moo_smtp_relay.rule=HostSNI(
)"
- "traefik.tcp.routers.moo_smtp_relay.entrypoints=smtp"
- "traefik.tcp.routers.moo_smtp_relay.service=moo_smtp_relay"
- "traefik.tcp.services.moo_smtp_relay.loadbalancer.server.port=25"
#SMTPS
- "traefik.tcp.routers.moo_smtp_ssl.rule=HostSNI(
)"
- "traefik.tcp.routers.moo_smtp_ssl.entrypoints=smtps"
- "traefik.tcp.routers.moo_smtp_ssl.tls.passthrough=true"
- "traefik.tcp.routers.moo_smtp_ssl.service=moo_smtp_ssl"
- "traefik.tcp.services.moo_smtp_ssl.loadbalancer.server.port=465"
#SUBMISSION
- "traefik.tcp.routers.moo_smtp.rule=HostSNI(
)"
- "traefik.tcp.routers.moo_smtp.entrypoints=submission"
- "traefik.tcp.routers.moo_smtp.service=moo_smtp"
- "traefik.tcp.services.moo_smtp.loadbalancer.server.port=587"
#IMAP
- "traefik.tcp.routers.moo_imap.rule=HostSNI(
)"
- "traefik.tcp.routers.moo_imap.entrypoints=imap"
- "traefik.tcp.routers.moo_imap.service=moo_imap"
- "traefik.tcp.services.moo_imap.loadbalancer.server.port=143"
#IMAPs
- "traefik.tcp.routers.moo_imap_ssl.rule=HostSNI(
*)"
- "traefik.tcp.routers.moo_imap_ssl.entrypoints=imaps"
- "traefik.tcp.routers.moo_imap_ssl.tls.passthrough=true"
- "traefik.tcp.routers.moo_imap_ssl.service=moo_imap_ssl"
- "traefik.tcp.services.moo_imap_ssl.loadbalancer.server.port=993"

I would like to do the same with Mailcow. Right now i created an override.yml for mailcow to assign ports 80+443 to mailcow-nginx. This works fine but i am curious and want to see if that works too. What would be the best way to make use of these Traefik Labels with Mailcow?
Greetings Eike

No one is typing

Have something to say?

Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!