Advertisement
Guest User

Untitled

a guest
May 17th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.56 KB | None | 0 0
  1. version: '2'
  2. services:
  3. mailserver:
  4. image: hardware/mailserver
  5. container_name: mailserver
  6. domainname: asrlab.lan # Mail server FQDN & reverse = mail.domain.tld.
  7. hostname: my-mail
  8. # restart: always
  9. # extra_hosts: - Required for external database (on other server or for local database on host)
  10. # - "mariadb:xx.xx.xx.xx" - Replace with IP address of MariaDB server
  11. ports:
  12. - "25:25" # SMTP - Required
  13. - "110:110" # POP3 STARTTLS - Optional - For webmails/desktop clients
  14. - "143:143" # IMAP STARTTLS - Optional - For webmails/desktop clients
  15. - "465:465" # SMTPS SSL/TLS - Optional - Enabled for compatibility reason, otherwise disabled
  16. - "587:587" # Submission STARTTLS - Optional - For webmails/desktop clients
  17. - "993:993" # IMAPS SSL/TLS - Optional - For webmails/desktop clients
  18. - "995:995" # POP3S SSL/TLS - Optional - For webmails/desktop clients
  19. - "4190:4190" # SIEVE STARTTLS - Optional - Recommended for mail filtering
  20. environment:
  21. - DBPASS=xxxxxxx
  22. # - ENABLE_POP3=true # Enable POP3 protocol
  23. # - GREYLISTING=gross # Enable gross greylisting policy server
  24. # - DISABLE_CLAMAV=true # Disable virus scanning
  25. # - DISABLE_SPAMASSASSIN=true # Disable SPAM checking
  26. # - DISABLE_SIEVE=true # Disable ManageSieve protocol
  27. volumes:
  28. - /mnt/docker/mail:/var/mail
  29. - /mnt/docker/mail/opendkim:/etc/opendkim/keys
  30. # - /mnt/docker/nginx/certs:/etc/letsencrypt
  31. depends_on:
  32. - mariadb
  33.  
  34. # Administration interface
  35. # https://github.com/hardware/postfixadmin
  36. # http://postfixadmin.sourceforge.net/
  37. # Configuration : https://github.com/hardware/mailserver/wiki/Postfixadmin-initial-configuration
  38. postfixadmin:
  39. image: hardware/postfixadmin
  40. container_name: postfixadmin
  41. domainname: asrlab.lan
  42. hostname: my-mail
  43. # restart: always
  44. environment:
  45. - DBPASS=xxxxxxx
  46. depends_on:
  47. - mailserver
  48. - mariadb
  49.  
  50. # Webmail (Optional)
  51. # https://github.com/hardware/rainloop
  52. # https://www.rainloop.net/
  53. # Configuration : https://github.com/hardware/mailserver/wiki/Rainloop-initial-configuration
  54. rainloop:
  55. image: hardware/rainloop
  56. container_name: rainloop
  57. # restart: always
  58. volumes:
  59. - /mnt/docker/rainloop:/rainloop/data
  60. depends_on:
  61. - mailserver
  62. - mariadb
  63.  
  64. # Web server
  65. # https://github.com/Wonderfall/dockerfiles/tree/master/nginx
  66. # https://nginx.org/
  67. # Configuration : https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration
  68. nginx:
  69. image: wonderfall/boring-nginx
  70. container_name: nginx
  71. # restart: always
  72. ports:
  73. - "80:8000"
  74. - "443:4430"
  75. volumes:
  76. - /mnt/docker/nginx/sites-enabled:/sites-enabled
  77. - /mnt/docker/nginx/conf:/conf.d
  78. - /mnt/docker/nginx/log:/var/log/nginx
  79. - /mnt/docker/nginx/certs:/certs
  80. depends_on:
  81. - postfixadmin
  82. - rainloop
  83.  
  84. # Database
  85. # https://github.com/docker-library/mariadb
  86. # https://mariadb.org/
  87. mariadb:
  88. image: mariadb:10.1
  89. container_name: mariadb
  90. # restart: always
  91. # Info : These variables are ignored when the volume already exists (databases created before).
  92. environment:
  93. - MYSQL_ROOT_PASSWORD=xxxxxxx
  94. - MYSQL_DATABASE=postfix
  95. - MYSQL_USER=postfix
  96. - MYSQL_PASSWORD=xxxxxxx
  97. volumes:
  98. - /mnt/docker/mysql/db:/var/lib/mysql
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement