Improve email set-up
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
3wc 2020-09-27 21:27:08 +02:00
parent 5f2697c0c9
commit e6dc753365
4 changed files with 18 additions and 9 deletions

View File

@ -47,5 +47,14 @@ _(Only tested using subdomains)_
2. `direnv allow`
3. `abra deploy`
## Email
1. Deploy `postfix-relay`
2. Edit `.envrc` and uncomment the email lines; change `MAIL_FROM` to make sure
the domain is the same as `postfix-relay`'s `$DOMAIN` or in its
`$EXTRA_SENDER_DOMAINS`
3. `direnv allow` (or `source .envrc`)
7. `abra deploy`
[abra]: https://git.autonomic.zone/autonomic-cooperative/abra
[compose-traefik]: https://git.autonomic.zone/compose-stacks/traefik

View File

@ -3,17 +3,17 @@ version: "3.8"
services:
wordpress:
entrypoint: /docker-entrypoint2.sh
entrypoint: /docker-entrypoint.sh
environment:
- SMTP_HOST=${SMTP_HOST}
- MAIL_FROM=${MAIL_FROM}
networks:
- mail
configs:
- source: entrypoint_mailrelay_conf
target: /docker-entrypoint2.sh
mode: 0555
- source: mstmp_conf
target: /etc/msmtprc
- source: entrypoint
target: /etc/msmtprc
mode: 0555
networks:
@ -25,7 +25,7 @@ configs:
name: ${STACK_NAME}_mstmp_conf_${MSMTP_CONF_VERSION}
file: msmtp.conf.tmpl
template_driver: golang
entrypoint_mailrelay_conf:
name: ${STACK_NAME}_entrypoint_mailrelay_${ENTRYPOINT_MAILRELAY_CONF_VERSION}
file: entrypoint.mailrelay.sh.tmpl
entrypoint_conf:
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_CONF_VERSION}
file: entrypoint.sh.tmpl
template_driver: golang

View File

@ -2,7 +2,7 @@
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y msmtp && rm -rf /var/lib/apt/lists/*
echo "sendmail_path = /usr/bin/msmtp -t -i" >> /usr/local/etc/php/conf.d/sendmail.ini
echo "sendmail_path = /usr/bin/msmtp -t -i" > /usr/local/etc/php/conf.d/sendmail.ini
# Upstream ENTRYPOINT
# https://github.com/docker-library/wordpress/blob/master/php7.4/apache/Dockerfile#L120

View File

@ -1,3 +1,3 @@
account default
host {{ env "SMTP_HOST" }}
auto_from on
from {{ env "MAIL_FROM" }}