synapse icon indicating copy to clipboard operation
synapse copied to clipboard

Document the notif_from config parameter

Open tanius opened this issue 9 years ago • 3 comments

Currently, the default value for the notif_from config parameter looks like this (see emailconfig.py line 114):

   notif_from: "Your Friendly %(app)s Home Server <[email protected]>"

I propose to add a comment right above it:

# %(app)s is replaced with the application's name. To avoid parsing errors, either keep it 
# in place, or delete it completely. Docs: https://pyformat.info/#named_placeholders

This would prevent people not familiar with such a Python string formatter (like me …) from mistakes that result in failing e-mail notifications and long debugging :-) For example, setting the option to "Company Name %(app) <[email protected]>" caused this in the log, not precisely helpful to find the error:

2017-06-29 22:36:51,110 - synapse.push.emailpusher - 291 - INFO - - Sending notif email for user u'@user:example.com'
2017-06-29 22:36:51,111 - synapse.push.emailpusher - 134 - ERROR - - Exception processing notifs
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/synapse/push/emailpusher.py", line 132, in _process
    yield self._unsafe_process()
ValueError: unsupported format character '<' (0x3c) at index 18

tanius avatar Jul 02 '17 15:07 tanius

Sorry for hijacking this issue, would you be willing to share whatever needs to be configured to get registration email notifications working ?

I'm having a hard time setting this up.

mt7479 avatar Jan 19 '18 14:01 mt7479

The current documentation for it seems to explain it https://github.com/matrix-org/synapse/blob/c2ba994dbb3f084c2c0cc8492e8a9456ec0f3747/docs/sample_config.yaml#L1371

aaronraimist avatar Jan 13 '20 03:01 aaronraimist

also updated by #6685

richvdh avatar Jan 13 '20 12:01 richvdh