From 542d4ad5f3e8c83431b5205c8003cb4acf858228 Mon Sep 17 00:00:00 2001 From: Viyurz Date: Sat, 16 Mar 2024 20:34:38 +0100 Subject: [PATCH] Add email support for Matrix/Synapse. --- roles/synapse/templates/homeserver.yaml | 9 +++++++++ secrets.yml.example | 2 ++ 2 files changed, 11 insertions(+) diff --git a/roles/synapse/templates/homeserver.yaml b/roles/synapse/templates/homeserver.yaml index a36f4c6..ff33d4c 100644 --- a/roles/synapse/templates/homeserver.yaml +++ b/roles/synapse/templates/homeserver.yaml @@ -6,6 +6,7 @@ # Server server_name: "{{ domain }}" pid_file: /data/homeserver.pid +public_baseurl: "https://matrix.{{ domain }}" listeners: - port: 8008 tls: false @@ -14,6 +15,14 @@ listeners: resources: - names: [client, federation] compress: false +email: + smtp_host: "mail.{{ domain }}" + smtp_port: {{ ports['mailserver_smtps'] }} + smtp_user: "{{ synapse_secrets['smtp_user'] }}" + smtp_pass: '{{ synapse_secrets["smtp_pass"] }}' + force_tls: true + notif_from: "Matrix " + invite_client_location: "https://element.{{ domain }}" # Homeserver blocking diff --git a/secrets.yml.example b/secrets.yml.example index 11efda9..4d22762 100644 --- a/secrets.yml.example +++ b/secrets.yml.example @@ -17,6 +17,8 @@ searxng_secrets: searxng_secret: synapse_secrets: + smtp_user: + smtp_pass: postgres_password: turn_shared_secret: "{{ coturn_secrets['static_auth_secret'] }}" macaroon_secret_key: