Browse Source

Support for real email sending without a relay.

Dan Helfman 10 months ago
parent
commit
d69bfd5795
2 changed files with 19 additions and 4 deletions
  1. 13
    3
      README.md
  2. 6
    1
      mediagoblin_local.ini.template

+ 13
- 3
README.md View File

@@ -1,13 +1,18 @@
1 1
 # MediaGoblin
2 2
 
3
-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.
3
+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.
4 4
 
5 5
 Source at https://projects.torsion.org/witten/mediagoblin-docker
6 6
 
7 7
 ## Environment variables
8 8
 
9 9
  * `NOTIFICATION_EMAIL`: From address for MediaGoblin notification emails.
10
- * `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/.
10
+ * `EMAIL_HOSTNAME`: Hostname used to send outgoing notification emails.
11
+ * `EMAIL_PORT`: Port number used to send outgoing notification emails.
12
+ * `EMAIL_USERNAME`: Username used to connect to outgoing email host.
13
+ * `EMAIL_PASSWORD`: Password used to connect to outgoing email host.
14
+ * `EMAIL_TLS_SSL`: "true" or "false" for using TLS/SSL encryption for sending emails.
15
+ * `EMAIL_STARTTLS`: "true" or "false" for using STARTTLS encryption for sending emails.
11 16
  * `DATABASE_URL`: Connection string for database to use for persistence, including credentials. See example below.
12 17
 
13 18
 ## Volumes
@@ -23,7 +28,12 @@ Source at https://projects.torsion.org/witten/mediagoblin-docker
23 28
 ```console
24 29
 docker run --detach --name=mediagoblin \
25 30
     --env NOTIFICATION_EMAIL=media@example.org \
26
-    --env EMAIL_RELAY_HOST=relay.example.org \
31
+    --env EMAIL_HOSTNAME=mail.example.org \
32
+    --env EMAIL_PORT=587 \
33
+    --env EMAIL_USERNAME=bob@example.org \
34
+    --env EMAIL_PASSWORD=pass \
35
+    --env EMAIL_TLS_SSL=false \
36
+    --env EMAIL_STARTTLS=true \
27 37
     --env DATABASE_URL=postgresql://mediagoblin:password@database.example.org/mediagoblin \
28 38
     --volume /var/lib/mediagoblin/user_dev:/app/user_dev \
29 39
     --publish 80:80 \

+ 6
- 1
mediagoblin_local.ini.template View File

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

Loading…
Cancel
Save