No description, website, or topics provided.
Branch: master
Clone or download
Latest commit 57e56c0 Jun 12, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
eionet refs #73086 changed eionet MTP_RELAY to ironports.eea.europa.eu Jun 13, 2016
.gitignore Refactor: use centos6 image that can start the postfix service. Jun 2, 2015
.secret.example Refactor: use centos6 image that can start the postfix service. Jun 2, 2015
Dockerfile Declare SMTP port and volumes for this image Jun 9, 2018
README.md
chaperone.conf Refs #70500 - Update documentation; Fix docker-setup.sh Mar 25, 2016
docker-setup.sh null host address bits Feb 9, 2017

README.md

Postfix SMTP only with relay support

Postfix SMTP only Docker image with SMTP relay support.

  • CentOS: 7
  • Postfix: 2.10.1
  • Expose: 25

Supported tags and respective Dockerfile links

Stable and immutable tags

  • :2.10-3.3 Dockerfile - Postfix: 2.10 Release: 3.3

See older versions

Base docker image

Source code

Usage

Start postfix (to send emails using postfix within container)

$ docker run --rm --name=postfix \
             -e  MTP_HOST=foo.com \
         eeacms/postfix

or start postfix (to send emails by using a remote email server)

$ docker run --rm --name=postfix \
             -e MTP_HOST=foo.com \
             -e MTP_RELAY=smtp.gmail.com \
             -e MTP_USER=foo \
             -e MTP_PASS=secret \
         eeacms/postfix

Start sending emails:

$ docker run -it --rm --link=postfix alpine sh
  $ telnet postfix 25
  HELO foo.com
  MAIL FROM: bar@foo.com
  RCPT TO: foo@bar.com
  DATA
  subject: Test
  Testing 1, 2, 3
  .
  quit

Supported environment variables

  • MTP_HOST The myhostname parameter specifies the internet hostname of this mail system
  • MTP_DESTINATION The mydestination parameter specifies the list of domains that this machine considers itself the final destination for.
  • MTP_BANNER The smtpd_banner parameter specifies the text that follows the 220 code in the SMTP server's greeting banner.
  • MTP_RELAY The relayhost parameter specifies the default host to send mail to when no entry is matched in the optional transport(5) table.
  • MTP_RELAY_DOMAINS The relay_domains parameter restricts what destinations this system will relay mail to.
  • MTP_PORT The relayhost port
  • MTP_USER The user used to connect to the relayhost
  • MTP_PASS The password used to connect to the relayhost
  • MTP_INTERFACES The inet_interfaces parameter specifies the network interface addresses that this mail system receives mail on.

Copyright and license

The Initial Owner of the Original Code is European Environment Agency (EEA). All Rights Reserved.

The Original Code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Funding

European Environment Agency (EU)