version: '3.8'

services:
  mailserver:
    image: ghcr.io/docker-mailserver/docker-mailserver:latest
    container_name: vision-mailserver
    hostname: mail
    ports:
      - "25:25"
      - "110:110"
    environment:
      - OVERRIDE_HOSTNAME=mail.vision-gmbh.local
      - ENABLE_POP3=1
      - ENABLE_IMAP=0
      - ENABLE_CLAMAV=0
      - ENABLE_SPAMASSASSIN=0
      - ENABLE_FAIL2BAN=0
      - SMTP_ONLY=0
      - POSTMASTER_ADDRESS=postmaster@vision-gmbh.local
      - LOG_LEVEL=debug
    volumes:
      - maildata:/var/mail
      - mailstate:/var/mail-state
    restart: unless-stopped

volumes:
  maildata:
  mailstate: