Changeset - ce72c36f7a0e
[Not reviewed]
default
0 5 1
Thomas De Schampheleire - 10 years ago 2015-07-16 17:40:35
thomas.de.schampheleire@gmail.com
e-mail: add documentation about configuration settings

Document e-mail related configuration settings in the documentation
(overview) and the .ini file itself (technical details and example
settings).
6 files changed with 190 insertions and 20 deletions:
0 comments (0 inline, 0 general)
development.ini
Show inline comments
 
################################################################################
 
################################################################################
 
# Kallithea - Development config:                                              #
 
# listening on *:5000                                                          #
 
# sqlite and kallithea.db                                                      #
 
# initial_repo_scan = true                                                     #
 
# set debug = true                                                             #
 
# verbose and colorful logging                                                 #
 
#                                                                              #
 
# The %(here)s variable will be replaced with the parent directory of this file#
 
################################################################################
 
################################################################################
 

	
 
[DEFAULT]
 
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                                                            ##
 
##                                                                            ##
 
## Refer to the documentation ("E-mail settings") for more details.           ##
 
##                                                                            ##
 
## It is recommended to use a valid sender address that passes access         ##
 
## validation and spam filtering in mail servers.                             ##
 
################################################################################
 

	
 
## 'From' header for application e-mails. You can optionally add a name.
 
## Default:
 
#app_email_from = Kallithea
 
## Examples:
 
#app_email_from = Kallithea <kallithea-noreply@example.com>
 
#app_email_from = kallithea-noreply@example.com
 

	
 
## Subject prefix for application e-mails.
 
## A space between this prefix and the real subject is automatically added.
 
## Default:
 
#email_prefix =
 
## Example:
 
#email_prefix = [Kallithea]
 

	
 
#email_to = admin@localhost
 
## Recipients for error e-mails and fallback recipients of application mails.
 
## Multiple addresses can be specified, space-separated.
 
## Only addresses are allowed, do not add any name part.
 
## Default:
 
#email_to =
 
## Examples:
 
#email_to = admin@example.com
 
#email_to = admin@example.com another_admin@example.com
 

	
 
## 'From' header for error e-mails. You can optionally add a name.
 
## Default:
 
#error_email_from = pylons@yourapp.com
 
## Examples:
 
#error_email_from = Kallithea Errors <kallithea-noreply@example.com>
 
#error_email_from = paste_error@example.com
 

	
 
## SMTP server settings
 
## Only smtp_server is mandatory. All other settings take the specified default
 
## values.
 
#smtp_server = mail.server.com
 
#smtp_username =
 
#smtp_password =
 
#smtp_port = 25
 
#smtp_use_tls = false
 
#smtp_use_ssl = false
 
## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
 
## SMTP authentication parameters to use (e.g. LOGIN PLAIN CRAM-MD5, etc.).
 
## If empty, use any of the authentication parameters supported by the server.
 
#smtp_auth =
 

	
 
[server:main]
 
## PASTE ##
 
#use = egg:Paste#http
 
## nr of worker threads to spawn
 
#threadpool_workers = 5
 
## max request before thread respawn
 
#threadpool_max_requests = 10
 
## option to use threads of process
 
#use_threadpool = true
 

	
 
## WAITRESS ##
 
use = egg:waitress#main
 
## number of worker threads
 
threads = 5
 
## MAX BODY SIZE 100GB
 
max_request_body_size = 107374182400
 
## use poll instead of select, fixes fd limits, may not work on old
 
## windows systems.
 
#asyncore_use_poll = True
 

	
 
## GUNICORN ##
 
#use = egg:gunicorn#main
docs/index.rst
Show inline comments
 
@@ -16,48 +16,49 @@ Kallithea Documentation
 
   :maxdepth: 1
 

	
 
   overview
 
   installation
 
   installation_win
 
   installation_win_old
 
   installation_iis
 
   setup
 

	
 
**Usage**
 

	
 
.. toctree::
 
   :maxdepth: 1
 

	
 
   usage/general
 
   usage/vcs_support
 
   usage/locking
 
   usage/statistics
 

	
 
**Administrators Guide**
 

	
 
.. toctree::
 
   :maxdepth: 1
 

	
 
   usage/e-mail
 
   usage/performance
 
   usage/backup
 
   usage/debugging
 
   usage/troubleshooting
 

	
 
**Develop**
 

	
 
.. toctree::
 
   :maxdepth: 1
 

	
 
   contributing
 
   changelog
 

	
 
**API**
 

	
 
.. toctree::
 
   :maxdepth: 1
 

	
 
   api/api
 
   api/models
 

	
 

	
 
Other topics
 
------------
docs/usage/e-mail.rst
Show inline comments
 
new file 100644
 
.. _email:
 

	
 
===============
 
E-mail settings
 
===============
 

	
 
The Kallithea configuration file has several e-mail related settings. When
 
these contain correct values, Kallithea will send e-mail in the situations
 
described below. If the e-mail configuration is not correct so that e-mails
 
cannot be sent, all mails will show up in the log output.
 

	
 
Before any e-mail can be sent, an SMTP server has to be configured using the
 
configuration file setting ``smtp_server``. If required for that server, specify
 
a username (``smtp_username``) and password (``smtp_password``), a non-standard
 
port (``smtp_port``), encryption settings (``smtp_use_tls`` or ``smtp_use_ssl``)
 
and/or specific authentication parameters (``smtp_auth``).
 

	
 
Application e-mails
 
-------------------
 

	
 
Kallithea sends an e-mail to `users` on several occasions:
 

	
 
- when comments are given on one of their changesets
 
- when comments are given on changesets they are reviewer on or on which they
 
  commented regardless
 
- when they are invited as reviewer in pull requests
 
- when they request a password reset
 

	
 
Kallithea sends an e-mail to all `administrators` upon new account registration.
 
Administrators are users with the ``Admin`` flag set in the ``Admin->Users``
 
section.
 

	
 
When Kallithea wants to send an e-mail but due to an error cannot correctly
 
determine the intended recipients, the administrators and the addresses
 
specified in ``email_to`` in the configuration file are used as fallback.
 

	
 
Recipients will see these e-mails originating from the sender specified in the
 
``app_email_from`` setting in the configuration file. This setting can either
 
contain only an e-mail address, like `kallithea-noreply@example.com`, or both
 
a name and an address in the following format: `Kallithea
 
<kallithea-noreply@example.com>`. The subject of these e-mails can
 
optionally be prefixed with the value of ``email_prefix`` in the configuration
 
file.
 

	
 
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.
 

	
 
Recipients will see these e-mails originating from the sender specified in the
 
``error_email_from`` setting in the configuration file. This setting can either
 
contain only an e-mail address, like `kallithea-noreply@example.com`, or both
 
a name and an address in the following format: `Kallithea Errors
 
<kallithea-noreply@example.com>`.
 

	
 
*Note:* The WebError_ package does not respect ``smtp_port`` and assumes the
 
standard SMTP port (25). If you have a remote SMTP server with a different port,
 
you could set up a local forwarding SMTP server on port 25.
 

	
 
References
 
----------
 
- `Error Middleware (Pylons documentation) <http://pylons-webframework.readthedocs.org/en/latest/debugging.html#error-middleware>`_
 
- `ErrorHandler (Pylons modules documentation) <http://pylons-webframework.readthedocs.org/en/latest/modules/middleware.html#pylons.middleware.ErrorHandler>`_
 

	
 
.. _WebError: https://pypi.python.org/pypi/WebError
kallithea/bin/template.ini.mako
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%text>################################################################################</%text>
 
<%text>################################################################################</%text>
 
# Kallithea - config file generated with kallithea-config                      #
 
<%text>################################################################################</%text>
 
<%text>################################################################################</%text>
 

	
 
[DEFAULT]
 
debug = true
 
pdebug = false
 

	
 
<%text>################################################################################</%text>
 
<%text>## Uncomment and replace with the address which should receive                ##</%text>
 
<%text>## any error reports after application crash                                  ##</%text>
 
<%text>## Additionally those settings will be used by Kallithea mailing system       ##</%text>
 
<%text>## E-mail settings                                                            ##</%text>
 
<%text>##                                                                            ##</%text>
 
<%text>## Refer to the documentation ("E-mail settings") for more details.           ##</%text>
 
<%text>##                                                                            ##</%text>
 
<%text>## It is recommended to use a valid sender address that passes access         ##</%text>
 
<%text>## validation and spam filtering in mail servers.                             ##</%text>
 
<%text>################################################################################</%text>
 

	
 
<%text>## 'From' header for application e-mails. You can optionally add a name.</%text>
 
<%text>## Default:</%text>
 
#app_email_from = Kallithea
 
<%text>## Examples:</%text>
 
#app_email_from = Kallithea <kallithea-noreply@example.com>
 
#app_email_from = kallithea-noreply@example.com
 

	
 
<%text>## Subject prefix for application e-mails.</%text>
 
<%text>## A space between this prefix and the real subject is automatically added.</%text>
 
<%text>## Default:</%text>
 
#email_prefix =
 
<%text>## Example:</%text>
 
#email_prefix = [Kallithea]
 

	
 
#email_to = admin@localhost
 
<%text>## Recipients for error e-mails and fallback recipients of application mails.</%text>
 
<%text>## Multiple addresses can be specified, space-separated.</%text>
 
<%text>## Only addresses are allowed, do not add any name part.</%text>
 
<%text>## Default:</%text>
 
#email_to =
 
<%text>## Examples:</%text>
 
#email_to = admin@example.com
 
#email_to = admin@example.com another_admin@example.com
 

	
 
<%text>## 'From' header for error e-mails. You can optionally add a name.</%text>
 
<%text>## Default:</%text>
 
#error_email_from = pylons@yourapp.com
 
<%text>## Examples:</%text>
 
#error_email_from = Kallithea Errors <kallithea-noreply@example.com>
 
#error_email_from = paste_error@example.com
 

	
 
<%text>## SMTP server settings</%text>
 
<%text>## Only smtp_server is mandatory. All other settings take the specified default</%text>
 
<%text>## values.</%text>
 
#smtp_server = mail.server.com
 
#smtp_username =
 
#smtp_password =
 
#smtp_port = 25
 
#smtp_use_tls = false
 
#smtp_use_ssl = false
 
<%text>## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)</%text>
 
<%text>## SMTP authentication parameters to use (e.g. LOGIN PLAIN CRAM-MD5, etc.).</%text>
 
<%text>## If empty, use any of the authentication parameters supported by the server.</%text>
 
#smtp_auth =
 

	
 
[server:main]
 
%if http_server == 'paste':
 
<%text>## PASTE ##</%text>
 
use = egg:Paste#http
 
<%text>## nr of worker threads to spawn</%text>
 
threadpool_workers = 5
 
<%text>## max request before thread respawn</%text>
 
threadpool_max_requests = 10
 
<%text>## option to use threads of process</%text>
 
use_threadpool = true
 

	
 
%elif http_server == 'waitress':
 
<%text>## WAITRESS ##</%text>
 
use = egg:waitress#main
 
<%text>## number of worker threads</%text>
 
threads = 5
 
<%text>## MAX BODY SIZE 100GB</%text>
 
max_request_body_size = 107374182400
 
<%text>## use poll instead of select, fixes fd limits, may not work on old</%text>
 
<%text>## windows systems.</%text>
 
#asyncore_use_poll = True
 

	
kallithea/config/deployment.ini_tmpl
Show inline comments
 
################################################################################
 
################################################################################
 
# Kallithea - Example config                                                   #
 
#                                                                              #
 
# The %(here)s variable will be replaced with the parent directory of this file#
 
################################################################################
 
################################################################################
 

	
 
[DEFAULT]
 
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                                                            ##
 
##                                                                            ##
 
## Refer to the documentation ("E-mail settings") for more details.           ##
 
##                                                                            ##
 
## It is recommended to use a valid sender address that passes access         ##
 
## validation and spam filtering in mail servers.                             ##
 
################################################################################
 

	
 
## 'From' header for application e-mails. You can optionally add a name.
 
## Default:
 
#app_email_from = Kallithea
 
## Examples:
 
#app_email_from = Kallithea <kallithea-noreply@example.com>
 
#app_email_from = kallithea-noreply@example.com
 

	
 
## Subject prefix for application e-mails.
 
## A space between this prefix and the real subject is automatically added.
 
## Default:
 
#email_prefix =
 
## Example:
 
#email_prefix = [Kallithea]
 

	
 
#email_to = admin@localhost
 
## Recipients for error e-mails and fallback recipients of application mails.
 
## Multiple addresses can be specified, space-separated.
 
## Only addresses are allowed, do not add any name part.
 
## Default:
 
#email_to =
 
## Examples:
 
#email_to = admin@example.com
 
#email_to = admin@example.com another_admin@example.com
 

	
 
## 'From' header for error e-mails. You can optionally add a name.
 
## Default:
 
#error_email_from = pylons@yourapp.com
 
## Examples:
 
#error_email_from = Kallithea Errors <kallithea-noreply@example.com>
 
#error_email_from = paste_error@example.com
 

	
 
## SMTP server settings
 
## Only smtp_server is mandatory. All other settings take the specified default
 
## values.
 
#smtp_server = mail.server.com
 
#smtp_username =
 
#smtp_password =
 
#smtp_port = 25
 
#smtp_use_tls = false
 
#smtp_use_ssl = false
 
## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
 
## SMTP authentication parameters to use (e.g. LOGIN PLAIN CRAM-MD5, etc.).
 
## If empty, use any of the authentication parameters supported by the server.
 
#smtp_auth =
 

	
 
[server:main]
 
## PASTE ##
 
#use = egg:Paste#http
 
## nr of worker threads to spawn
 
#threadpool_workers = 5
 
## max request before thread respawn
 
#threadpool_max_requests = 10
 
## option to use threads of process
 
#use_threadpool = true
 

	
 
## WAITRESS ##
 
use = egg:waitress#main
 
## number of worker threads
 
threads = 5
 
## MAX BODY SIZE 100GB
 
max_request_body_size = 107374182400
 
## use poll instead of select, fixes fd limits, may not work on old
 
## windows systems.
 
#asyncore_use_poll = True
 

	
 
## GUNICORN ##
 
#use = egg:gunicorn#main
test.ini
Show inline comments
 
################################################################################
 
################################################################################
 
# Kallithea - config for tests:                                                #
 
# initial_repo_scan = true                                                     #
 
# vcs_full_cache = false                                                       #
 
# sqlalchemy and kallithea_test.sqlite                                         #
 
# custom logging                                                               #
 
#                                                                              #
 
# The %(here)s variable will be replaced with the parent directory of this file#
 
################################################################################
 
################################################################################
 

	
 
[DEFAULT]
 
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                                                            ##
 
##                                                                            ##
 
## Refer to the documentation ("E-mail settings") for more details.           ##
 
##                                                                            ##
 
## It is recommended to use a valid sender address that passes access         ##
 
## validation and spam filtering in mail servers.                             ##
 
################################################################################
 

	
 
## 'From' header for application e-mails. You can optionally add a name.
 
## Default:
 
#app_email_from = Kallithea
 
## Examples:
 
#app_email_from = Kallithea <kallithea-noreply@example.com>
 
#app_email_from = kallithea-noreply@example.com
 

	
 
## Subject prefix for application e-mails.
 
## A space between this prefix and the real subject is automatically added.
 
## Default:
 
#email_prefix =
 
## Example:
 
#email_prefix = [Kallithea]
 

	
 
#email_to = admin@localhost
 
## Recipients for error e-mails and fallback recipients of application mails.
 
## Multiple addresses can be specified, space-separated.
 
## Only addresses are allowed, do not add any name part.
 
## Default:
 
#email_to =
 
## Examples:
 
#email_to = admin@example.com
 
#email_to = admin@example.com another_admin@example.com
 

	
 
## 'From' header for error e-mails. You can optionally add a name.
 
## Default:
 
#error_email_from = pylons@yourapp.com
 
## Examples:
 
#error_email_from = Kallithea Errors <kallithea-noreply@example.com>
 
#error_email_from = paste_error@example.com
 

	
 
## SMTP server settings
 
## Only smtp_server is mandatory. All other settings take the specified default
 
## values.
 
#smtp_server = mail.server.com
 
#smtp_username =
 
#smtp_password =
 
#smtp_port = 25
 
#smtp_use_tls = false
 
#smtp_use_ssl = false
 
## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
 
## SMTP authentication parameters to use (e.g. LOGIN PLAIN CRAM-MD5, etc.).
 
## If empty, use any of the authentication parameters supported by the server.
 
#smtp_auth =
 

	
 
[server:main]
 
## PASTE ##
 
#use = egg:Paste#http
 
## nr of worker threads to spawn
 
#threadpool_workers = 5
 
## max request before thread respawn
 
#threadpool_max_requests = 10
 
## option to use threads of process
 
#use_threadpool = true
 

	
 
## WAITRESS ##
 
use = egg:waitress#main
 
## number of worker threads
 
threads = 5
 
## MAX BODY SIZE 100GB
 
max_request_body_size = 107374182400
 
## use poll instead of select, fixes fd limits, may not work on old
 
## windows systems.
 
#asyncore_use_poll = True
 

	
 
## GUNICORN ##
 
#use = egg:gunicorn#main
0 comments (0 inline, 0 general)