Support for real email sending without a relay.

This commit is contained in:
Dan Helfman 2018-02-10 16:54:26 -08:00
parent c24b202a7e
commit d69bfd5795
2 changed files with 19 additions and 4 deletions

View File

@ -1,13 +1,18 @@
# MediaGoblin
A basic container for a private MediaGoblin media server (https://mediagoblin.org/), including Nginx and uWSGI. Assumes a separate PostgreSQL database for persistence, and an email relay host for sending email notifications.
A basic container for a private MediaGoblin media server (https://mediagoblin.org/), including Nginx and uWSGI. Assumes a separate PostgreSQL database for persistence, and an email host for sending email notifications.
Source at https://projects.torsion.org/witten/mediagoblin-docker
## Environment variables
* `NOTIFICATION_EMAIL`: From address for MediaGoblin notification emails.
* `EMAIL_RELAY_HOST`: Hostname used to send outgoing notification emails. Since MediaGoblin isn't terribly configurable as an email client, it's recommended that this "host" is a mail relay like https://hub.docker.com/r/alterrebe/postfix-relay/.
* `EMAIL_HOSTNAME`: Hostname used to send outgoing notification emails.
* `EMAIL_PORT`: Port number used to send outgoing notification emails.
* `EMAIL_USERNAME`: Username used to connect to outgoing email host.
* `EMAIL_PASSWORD`: Password used to connect to outgoing email host.
* `EMAIL_TLS_SSL`: "true" or "false" for using TLS/SSL encryption for sending emails.
* `EMAIL_STARTTLS`: "true" or "false" for using STARTTLS encryption for sending emails.
* `DATABASE_URL`: Connection string for database to use for persistence, including credentials. See example below.
## Volumes
@ -23,7 +28,12 @@ Source at https://projects.torsion.org/witten/mediagoblin-docker
```console
docker run --detach --name=mediagoblin \
--env NOTIFICATION_EMAIL=media@example.org \
--env EMAIL_RELAY_HOST=relay.example.org \
--env EMAIL_HOSTNAME=mail.example.org \
--env EMAIL_PORT=587 \
--env EMAIL_USERNAME=bob@example.org \
--env EMAIL_PASSWORD=pass \
--env EMAIL_TLS_SSL=false \
--env EMAIL_STARTTLS=true \
--env DATABASE_URL=postgresql://mediagoblin:password@database.example.org/mediagoblin \
--volume /var/lib/mediagoblin/user_dev:/app/user_dev \
--publish 80:80 \

View File

@ -14,7 +14,12 @@
[mediagoblin]
direct_remote_path = /mgoblin_static/
email_sender_address = "$NOTIFICATION_EMAIL"
email_smtp_host = "$EMAIL_RELAY_HOST"
email_smtp_host = "$EMAIL_HOSTNAME"
email_smtp_port = $EMAIL_PORT
email_smtp_user = "$EMAIL_USERNAME"
email_smtp_pass = "$EMAIL_PASSWORD"
email_smtp_force_tls = $EMAIL_TLS_SSL
email_smtp_force_starttls = $EMAIL_STARTTLS
## Uncomment and change to your DB's appropiate setting.
## Default is a local sqlite db "mediagoblin.db".