[PATCH 6 of 6] e-mail: add documentation about configuration settings

Mads Kiilerich mads at kiilerich.com
Mon Aug 3 11:24:04 UTC 2015


On 08/03/2015 12:28 AM, Mads Kiilerich wrote:
>> +Error e-mails
>> +-------------
>> +
>> +When an exception occurs in Kallithea -- and unless interactive 
>> debugging is
>> +enabled using ``set debug = true`` in the ``[app:main]`` section of the
>> +configuration file -- an e-mail with exception details is sent by 
>> WebError_'s
>> +``ErrorMiddleware`` to the addresses specified in ``email_to`` in the
>> +configuration file.
>> +
>> +The ``From`` header of these e-mails is set using the 
>> ``error_email_from``
>> +setting in the configuration file. The ``Subject`` of these e-mails can
>> +optionally be prefixed with the value of ``error_subject_prefix`` in 
>> the
>> +configuration file. This value defaults to '`WebApp Error:` '.
>> +
>> +_Note:_ Due to the way configuration files are parsed, trailing 
>> whitespace is
>> +ignored. For ``error_subject_prefix``, however, a trailing space can be
>> +desirable. A simple solution is to add a special Unicode space 
>> instead, for
>> +example `U+2002 (EN SPACE)`: ' '.
>
> Yeah, that parser seems to be very not-so-clever.
>
> Unicode in mail subjects is however a flaky thing (AFAIK). That 
> workaround doesn't sound like something I would recommend ... Is that 
> recommended from WebError upstream?
>
> It sounds like it would be better to make a hack that checks if the 
> configured value both start and ends with ", it will strip these and 
> preserve whitespace inside it and write it back to the ini file data 
> structure.

Hmm ... after giving it a bit more thoughts:

It seems like error_subject_prefix isn't "ready" yet. We should perhaps 
leave it out of documentation and .ini files for now and move forward 
with the rest of the documentation and your other changes?

(As you probably noticed, I pushed some parts of your series.)

/Mads


More information about the kallithea-general mailing list