mail server with posteio container for traefik v1.7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
posteio: | |
image: analogic/poste.io:latest | |
container_name: poste.io | |
hostname: example.com | |
restart: always | |
ports: | |
- '25:25' # SMTPS - mostly processing incoming mails | |
- '465:465' # SMTPS - mostly processing incoming mails | |
- '81:80' # HTTP - redirect to https (see options) and authentication for Let's encrypt service | |
- '110:110' # POP3 - standard protocol for accessing mailbox, STARTTLS is required before client auth | |
- '143:143' # IMAP - standard protocol for accessing mailbox, STARTTLS is required before client auth | |
- '8443:443' # HTTPS - access to administration or webmail client | |
- '587:587' # MSA - SMTP port used primarily for email clients after STARTTLS and auth | |
- '993:993' # IMAPS - alternative port for IMAP encrypted since connection | |
- '995:995' # POP3S - encrypted POP3 since connections | |
environment: | |
- HOSTNAME=mail.example.com | |
- HTTPS=OFF | |
#- DISABLE_CLAMAV=TRUE | |
- LETSENCRYPT_EMAIL=postmaster@example.com | |
- LETSENCRYPT_HOST=example.com | |
- VIRTUAL_HOST=mail.example.com | |
volumes: | |
- './containers/poste.io/data:/data' | |
- '/etc/localtime:/etc/localtime:ro' | |
labels: | |
- "traefik.leposte.backend=leposte" | |
- "traefik.leposte.frontend.rule=HostRegexp:example.com,{subdomain:[a-z]*}.example.com;PathPrefix:/.well-known/" | |
- "traefik.leposte.port=80" | |
- "traefik.leposte.protocol=http" | |
- "traefik.leposte.frontend.entryPoints=http" | |
- "traefik.webmail.backend=webmail" | |
- "traefik.webmail.frontend.rule=Host:webmail.example.com" | |
- "traefik.webmail.port=80" | |
- "traefik.webmail.frontend.headers.SSLRedirect=true" | |
- "traefik.admin.backend=posteio" | |
- "traefik.admin.frontend.rule=Host:posteio.example.com" | |
- "traefik.admin.frontend.redirect.regex=posteio.example.com/webmail" | |
- "traefik.admin.frontend.redirect.replacement=posteio.example.com/admin/" | |
- "traefik.admin.port=80" | |
- "traefik.admin.frontend.headers.SSLRedirect=true" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment