services: haproxy: image: haproxy:latest container_name: haproxy-mail restart: always volumes: - ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro - ./certs:/etc/haproxy/certs ports: - "993:993" # IMAP over SSL - "995:995" # POP3 over SSL - "587:587" # SMTP STARTTLS - "25:25" # SMTP Relay networks: - mailnet networks: mailnet: driver: bridge