version: '3.3' services: minimail: build: . image: servercontainers/minimail restart: always environment: MAIL_FQDN: internal.doe-mailservers.tld POSTFIX_SMTPD_BANNER: internal.doe-mailservers.tld ESMTP # relay outgoing mails through the configured mx servers of domain doe-mailservers.tld RELAYHOST: "doe-mailservers.tld:587" POSTFIX_SSL_OUT_SECURITY_LEVEL: encrypt # wait a few days until we throw away mails we cannot deliver POSTFIX_QUEUE_LIFETIME_MAX: 11d POSTFIX_QUEUE_LIFETIME_BOUNCE: 10d # create a mail account for user johndoe - accountname: hon@doe.io ACONF_USER_ACCOUNT_NAME_johndoe: john@doe.io # password hash for: asdf ACONF_USER_PASSWORD_HASH_johndoe: '{BLF-CRYPT}$$2y$$05$$Zl.hPiR36SPW4cG.O1aRAOry1qLgz5gwWig05EkNNGytfmbYSlsI6' # additional domains john will use ACONF_USER_ALIASES_johndoe: postmaster@otherdomain.com mail@johndoe.tld git@otherdomain.com postmaster@johndoe.tld webmaster@johndoe.tld mail@johndoe.com mail@john.com volumes: # recommendation: make it read only once it works #- ./tls:/etc/postfix/tls:ro - ./tls:/etc/postfix/tls - ./additional:/etc/postfix/additional - ./mail:/var/vmail ports: - "25:25" - "143:143" - "587:587" - "993:993"