Postfix Docker Image
Supported tags and respective
What is Postfix?
Postfix attempts to be fast, easy to administer, and secure. The outside has a definite Sendmail-ish flavor, but the inside is completely different.
How to use this image
To run Postfix just mount your configuration files and start the container:
docker run -d -p 25:25 -v /my/main.cf:/etc/postfix/main.cf instrumentisto/postfix
To configure Postfix you may use one of the following ways (but not both at the same time):
Put your configuration files (must end with
/etc/postfix/master.cf.d/directories. These files will be applied to default Postfix configuration when container starts.
docker run -d -p 25:25 \ -v /my/main.cf:/etc/postfix/main.cf.d/10-custom.cf:ro \ -v /my/master.cf:/etc/postfix/master.cf.d/10-custom.cf:ro \ instrumentisto/postfix
This way is convenient if you need only few changes to default configuration, or you want to keep different parts of configuration in different files.
Specify whole configuration.
Put your configuration files (
/etc/postfix/directory, so fully replace the default configuration files provided by image.
docker run -d -p 25:25 \ -v /my/main.cf:/etc/postfix/main.cf:ro \ -v /my/master.cf:/etc/postfix/master.cf:ro \ instrumentisto/postfix
This way is convenient when it's easier to specify the whole configuration at once, rather than reconfigure default options.
To see default Postfix configuration of this Docker image just run:
# for main.cf docker run --rm instrumentisto/postfix postconf # for master.cf docker run --rm instrumentisto/postfix postconf -M
Latest version of
X Postfix major version.
Latest version of
X.Y Postfix minor version.
X.Y.Z version of Postfix.
This image is based on the popular Alpine Linux project, available in the alpine official image.
Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general.
This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use musl libc instead of glibc and friends, so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See this Hacker News comment thread for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images.
syslogd process of this image is configured to write everything to
To change this behaviour just mount your own
/etc/syslog.conf file with desired log rules.
Postfix itself is licensed under IPL-1 license.
Postfix Docker image is licensed under MIT license.
We can't notice comments in the DockerHub so don't use them for reporting issue or asking question.
If you have any problems with or questions about this image, please contact us through a GitHub issue.