Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use namshi/smtp as SMTP container #43

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 48 additions & 21 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,37 @@
# The inital database to be created on first launch of influxdb. Ignored
# after influxdb has been launched.
#
# TTN_DASHBOARD_MAIL_DOMAIN
# the postfix mail domain.
#
# TTN_DASHBOARD_MAIL_HOST_NAME
# the external FQDN for the mail host.
# The mail hostname.
#
# TTN_MAIL_RELAY_NETWORKS
# The relay networks. MUST start with ":"
# e.g :192.168.0.0/24 or :192.168.0.0/24:10.0.0.0/16.
#
# TTN_SMARTHOST_ADDRESS
# The smarthost address.
#
# TTN_SMARTHOST_PORT
# The smarthost port.
#
# TTN_SMARTHOST_USER
# The smarthost username.
#
# TTN_SMARTHOST_PASSWORD
# The smarthost user password.
#
# TTN_GMAIL_USER
# [SMTP relay] The Google Mail username.
#
# TTN_DASHBOARD_MAIL_RELAY_IP
# the mail relay machine, assuming that the real mailer is upstream from us.
# TTN_GMAIL_PASSWORD
# [SMTP relay] The Google Mail user password.
#
# TTN_SMARTHOST_PASSWORD
# The smarthost user password.
#
# TTN_SMARTHOST_ALIASES
# A list of aliases to puth auth data for authentication, semicolon separated.
# e.g. TTN_SMARTHOST_ALIASES=*.mysmtp.com
#
# TTN_DASHBOARD_PORT_HTTP
# The port to listen to for HTTP. Primarily for test purposes. Defaults to
Expand Down Expand Up @@ -157,10 +180,10 @@ services:
user: "root"
volumes:
- "${TTN_DASHBOARD_DATA}node-red:/data"
# nodered opens ports on influxdb so it needs to be able to talk to it.
# nodered opens ports on influxdb and smtp so it needs to be able to talk to them.
links:
- influxdb
- postfix
- smtp
environment:
TZ: "${TTN_DASHBOARD_TIMEZONE:-GMT}"

Expand Down Expand Up @@ -191,17 +214,21 @@ services:
links:
- influxdb


postfix:
smtp:
restart: unless-stopped
build:
context: ./postfix
dockerfile: Dockerfile
args:
relay_ip: "${TTN_DASHBOARD_MAIL_RELAY_IP:-}"
host_name: "${TTN_DASHBOARD_MAIL_HOST_NAME:-.}"
domain: "${TTN_DASHBOARD_MAIL_DOMAIN:-.}"

# Documentation: https://hub.docker.com/r/namshi/smtp
image: namshi/smtp
environment:
TZ: "${TTN_DASHBOARD_TIMEZONE:-GMT}"
MAILNAME: "${TTN_DASHBOARD_MAIL_HOST_NAME:-.}"
RELAY_NETWORKS: "${TTN_MAIL_RELAY_NETWORKS}"
SMARTHOST_ADDRESS: "${TTN_SMARTHOST_ADDRESS}"
SMARTHOST_PORT: "${TTN_SMARTHOST_PORT}"
SMARTHOST_USER: "${TTN_SMARTHOST_USER}"
SMARTHOST_PASSWORD: "${TTN_SMARTHOST_PASSWORD}"
SMARTHOST_ALIASES: "${TTN_SMARTHOST_ALIASES}"
GMAIL_USER: "${TTN_GMAIL_USER}"
GMAIL_PASSWORD: "${TTN_GMAIL_PASSWORD}"

grafana:
restart: unless-stopped
Expand All @@ -215,16 +242,16 @@ services:
GF_SERVER_ROOT_URL: "https://%(domain)s/grafana/"
GF_SMTP_ENABLED: "${TTN_DASHBOARD_GRAFANA_SMTP_ENABLED:-false}"
GF_SMTP_SKIP_VERIFY: "${TTN_DASHBOARD_GRAFANA_SMTP_SKIP_VERIFY:-false}"
GF_SMTP_HOST: "postfix:25"
GF_SMTP_HOST: "smtp:25"
GF_SMTP_FROM_ADDRESS: "${TTN_DASHBOARD_GRAFANA_SMTP_FROM_ADDRESS:-grafana@localhost}"
GF_SMTP_FROM_NAME: "${TTN_DASHBOARD_GRAFANA_PROJECT_NAME:-Default} grafana admin"
GF_LOG_MODE: "${TTN_DASHBOARD_GRAFANA_LOG_MODE:-console,file}"
GF_LOG_LEVEL: "${TTN_DASHBOARD_GRAFANA_LOG_LEVEL:-info}"
GF_INSTALL_PLUGINS: "${TTN_DASHBOARD_GRAFANA_INSTALL_PLUGINS:-}"
GF_USERS_ALLOW_SIGN_UP: "${TTN_DASHBOARD_GRAFANA_USERS_ALLOW_SIGN_UP:-false}"
# grafana opens ports on influxdb and postfix, so it needs to be able to talk to it.
# grafana opens ports on influxdb and smtp, so it needs to be able to talk to them.
links:
- influxdb
- postfix
- smtp

### end of file ###
38 changes: 0 additions & 38 deletions postfix/Dockerfile

This file was deleted.

2 changes: 0 additions & 2 deletions postfix/postfix.sh

This file was deleted.