Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

"RuntimeError: email.enable_notifs is True but required keys are missing: email.notif_temp" #4195

Closed
r4dh4l opened this issue Nov 16, 2018 · 4 comments

Comments

@r4dh4l
Copy link

r4dh4l commented Nov 16, 2018

Hi,

since I couldn't find the error message in an existing issue and didn't get any help in #synapse:matrix.org yet let me ask here:

I've installed Synapse under Debian9 via PIP following https://github.com/matrix-org/synapse#installing-from-source months ago. Recently I wanted to enable mail notification support for password requests.

  1. https://github.com/matrix-org/synapse says:

If a user has registered an email address to their account using an identity server, they can request a password-reset token via clients such as Vector.

So if I don't want to use Identity servers (deleting the address logging in to Riot desktop/mobile client) I can not set a mail address?

  1. Beside this systemd reports the following error starting Synapse with mail support enabled:
"/home/synapse/.synapse/local/lib/python2.7/site-packages/synapse/config/emailconf
Nov 16 14:50:45 vm-synapse python2.7[14914]:     (", ".join(["email." + k for k in missing]),)
Nov 16 14:50:45 vm-synapse python2.7[14914]: RuntimeError: email.enable_notifs is True but required keys are missing: email.notif_temp
Nov 16 14:50:46 vm-synapse systemd[1]: matrix-synapse-pip.service: Main process exited, code=exited, status=1/FAILURE

My current configuration under Synapse v0.33.8 is:

email:
   enable_notifs: true
   smtp_host: "mail.riseup.net"
   smtp_port: 587
   smtp_user: "MyRiseupUserName"
   smtp_pass: "MyRiseupUserNamePassword"
   require_transport_security: true
   notif_from: "%(app)s Home Server on my.ddns.net <my-ddns-net-matrix@riseup.net>"
   app_name: Matrix
#   template_dir: res/templates
#   notif_template_html: notif_mail.html
#   notif_template_text: notif_mail.txt
   notif_for_new_users: true
   riot_base_url: "https://riot.im/app/"

If I understood https://github.com/matrix-org/synapse/blob/master/synapse/config/emailconfig.py right (if template_dir is unset, uses the example templates that are part of the Synapse distribution.) my setup should find the templates running the current Matrix version, shouldn't it?

@richvdh
Copy link
Member

richvdh commented Nov 19, 2018

which version of synapse?

@richvdh
Copy link
Member

richvdh commented Nov 19, 2018

oh, you said 0.33.8.

@richvdh
Copy link
Member

richvdh commented Nov 19, 2018

if you want to use the default templates, you should set notif_template_html and notif_template_text, but not template_dir.

@r4dh4l
Copy link
Author

r4dh4l commented Nov 25, 2018

Thank you @richvdh - synapse starts fine now!

@r4dh4l r4dh4l closed this as completed Nov 25, 2018
@r4dh4l r4dh4l reopened this Nov 25, 2018
@r4dh4l r4dh4l closed this as completed Nov 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants