06ad223616 | ||
---|---|---|
.envrc.sample | ||
.gitignore | ||
README.md | ||
compose.yml |
README.md
Postfix-Relay
Centralised email delivery for all your compose-stacks
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). For this to work, you will need to
set up reverse DNS and SPF.
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
TODO 3wc: Can you run more than one instance of this on a swarm? How could we handle that in terms of reverse DNS?
Basic usage
- Set up Docker Swarm and
abra
- Deploy
compose-stacks/traefik
git clone https://git.autonomic.zone/compose-stacks/postfix-relay.git && cd postfix-relay
cp .envrc.sample .envrc
- Edit
.envrc
- be sure to changeDOMAIN
to something that resolves to your Docker swarm box direnv allow
(or. .envrc
)abra 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
compose-stacks/nextcloud
.