GithubHelp home page GithubHelp logo

instrumentisto / postfix-docker-image Goto Github PK

View Code? Open in Web Editor NEW
21.0 4.0 10.0 45 KB

Postfix MTA Docker image

Home Page: http://www.postfix.org

License: MIT License

PHP 42.40% Makefile 23.23% Shell 34.37%
docker-postfix postfix-docker postfix

postfix-docker-image's Introduction

Postfix Docker Image

Build Status Docker Pulls Uses

Supported tags and respective Dockerfile links

What is Postfix?

Postfix is a free and open-source mail transfer agent (MTA) that routes and delivers electronic mail, intended as an alternative to Sendmail MTA.

It is Wietse Venema's mail server that started life at IBM research as an alternative to the widely-used Sendmail program. Now at Google, Wietse continues to support 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.

www.postfix.org

Postfix Logo

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

Configuration

To configure Postfix you may use one of the following ways (but not both at the same time):

  1. Drop-in files.
    Put your configuration files (must end with .cf) in /etc/postfix/main.cf.d/ and /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.

  2. Specify whole configuration.
    Put your configuration files (main.cf and master.cf) in /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.

Default configuration

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

Image versions

X

Latest version of X Postfix major version.

X.Y

Latest version of X.Y Postfix minor version.

X.Y.Z

Concrete X.Y.Z version of Postfix.

alpine

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.

Important tips

As far as Postfix writes its logs only to syslog, the syslogd process runs inside container as second side-process and is supervised with s6 supervisor provided by s6-overlay project.

Logs

The syslogd process of this image is configured to write everything to /dev/stdout.

To change this behaviour just mount your own /etc/syslog.conf file with desired log rules.

s6-overlay

This image contains s6-overlay inside. So you may use all the features it provides if you need to.

License

Postfix itself is licensed under IPL-1 license.

Postfix Docker image is licensed under MIT license.

Issues

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.

postfix-docker-image's People

Contributors

tyranron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

postfix-docker-image's Issues

Mailing to remote domains not supported

I am trying to use this image with the same config I have for postfix on a Digital Ocean Ubuntu droplet. In the DO droplet, mail will deliver to remote domains, however with this image, I can't get mail to deliver.

I am mounting an entire main.cf file into the container. Is there something different about how to configure postfix with this image?

libsasl2-modules

I realized I need to run an install of libsasl2-modules inside the container to make it work with the relay host I am using (ssl0.ovh.net:587), otherwise I get "SASL authentication failure: No worthy mechs found" errors.
It would be necessary to install this package during building of the image.

Enable Auto builds in DockerHub

Hey this is nice work.

Is it possible to enable auto builds in DockerHub for this repo so that any upstream changes triggers a new build?

Explicit chroot

Make in default master.cf explicit chroot for services and turn off backward compatibility.

Drop-in configuration files

As Postfix provides no capabilities to reconfigure itself via drop-in files there is still need to implement one for those who wants just tweak default configuration a bit.

Proposal:

  • Create /etc/postfix/main.cf.d/ dir where drop-in files should be placed.
  • On container start execute postconf for each file in drop-ins dir.

where is entrypoint /init created

Hi,

I tried to create a docker image of this but updated to the latest version of debian (and therefor updating some debs) and postfix.
The build is now succesful, but /init does not exist.

I only removed the S6 portion as I don't need that.
I can't find anything that relates to /init in the dockerfile apart from the entrypoint.

Is /init needed for the image to work?

I have the forked version on my profile.

Mode detailed README

It would be nice to widely describe in README.md next info:

  • Postfix usage examples (integration with other mail stuff), where to mount config files, etc
  • Characteristics and features of this Docker image (how it's compiled and what supports)

have mounted container well but i don't know how to use this.

i have other containers having php sites, but sending mails in those containers doesn't work.. i found this postfix-docker-image hoped could solve.. i installed and is running well..

im

i dont know how i can make other containers send mail using this postfix-docker-image
any help will be appreciated.
thanks..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.