From be6cf302d08d87ba5ce0985bc17c1a9e75852084 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Wed, 2 Jun 2021 11:20:24 +0200 Subject: [PATCH] Unbreak mailrelay config --- .env.sample | 9 +++++++-- compose.mailrelay.yml | 10 ---------- compose.smtp.yml | 18 ++++++++++++++++++ 3 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 compose.smtp.yml diff --git a/.env.sample b/.env.sample index b98f7fe..94ce6c2 100644 --- a/.env.sample +++ b/.env.sample @@ -29,11 +29,16 @@ SECRET_DB_PASSWORD_VERSION=v1 # define('FORCE_SSL_ADMIN', true );\ # define('COOKIE_DOMAIN', \$_SERVER['HTTP_HOST']);" -# SMTP +# Local SMTP relay #COMPOSE_FILE="compose.yml:compose.mailrelay.yml" #SMTP_HOST="postfix_relay_app" +#MAIL_FROM="wordpress@example.com" + +# Remote SMTP relay +#COMPOSE_FILE="compose.yml:compose.mailrelay.yml:compose.smtp.yml" +#SMTP_HOST="mail.example.com" +#MAIL_FROM="wordpress@example.com" #SMTP_PORT=587 #SMTP_AUTH=on #SMTP_TLS=on -#MAIL_FROM="wordpress@example.com" #SECRET_SMTP_PASSWORD_VERSION=v1 diff --git a/compose.mailrelay.yml b/compose.mailrelay.yml index 1de0783..ad686d8 100644 --- a/compose.mailrelay.yml +++ b/compose.mailrelay.yml @@ -4,13 +4,8 @@ version: "3.8" services: app: entrypoint: /docker-entrypoint.mailrelay.sh - secrets: - - smtp_password environment: - SMTP_HOST=${SMTP_HOST} - - SMTP_PORT=${SMTP_PORT:25} - - SMTP_AUTH=${SMTP_AUTH} - - SMTP_TLS=${SMTP_TLS} - MAIL_FROM=${MAIL_FROM} configs: - source: mstmp_conf @@ -28,8 +23,3 @@ configs: name: ${STACK_NAME}_entrypoint_mailrelay_${ENTRYPOINT_MAILRELAY_CONF_VERSION} file: entrypoint.mailrelay.sh.tmpl template_driver: golang - -secrets: - smtp_password: - name: ${STACK_NAME}_smtp_password_${SECRET_SMTP_PASSWORD_VERSION} - external: true diff --git a/compose.smtp.yml b/compose.smtp.yml new file mode 100644 index 0000000..293dd20 --- /dev/null +++ b/compose.smtp.yml @@ -0,0 +1,18 @@ +--- +version: "3.8" + +services: + app: + secrets: + - smtp_password + environment: + - SMTP_HOST=${SMTP_HOST} + - SMTP_PORT=${SMTP_PORT:25} + - SMTP_AUTH=${SMTP_AUTH} + - SMTP_TLS=${SMTP_TLS} + - MAIL_FROM=${MAIL_FROM} + +secrets: + smtp_password: + name: ${STACK_NAME}_smtp_password_${SECRET_SMTP_PASSWORD_VERSION} + external: true