Git Product home page Git Product logo

docker-mail-relay's Introduction

Postfix Mail Relay

Contains:

  • Postfix, running in a simple relay mode
  • RSyslog

Processes are managed by supervisord, including cronjobs

The container provides a simple proxy relay for environments like Amazon VPC where you may have private servers with no Internet connection and therefore with no access to external mail relays (e.g. Amazon SES, SendGrid and others). You need to supply the container with your external mail relay address and credentials. The configuration is tested with Amazon SES.

Exports

  • Postfix on 25

Variables

  • RELAY_HOST_NAME=relay.example.com: DNS name for this relay container (usually the same as the Docker's hostname)
  • ACCEPTED_NETWORKS=192.168.0.0/16 172.16.0.0/12 10.0.0.0/8: Network (or a list of networks) to accept mail from
  • EXT_RELAY_HOST=email-smtp.us-east-1.amazonaws.com: External relay DNS name
  • EXT_RELAY_PORT=25: External relay TCP port
  • SMTP_LOGIN=: Login to connect to the external relay (required, otherwise the container fails to start)
  • SMTP_PASSWORD=: Password to connect to the external relay (required, otherwise the container fails to start)
  • USE_TLS=: Whether the external relay requires TLS. Might be "yes" or "no". Default: no.
  • TLS_VERIFY=: Trust level for checking the remote side cert. (none, may, encrypt, dane, dane-only, fingerprint, verify, secure). Default: may.
  • INBOUND_TLS=: Whether the Postfix supports TLS on inbound connections. Might be "yes" or "no". Default: yes.
  • RAW_CONFIG=: Possiblity to add raw postfix configuration parameters, use with care.

Example

Launch Postfix container:

$ docker run -d -h relay.example.com --name="mailrelay" -e SMTP_LOGIN=myLogin -e SMTP_PASSWORD=myPassword -p 25:25 alterrebe/postfix-relay

Running with Docker Compose:

version: "3.4"

services:
  smtp:
    image: alterrebe/postfix-relay
    environment:
      RELAY_HOST_NAME: smtp.example.com
      EXT_RELAY_HOST: "email-smtp.eu-west-1.amazonaws.com"
      EXT_RELAY_PORT: 587
      SMTP_LOGIN: "AKIA*********"
      SMTP_PASSWORD: "*********************************"
      USE_TLS: "yes"
      TLS_VERIFY: "may"
      RAW_CONFIG: |
        # custom config
        always_bcc = [email protected]

docker-mail-relay's People

Contributors

alterrebe avatar jrgensen avatar gdhnz avatar doooks avatar mosquito avatar temujin9 avatar jeanfabrice avatar

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.