Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '2'
- services:
- mailserver:
- image: hardware/mailserver
- container_name: mailserver
- domainname: asrlab.lan # Mail server FQDN & reverse = mail.domain.tld.
- hostname: my-mail
- # restart: always
- # extra_hosts: - Required for external database (on other server or for local database on host)
- # - "mariadb:xx.xx.xx.xx" - Replace with IP address of MariaDB server
- ports:
- - "25:25" # SMTP - Required
- - "110:110" # POP3 STARTTLS - Optional - For webmails/desktop clients
- - "143:143" # IMAP STARTTLS - Optional - For webmails/desktop clients
- - "465:465" # SMTPS SSL/TLS - Optional - Enabled for compatibility reason, otherwise disabled
- - "587:587" # Submission STARTTLS - Optional - For webmails/desktop clients
- - "993:993" # IMAPS SSL/TLS - Optional - For webmails/desktop clients
- - "995:995" # POP3S SSL/TLS - Optional - For webmails/desktop clients
- - "4190:4190" # SIEVE STARTTLS - Optional - Recommended for mail filtering
- environment:
- - DBPASS=xxxxxxx
- # - ENABLE_POP3=true # Enable POP3 protocol
- # - GREYLISTING=gross # Enable gross greylisting policy server
- # - DISABLE_CLAMAV=true # Disable virus scanning
- # - DISABLE_SPAMASSASSIN=true # Disable SPAM checking
- # - DISABLE_SIEVE=true # Disable ManageSieve protocol
- volumes:
- - /mnt/docker/mail:/var/mail
- - /mnt/docker/mail/opendkim:/etc/opendkim/keys
- # - /mnt/docker/nginx/certs:/etc/letsencrypt
- depends_on:
- - mariadb
- # Administration interface
- # https://github.com/hardware/postfixadmin
- # http://postfixadmin.sourceforge.net/
- # Configuration : https://github.com/hardware/mailserver/wiki/Postfixadmin-initial-configuration
- postfixadmin:
- image: hardware/postfixadmin
- container_name: postfixadmin
- domainname: asrlab.lan
- hostname: my-mail
- # restart: always
- environment:
- - DBPASS=xxxxxxx
- depends_on:
- - mailserver
- - mariadb
- # Webmail (Optional)
- # https://github.com/hardware/rainloop
- # https://www.rainloop.net/
- # Configuration : https://github.com/hardware/mailserver/wiki/Rainloop-initial-configuration
- rainloop:
- image: hardware/rainloop
- container_name: rainloop
- # restart: always
- volumes:
- - /mnt/docker/rainloop:/rainloop/data
- depends_on:
- - mailserver
- - mariadb
- # Web server
- # https://github.com/Wonderfall/dockerfiles/tree/master/nginx
- # https://nginx.org/
- # Configuration : https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration
- nginx:
- image: wonderfall/boring-nginx
- container_name: nginx
- # restart: always
- ports:
- - "80:8000"
- - "443:4430"
- volumes:
- - /mnt/docker/nginx/sites-enabled:/sites-enabled
- - /mnt/docker/nginx/conf:/conf.d
- - /mnt/docker/nginx/log:/var/log/nginx
- - /mnt/docker/nginx/certs:/certs
- depends_on:
- - postfixadmin
- - rainloop
- # Database
- # https://github.com/docker-library/mariadb
- # https://mariadb.org/
- mariadb:
- image: mariadb:10.1
- container_name: mariadb
- # restart: always
- # Info : These variables are ignored when the volume already exists (databases created before).
- environment:
- - MYSQL_ROOT_PASSWORD=xxxxxxx
- - MYSQL_DATABASE=postfix
- - MYSQL_USER=postfix
- - MYSQL_PASSWORD=xxxxxxx
- volumes:
- - /mnt/docker/mysql/db:/var/lib/mysql
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement