marcopompili/docker-postfix
Docker image for Postfix mail service.
docker-postfix
Docker image for Postfix mail service.
This image runs only a Postfix process
so nor pop3 or imap services are supported.
This is a "mail send" only installation, no relay, no receiving emails.
Installation
Pull the image from the docker hub:
docker pull emarcs/postfixConfiguring Postfix
Postfix is huge and has hundreds of configuration parameters.
Two config files are the main actors in the configuration:
- main.cf: specifies the options for running Postfix.
- master.cf: specifies the services Postfix should run.
Tutorial and examples for configuring Postfix can be found online,
it's not an easy task for a newcomer, but starting with the
official documentation is always a good thing:
Running the container
Run the container with docker-compose:
main_srv:
image: emarcs/postfix
hostname: mail
domainname: example.com
ports:
- "25:25"
volumes:
- ./data/spool/:/var/spool/postfixIs important to save store the spool folder outside the
container, the spool folder contains the email data of the
mailboxes. In this case is not critical to do that, because for
now this is a send only container.