[PATCH 1 of 5] e-mail: describe and clarify e-mail settings in the ini file

Mads Kiilerich mads at kiilerich.com
Mon Jul 13 14:19:17 EDT 2015


On 07/13/2015 10:45 AM, Thomas De Schampheleire wrote:
> # HG changeset patch
> # User Thomas De Schampheleire <thomas.de.schampheleire at gmail.com>
> # Date 1436644666 -7200
> #      Sat Jul 11 21:57:46 2015 +0200
> # Node ID c22a219636b830bac4b6125b306f6c8506f81d99
> # Parent  4a3708db60aef76020f4fefacf861ee830abc564
> e-mail: describe and clarify e-mail settings in the ini file
>
> Add some description of the e-mail related settings in the ini file.
> Use sensible (uncommented) defaults for app_email_from and email_prefix.

I wonder, why are these new values more sensible?

> Clarify that the default value of smtp_use_ssl is false by updating the
> commented setting.
>
> This also deletes the commented setting of 'error_message' which does not
> seem to be used. It is referring to the error_message variable in Paste,
> which has as description (Paste:ErrorMiddleware):
>      When debug mode is off, the error message to show to users.
> However, setting this value apparently made no effect at all in Kallithea.

It would be nice if such related but separate spin-off changes could be 
done in separate changesets.

It would also be nice if the .ini files could be updated with the 
templates so the diff remains as small as possible.

> diff --git a/kallithea/bin/template.ini.mako b/kallithea/bin/template.ini.mako
> --- a/kallithea/bin/template.ini.mako
> +++ b/kallithea/bin/template.ini.mako
> @@ -10,22 +10,29 @@ debug = true
>   pdebug = false
>   <%text>
>   ################################################################################
> -## Uncomment and replace with the address which should receive                ##
> -## any error reports after application crash                                  ##
> -## Additionally those settings will be used by Kallithea mailing system       ##
> +## E-mail settings                                                            ##
> +##                                                                            ##
> +## email_to: The e-mail address to send error reports to.                     ##

I think it would be better if the description could be rephrased to answer:

Who will send which error reports ... and when?

The texts in kallithea/templates/admin/settings/settings_email.html (and 
perhaps some code comments) should perhaps be synchronized and clarified 
while we are at it.

> +## error_email_from: The sender of error e-mails.                             ##
> +## app_email_from: The sender of mails originating from Kallithea, for        ##
> +##                 example to notify users about new comments, pull requests, ##
> +##                 etc.                                                       ##
> +## email_prefix: The subject prefix for mails originating from Kallithea.     ##
> +##                                                                            ##
> +## Note: your SMTP server may require app_email_from/error_email_from to be   ##
> +## valid, existing addresses.                                                 ##
>   ################################################################################</%text>
>   #email_to = admin at localhost
> -#error_email_from = paste_error at localhost
> -#app_email_from = kallithea-noreply at localhost
> -#error_message =
> -#email_prefix = [Kallithea]
> +#error_email_from = kallithea-noreply at localhost
> +app_email_from = kallithea-noreply at localhost

Why set app_email_from but not error_email_from?

And is "@localhost" really a default value that is expected to be 
correct and work in most cases? I don't think so. The System itself will 
probably be better at coming up with a @hostname address.

> +email_prefix = [Kallithea]

Is it really an improvement to enable this by default? And should it tag 
everything with [Kallithea]? This is information that follows from the 
sender ... and a user might be using many different code hosting sites 
where it not really is important which of them use Kallithea.

>   #smtp_server = mail.server.com
>   #smtp_username =
>   #smtp_password =
>   #smtp_port =
>   #smtp_use_tls = false
> -#smtp_use_ssl = true
> +#smtp_use_ssl = false
>   <%text>## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)</%text>
>   #smtp_auth =
>   
> diff --git a/kallithea/config/deployment.ini_tmpl b/kallithea/config/deployment.ini_tmpl
> --- a/kallithea/config/deployment.ini_tmpl
> +++ b/kallithea/config/deployment.ini_tmpl
> @@ -11,22 +11,29 @@ debug = true
>   pdebug = false
>   
>   ################################################################################
> -## Uncomment and replace with the address which should receive                ##
> -## any error reports after application crash                                  ##
> -## Additionally those settings will be used by Kallithea mailing system       ##
> +## E-mail settings                                                            ##
> +##                                                                            ##
> +## email_to: The e-mail address to send error reports to.                     ##
> +## error_email_from: The sender of error e-mails.                             ##
> +## app_email_from: The sender of mails originating from Kallithea, for        ##
> +##                 example to notify users about new comments, pull requests, ##
> +##                 etc.                                                       ##
> +## email_prefix: The subject prefix for mails originating from Kallithea.     ##
> +##                                                                            ##
> +## Note: your SMTP server may require app_email_from/error_email_from to be   ##
> +## valid, existing addresses.                                                 ##
>   ################################################################################
>   #email_to = admin at localhost
> -#error_email_from = paste_error at localhost
> -#app_email_from = kallithea-noreply at localhost
> -#error_message =
> -#email_prefix = [Kallithea]
> +#error_email_from = kallithea-noreply at localhost
> +app_email_from = kallithea-noreply at localhost
> +email_prefix = [Kallithea]
>   
>   #smtp_server = mail.server.com
>   #smtp_username =
>   #smtp_password =
>   #smtp_port =
>   #smtp_use_tls = false
> -#smtp_use_ssl = true
> +#smtp_use_ssl = false
>   ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
>   #smtp_auth =
>   



More information about the kallithea-general mailing list