Skip to content

Commit

Permalink
add docker-mailserver
Browse files Browse the repository at this point in the history
  • Loading branch information
FarisZR committed Oct 20, 2024
1 parent 10eda3a commit 380f837
Show file tree
Hide file tree
Showing 3 changed files with 793 additions and 0 deletions.
49 changes: 49 additions & 0 deletions docker-mailserver/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
networks:
discourse:
external: true

services:
mailserver:
image: ghcr.io/docker-mailserver/docker-mailserver:14.0.0@sha256:01b82c6c1c64d5b73ba161c0107e5d7d038ebdce85eb9ed084f043e9c2a7943b
container_name: mailserver
# If the FQDN for your mail-server is only two labels (eg: example.com),
# you can assign this entirely to `hostname` and remove `domainname`.
hostname: cups-g11
domainname: aosus.org
env_file: mailserver.env
# More information about the mail-server ports:
# https://docker-mailserver.github.io/docker-mailserver/latest/config/security/understanding-the-ports/
# To avoid conflicts with yaml base-60 float, DO NOT remove the quotation marks.
ports:
- "25:25" # SMTP (explicit TLS => STARTTLS)
# - "143:143" # IMAP4 (explicit TLS => STARTTLS)
# - "465:465" # ESMTP (implicit TLS)
- "587:587" # ESMTP (explicit TLS => STARTTLS)
# - "993:993" # IMAP4 (implicit TLS)
# - "110:110" # POP3
- "995:995" # POP3 (with TLS)
volumes:
- mail-data:/var/mail
- mail-state:/var/mail-state
- mail-logs:/var/log/mail
- config:/tmp/docker-mailserver
- /etc/localtime:/etc/localtime:ro
- caddy_data:/caddy-data:ro
restart: always
stop_grace_period: 1m
cap_add:
- NET_ADMIN
healthcheck:
test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1"
timeout: 3s
retries: 0
networks:
discourse:

volumes:
mail-data:
mail-state:
mail-logs:
config:
caddy_data:
external: true
Loading

0 comments on commit 380f837

Please sign in to comment.