Javielico
05e067b7f3
continuous-integration/drone/push Build is passing
Details
|
||
---|---|---|
.drone.yml | ||
.env.sample | ||
.gitignore | ||
README.md | ||
compose.yml |
README.md
Postfix-Relay
- Category: Utilities
- Status: 2, beta
- Image:
boky/postfix
, 4, upstream - Healthcheck: Yes
- Backups: No
- Email: N/A
- Tests: 2
- 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 includesmx
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
- Set up Docker Swarm and [
abra
][abra] - Deploy [
coop-cloud/traefik
][compose-traefik] abra app new postfix-relay
abra app config YOURAPPDOMAIN
- be sure to change$DOMAIN
to something that resolves to your Docker swarm boxabra app deploy YOURAPPDOMAIN
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
.