##// END OF EJS Templates
docs: smtp_port is now respected by backlash...
Thomas De Schampheleire -
r6528:9eae297d default
parent child Browse files
Show More
@@ -1,100 +1,96 b''
1 .. _email:
1 .. _email:
2
2
3 ==============
3 ==============
4 Email settings
4 Email settings
5 ==============
5 ==============
6
6
7 The Kallithea configuration file has several email related settings. When
7 The Kallithea configuration file has several email related settings. When
8 these contain correct values, Kallithea will send email in the situations
8 these contain correct values, Kallithea will send email in the situations
9 described below. If the email configuration is not correct so that emails
9 described below. If the email configuration is not correct so that emails
10 cannot be sent, all mails will show up in the log output.
10 cannot be sent, all mails will show up in the log output.
11
11
12 Before any email can be sent, an SMTP server has to be configured using the
12 Before any email can be sent, an SMTP server has to be configured using the
13 configuration file setting ``smtp_server``. If required for that server, specify
13 configuration file setting ``smtp_server``. If required for that server, specify
14 a username (``smtp_username``) and password (``smtp_password``), a non-standard
14 a username (``smtp_username``) and password (``smtp_password``), a non-standard
15 port (``smtp_port``), whether to use "SSL" when connecting (``smtp_use_ssl``)
15 port (``smtp_port``), whether to use "SSL" when connecting (``smtp_use_ssl``)
16 or use STARTTLS (``smtp_use_tls``), and/or specify special ESMTP "auth" features
16 or use STARTTLS (``smtp_use_tls``), and/or specify special ESMTP "auth" features
17 (``smtp_auth``).
17 (``smtp_auth``).
18
18
19 For example, for sending through gmail, use::
19 For example, for sending through gmail, use::
20
20
21 smtp_server = smtp.gmail.com
21 smtp_server = smtp.gmail.com
22 smtp_username = username
22 smtp_username = username
23 smtp_password = password
23 smtp_password = password
24 smtp_port = 465
24 smtp_port = 465
25 smtp_use_ssl = true
25 smtp_use_ssl = true
26
26
27
27
28 Application emails
28 Application emails
29 ------------------
29 ------------------
30
30
31 Kallithea sends an email to `users` on several occasions:
31 Kallithea sends an email to `users` on several occasions:
32
32
33 - when comments are given on one of their changesets
33 - when comments are given on one of their changesets
34 - when comments are given on changesets they are reviewer on or on which they
34 - when comments are given on changesets they are reviewer on or on which they
35 commented regardless
35 commented regardless
36 - when they are invited as reviewer in pull requests
36 - when they are invited as reviewer in pull requests
37 - when they request a password reset
37 - when they request a password reset
38
38
39 Kallithea sends an email to all `administrators` upon new account registration.
39 Kallithea sends an email to all `administrators` upon new account registration.
40 Administrators are users with the ``Admin`` flag set on the *Admin > Users*
40 Administrators are users with the ``Admin`` flag set on the *Admin > Users*
41 page.
41 page.
42
42
43 When Kallithea wants to send an email but due to an error cannot correctly
43 When Kallithea wants to send an email but due to an error cannot correctly
44 determine the intended recipients, the administrators and the addresses
44 determine the intended recipients, the administrators and the addresses
45 specified in ``email_to`` in the configuration file are used as fallback.
45 specified in ``email_to`` in the configuration file are used as fallback.
46
46
47 Recipients will see these emails originating from the sender specified in the
47 Recipients will see these emails originating from the sender specified in the
48 ``app_email_from`` setting in the configuration file. This setting can either
48 ``app_email_from`` setting in the configuration file. This setting can either
49 contain only an email address, like `kallithea-noreply@example.com`, or both
49 contain only an email address, like `kallithea-noreply@example.com`, or both
50 a name and an address in the following format: `Kallithea
50 a name and an address in the following format: `Kallithea
51 <kallithea-noreply@example.com>`. However, if the email is sent due to an
51 <kallithea-noreply@example.com>`. However, if the email is sent due to an
52 action of a particular user, for example when a comment is given or a pull
52 action of a particular user, for example when a comment is given or a pull
53 request created, the name of that user will be combined with the email address
53 request created, the name of that user will be combined with the email address
54 specified in ``app_email_from`` to form the sender (and any name part in that
54 specified in ``app_email_from`` to form the sender (and any name part in that
55 configuration setting disregarded).
55 configuration setting disregarded).
56
56
57 The subject of these emails can optionally be prefixed with the value of
57 The subject of these emails can optionally be prefixed with the value of
58 ``email_prefix`` in the configuration file.
58 ``email_prefix`` in the configuration file.
59
59
60 A Kallithea-specific header indicating the email type will be added to each
60 A Kallithea-specific header indicating the email type will be added to each
61 email. This header can be used for email filtering. The header is of the form:
61 email. This header can be used for email filtering. The header is of the form:
62
62
63 X-Kallithea-Notification-Type: <type>
63 X-Kallithea-Notification-Type: <type>
64
64
65 where ``<type>`` is one of:
65 where ``<type>`` is one of:
66
66
67 - ``pull_request``: you are invited as reviewer in a pull request
67 - ``pull_request``: you are invited as reviewer in a pull request
68 - ``pull_request_comment``: a comment was given on a pull request
68 - ``pull_request_comment``: a comment was given on a pull request
69 - ``cs_comment``: a comment was given on a changeset
69 - ``cs_comment``: a comment was given on a changeset
70 - ``registration``: a new user was registered
70 - ``registration``: a new user was registered
71 - ``message``: another type of email
71 - ``message``: another type of email
72
72
73
73
74 Error emails
74 Error emails
75 ------------
75 ------------
76
76
77 When an exception occurs in Kallithea -- and unless interactive debugging is
77 When an exception occurs in Kallithea -- and unless interactive debugging is
78 enabled using ``set debug = true`` in the ``[app:main]`` section of the
78 enabled using ``set debug = true`` in the ``[app:main]`` section of the
79 configuration file -- an email with exception details is sent by backlash_
79 configuration file -- an email with exception details is sent by backlash_
80 to the addresses specified in ``email_to`` in the configuration file.
80 to the addresses specified in ``email_to`` in the configuration file.
81
81
82 Recipients will see these emails originating from the sender specified in the
82 Recipients will see these emails originating from the sender specified in the
83 ``error_email_from`` setting in the configuration file. This setting can either
83 ``error_email_from`` setting in the configuration file. This setting can either
84 contain only an email address, like `kallithea-noreply@example.com`, or both
84 contain only an email address, like `kallithea-noreply@example.com`, or both
85 a name and an address in the following format: `Kallithea Errors
85 a name and an address in the following format: `Kallithea Errors
86 <kallithea-noreply@example.com>`.
86 <kallithea-noreply@example.com>`.
87
87
88 *Note:* The WebError_ package does not respect ``smtp_port`` and assumes the
89 standard SMTP port (25). If you have a remote SMTP server with a different port,
90 you could set up a local forwarding SMTP server on port 25.
91
92
88
93 References
89 References
94 ----------
90 ----------
95
91
96 - `Error Middleware (Pylons documentation) <http://pylons-webframework.readthedocs.org/en/latest/debugging.html#error-middleware>`_
92 - `Error Middleware (Pylons documentation) <http://pylons-webframework.readthedocs.org/en/latest/debugging.html#error-middleware>`_
97 - `ErrorHandler (Pylons modules documentation) <http://pylons-webframework.readthedocs.org/en/latest/modules/middleware.html#pylons.middleware.ErrorHandler>`_
93 - `ErrorHandler (Pylons modules documentation) <http://pylons-webframework.readthedocs.org/en/latest/modules/middleware.html#pylons.middleware.ErrorHandler>`_
98
94
99
95
100 .. _WebError: https://pypi.python.org/pypi/WebError
96 .. _WebError: https://pypi.python.org/pypi/WebError
@@ -1,172 +1,172 b''
1 #!/usr/bin/env python2
1 #!/usr/bin/env python2
2 # -*- coding: utf-8 -*-
2 # -*- coding: utf-8 -*-
3 import os
3 import os
4 import sys
4 import sys
5 import platform
5 import platform
6
6
7 if sys.version_info < (2, 6) or sys.version_info >= (3,):
7 if sys.version_info < (2, 6) or sys.version_info >= (3,):
8 raise Exception('Kallithea requires python 2.6 or 2.7')
8 raise Exception('Kallithea requires python 2.6 or 2.7')
9
9
10
10
11 here = os.path.abspath(os.path.dirname(__file__))
11 here = os.path.abspath(os.path.dirname(__file__))
12
12
13
13
14 def _get_meta_var(name, data, callback_handler=None):
14 def _get_meta_var(name, data, callback_handler=None):
15 import re
15 import re
16 matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data)
16 matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data)
17 if matches:
17 if matches:
18 if not callable(callback_handler):
18 if not callable(callback_handler):
19 callback_handler = lambda v: v
19 callback_handler = lambda v: v
20
20
21 return callback_handler(eval(matches.groups()[0]))
21 return callback_handler(eval(matches.groups()[0]))
22
22
23 _meta = open(os.path.join(here, 'kallithea', '__init__.py'), 'rb')
23 _meta = open(os.path.join(here, 'kallithea', '__init__.py'), 'rb')
24 _metadata = _meta.read()
24 _metadata = _meta.read()
25 _meta.close()
25 _meta.close()
26
26
27 callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:]))
27 callback = lambda V: ('.'.join(map(str, V[:3])) + '.'.join(V[3:]))
28 __version__ = _get_meta_var('VERSION', _metadata, callback)
28 __version__ = _get_meta_var('VERSION', _metadata, callback)
29 __license__ = _get_meta_var('__license__', _metadata)
29 __license__ = _get_meta_var('__license__', _metadata)
30 __author__ = _get_meta_var('__author__', _metadata)
30 __author__ = _get_meta_var('__author__', _metadata)
31 __url__ = _get_meta_var('__url__', _metadata)
31 __url__ = _get_meta_var('__url__', _metadata)
32 # defines current platform
32 # defines current platform
33 __platform__ = platform.system()
33 __platform__ = platform.system()
34
34
35 is_windows = __platform__ in ['Windows']
35 is_windows = __platform__ in ['Windows']
36
36
37 requirements = [
37 requirements = [
38 "alembic>=0.8.0,<0.9",
38 "alembic>=0.8.0,<0.9",
39 "GearBox<1",
39 "GearBox<1",
40 "waitress>=0.8.8,<1.0",
40 "waitress>=0.8.8,<1.0",
41 "webob>=1.7,<2",
41 "webob>=1.7,<2",
42 "backlash >= 0.1.1, < 1.0.0",
42 "backlash >= 0.1.2, < 1.0.0",
43 "TurboGears2 >= 2.3.10, < 3.0.0",
43 "TurboGears2 >= 2.3.10, < 3.0.0",
44 "tgext.routes >= 0.2.0, < 1.0.0",
44 "tgext.routes >= 0.2.0, < 1.0.0",
45 "Beaker>=1.7.0,<2",
45 "Beaker>=1.7.0,<2",
46 "WebHelpers==1.3",
46 "WebHelpers==1.3",
47 "formencode>=1.2.4,<=1.2.6",
47 "formencode>=1.2.4,<=1.2.6",
48 "SQLAlchemy>=1.0,<1.1",
48 "SQLAlchemy>=1.0,<1.1",
49 "Mako>=0.9.0,<=1.0.0",
49 "Mako>=0.9.0,<=1.0.0",
50 "pygments>=1.5",
50 "pygments>=1.5",
51 "whoosh>=2.5.0,<=2.5.7",
51 "whoosh>=2.5.0,<=2.5.7",
52 "celery>=3.1,<3.2",
52 "celery>=3.1,<3.2",
53 "babel>=0.9.6,<2.4",
53 "babel>=0.9.6,<2.4",
54 "python-dateutil>=1.5.0,<2.0.0",
54 "python-dateutil>=1.5.0,<2.0.0",
55 "markdown==2.2.1",
55 "markdown==2.2.1",
56 "docutils>=0.8.1",
56 "docutils>=0.8.1",
57 "URLObject==2.3.4",
57 "URLObject==2.3.4",
58 "Routes==1.13",
58 "Routes==1.13",
59 "dulwich>=0.14.1",
59 "dulwich>=0.14.1",
60 "mercurial>=2.9,<4.2",
60 "mercurial>=2.9,<4.2",
61 "decorator >= 3.3.2",
61 "decorator >= 3.3.2",
62 "Paste >= 2.0.3, < 3.0",
62 "Paste >= 2.0.3, < 3.0",
63 ]
63 ]
64
64
65 if sys.version_info < (2, 7):
65 if sys.version_info < (2, 7):
66 requirements.append("importlib==1.0.1")
66 requirements.append("importlib==1.0.1")
67 requirements.append("argparse")
67 requirements.append("argparse")
68
68
69 if not is_windows:
69 if not is_windows:
70 requirements.append("bcrypt>=3.1.0")
70 requirements.append("bcrypt>=3.1.0")
71
71
72 dependency_links = [
72 dependency_links = [
73 ]
73 ]
74
74
75 classifiers = [
75 classifiers = [
76 'Development Status :: 4 - Beta',
76 'Development Status :: 4 - Beta',
77 'Environment :: Web Environment',
77 'Environment :: Web Environment',
78 'Framework :: Pylons',
78 'Framework :: Pylons',
79 'Intended Audience :: Developers',
79 'Intended Audience :: Developers',
80 'License :: OSI Approved :: GNU General Public License (GPL)',
80 'License :: OSI Approved :: GNU General Public License (GPL)',
81 'Operating System :: OS Independent',
81 'Operating System :: OS Independent',
82 'Programming Language :: Python',
82 'Programming Language :: Python',
83 'Programming Language :: Python :: 2.6',
83 'Programming Language :: Python :: 2.6',
84 'Programming Language :: Python :: 2.7',
84 'Programming Language :: Python :: 2.7',
85 'Topic :: Software Development :: Version Control',
85 'Topic :: Software Development :: Version Control',
86 ]
86 ]
87
87
88
88
89 # additional files from project that goes somewhere in the filesystem
89 # additional files from project that goes somewhere in the filesystem
90 # relative to sys.prefix
90 # relative to sys.prefix
91 data_files = []
91 data_files = []
92
92
93 description = ('Kallithea is a fast and powerful management tool '
93 description = ('Kallithea is a fast and powerful management tool '
94 'for Mercurial and Git with a built in push/pull server, '
94 'for Mercurial and Git with a built in push/pull server, '
95 'full text search and code-review.')
95 'full text search and code-review.')
96
96
97 keywords = ' '.join([
97 keywords = ' '.join([
98 'kallithea', 'mercurial', 'git', 'code review',
98 'kallithea', 'mercurial', 'git', 'code review',
99 'repo groups', 'ldap', 'repository management', 'hgweb replacement',
99 'repo groups', 'ldap', 'repository management', 'hgweb replacement',
100 'hgwebdir', 'gitweb replacement', 'serving hgweb',
100 'hgwebdir', 'gitweb replacement', 'serving hgweb',
101 ])
101 ])
102
102
103 # long description
103 # long description
104 README_FILE = 'README.rst'
104 README_FILE = 'README.rst'
105 try:
105 try:
106 long_description = open(README_FILE).read()
106 long_description = open(README_FILE).read()
107 except IOError as err:
107 except IOError as err:
108 sys.stderr.write(
108 sys.stderr.write(
109 "[WARNING] Cannot find file specified as long_description (%s)\n"
109 "[WARNING] Cannot find file specified as long_description (%s)\n"
110 % README_FILE
110 % README_FILE
111 )
111 )
112 long_description = description
112 long_description = description
113
113
114 import setuptools
114 import setuptools
115
115
116 # monkey patch setuptools to use distutils owner/group functionality
116 # monkey patch setuptools to use distutils owner/group functionality
117 from setuptools.command import sdist
117 from setuptools.command import sdist
118 sdist_org = sdist.sdist
118 sdist_org = sdist.sdist
119 class sdist_new(sdist_org):
119 class sdist_new(sdist_org):
120 def initialize_options(self):
120 def initialize_options(self):
121 sdist_org.initialize_options(self)
121 sdist_org.initialize_options(self)
122 self.owner = self.group = 'root'
122 self.owner = self.group = 'root'
123 sdist.sdist = sdist_new
123 sdist.sdist = sdist_new
124
124
125 packages = setuptools.find_packages(exclude=['ez_setup'])
125 packages = setuptools.find_packages(exclude=['ez_setup'])
126
126
127 setuptools.setup(
127 setuptools.setup(
128 name='Kallithea',
128 name='Kallithea',
129 version=__version__,
129 version=__version__,
130 description=description,
130 description=description,
131 long_description=long_description,
131 long_description=long_description,
132 keywords=keywords,
132 keywords=keywords,
133 license=__license__,
133 license=__license__,
134 author=__author__,
134 author=__author__,
135 author_email='kallithea@sfconservancy.org',
135 author_email='kallithea@sfconservancy.org',
136 dependency_links=dependency_links,
136 dependency_links=dependency_links,
137 url=__url__,
137 url=__url__,
138 install_requires=requirements,
138 install_requires=requirements,
139 classifiers=classifiers,
139 classifiers=classifiers,
140 data_files=data_files,
140 data_files=data_files,
141 packages=packages,
141 packages=packages,
142 include_package_data=True,
142 include_package_data=True,
143 message_extractors={'kallithea': [
143 message_extractors={'kallithea': [
144 ('**.py', 'python', None),
144 ('**.py', 'python', None),
145 ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
145 ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
146 ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}),
146 ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}),
147 ('public/**', 'ignore', None)]},
147 ('public/**', 'ignore', None)]},
148 zip_safe=False,
148 zip_safe=False,
149 entry_points="""
149 entry_points="""
150 [console_scripts]
150 [console_scripts]
151 kallithea-api = kallithea.bin.kallithea_api:main
151 kallithea-api = kallithea.bin.kallithea_api:main
152 kallithea-gist = kallithea.bin.kallithea_gist:main
152 kallithea-gist = kallithea.bin.kallithea_gist:main
153 kallithea-config = kallithea.bin.kallithea_config:main
153 kallithea-config = kallithea.bin.kallithea_config:main
154
154
155 [paste.app_factory]
155 [paste.app_factory]
156 main = kallithea.config.middleware:make_app
156 main = kallithea.config.middleware:make_app
157
157
158 [gearbox.commands]
158 [gearbox.commands]
159 make-config=kallithea.lib.paster_commands.make_config:Command
159 make-config=kallithea.lib.paster_commands.make_config:Command
160 setup-db=kallithea.lib.paster_commands.setup_db:Command
160 setup-db=kallithea.lib.paster_commands.setup_db:Command
161 cleanup-repos=kallithea.lib.paster_commands.cleanup:Command
161 cleanup-repos=kallithea.lib.paster_commands.cleanup:Command
162 update-repoinfo=kallithea.lib.paster_commands.update_repoinfo:Command
162 update-repoinfo=kallithea.lib.paster_commands.update_repoinfo:Command
163 make-rcext=kallithea.lib.paster_commands.make_rcextensions:Command
163 make-rcext=kallithea.lib.paster_commands.make_rcextensions:Command
164 repo-scan=kallithea.lib.paster_commands.repo_scan:Command
164 repo-scan=kallithea.lib.paster_commands.repo_scan:Command
165 cache-keys=kallithea.lib.paster_commands.cache_keys:Command
165 cache-keys=kallithea.lib.paster_commands.cache_keys:Command
166 ishell=kallithea.lib.paster_commands.ishell:Command
166 ishell=kallithea.lib.paster_commands.ishell:Command
167 make-index=kallithea.lib.paster_commands.make_index:Command
167 make-index=kallithea.lib.paster_commands.make_index:Command
168 upgrade-db=kallithea.lib.dbmigrate:UpgradeDb
168 upgrade-db=kallithea.lib.dbmigrate:UpgradeDb
169 celeryd=kallithea.lib.paster_commands.celeryd:Command
169 celeryd=kallithea.lib.paster_commands.celeryd:Command
170 install-iis=kallithea.lib.paster_commands.install_iis:Command
170 install-iis=kallithea.lib.paster_commands.install_iis:Command
171 """,
171 """,
172 )
172 )
General Comments 0
You need to be logged in to leave comments. Login now