Simple SMTP server / postfix null relay host https://github.com/bokysan/docker-postfix
This repository has been archived on 2021-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
decentral1se b95808cd21
continuous-integration/drone/push Build is failing Details
Use new image namespace
2021-06-21 12:31:52 +02:00
.drone.yml Use new image namespace 2021-06-21 12:31:52 +02:00
.env.sample Fix embarrassing mass-typo 😳 2020-12-31 23:02:27 +02:00
.gitignore Initial commit 2020-09-26 11:17:53 +02:00
README.md Follow new exciting README standard 2021-03-02 18:38:40 +02:00
compose.yml Version v3.0.0; sync labels 2021-04-05 01:15:11 +02:00

README.md

Postfix-Relay

Build Status

  • Category: Utilities
  • Status: ❷💛
  • Image: boky/postfix, ❶💚, upstream
  • Healthcheck: Yes
  • Backups: No
  • Email: N/A
  • Tests: ❷💛
  • SSO: N/A

Centralised email delivery for all your coop-cloud apps using the boky/postfix outgoing-only mail image.

The basic idea is to run one instance of this on each swarm, and configure that swarm's apps to send all their email through it.

By default, this stack will try to deliver e-mail directly (i.e. looking up the recipient's mail server using MX records). NOTE: make sure that:

  • your Traefik server and host firewall are configured to allow port 587,
  • you have an MX record for your configured $DOMAIN pointing to this server,
  • you have an SPF record for $DOMAIN that includes mx or this server's IP
  • you have a reverse DNS (rDNS / PTR) record for this IP that matches $DOMAIN

(These requirements mean that you can only deploy one direct-delivery instance of this app per swarm host..)

Alternatively, you can easily route mail through a smarthost / relay host like Mailgun or Gandi -- see RELAYHOST and related parameters.

FIXME 3wc: Pass RELAYHOST etc. from .envrc to service

Basic usage

  1. Set up Docker Swarm and [abra][abra]
  2. Deploy [coop-cloud/traefik][compose-traefik]
  3. abra app new postfix-relay
  4. abra app YOURAPPDOMAIN config - be sure to change $DOMAIN to something that resolves to your Docker swarm box
  5. abra app YOURAPPDOMAIN deploy

Using this in other stacks

Add the other service to the (internal) mail network, and set whatever options the image supports for auto-configuring SMTP settings.

For reusable stacks, you probably want to put this configuration in a separate compose.mailrelay.yml file, e.g. the version in coop-cloud/wordpress.