Document the notif_from config parameter
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
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.
The current documentation for it seems to explain it https://github.com/matrix-org/synapse/blob/c2ba994dbb3f084c2c0cc8492e8a9456ec0f3747/docs/sample_config.yaml#L1371
also updated by #6685