diff --git a/README.rst b/README.rst index 1a12722..f88eb4a 100644 --- a/README.rst +++ b/README.rst @@ -23,9 +23,9 @@ Requirements ============ -Postorius requires Python 2.6 or newer and mailman.client, +Postorius requires Python 2.7 or newer and mailmanclient, the official Python bindings for GNU Mailman, it also requires -django-social-auth. +django-browserid. The minimum Django version is 1.8. Postorius needs a running version of GNU Mailman version 3. @@ -42,12 +42,13 @@ ============ To install GNU Mailman follow the instructions in the documentation: -http://packages.python.org/mailman/ +http://mailman.readthedocs.org/ -A description how to run Postorius on Django's dev server or using -Apache/mod_wsgi, can be found in the package documentation: +A description how to run Postorius on Django's dev server or deploying it +using Apache/mod_wsgi or Nginx/uwsig, can be found in the package documentation: src/postorius/doc/setup.rst +src/postorius/doc/deployment.rst Acknowledgements @@ -56,9 +57,3 @@ Many thanks go out to Anna Senarclens de Grancy and Benedict Stein for developing the initial versions of this Django app during the Google Summer of Code 2010 and 2011. - - -Icons -===== - -Postorius uses the WPZOOM Developer Icon Set (http://www.wpzoom.com). diff --git a/src/postorius/doc/deployment.rst b/src/postorius/doc/deployment.rst new file mode 100644 index 0000000..2aa5757 --- /dev/null +++ b/src/postorius/doc/deployment.rst @@ -0,0 +1,129 @@ +============ +Deployment +============ + +.. note:: + This guide covers deployment options of Postorius. + + +Nginx with uwsgi +================ + +.. note:: + Please refer to nginx and uwsgi documentation for explanation of the shown + snippets. + +Below is an example uwsgi configuration file: + +:: + [uwsgi] + + chdir = /srv/django/mailman + module = postorius_standalone.wsgi + virtualenv = /srv/django/mailman/env + + master = true + processes = 4 + socket = /run/uwsgi/mailman.sock + #chmod-socket = 666 + + vacuum = true + plugin = python2 + + uid = http + gid = http + +And a nginx server section to with it: + +:: + + upstream mailman { + server unix:///run/uwsgi/mailman.sock; + } + + server { + listen 80; + # TODO Replace with your domain + server_name lists.example.com; + return 301 https://$server_name$request_uri; + + } + + ## Config for server secured with https + server { + listen 443; + + # TODO Replace with your domain + server_name lists.example.com; + + + ssl on; + # TODO Replace with your crt and key + ssl_certificate /etc/nginx/keys/lists.example.com.crt; + ssl_certificate_key /etc/nginx/keys/lists.example.com.key; + ssl_session_timeout 5m; + ssl_ciphers 'AES128+EECDH:AES128+EDH'; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_prefer_server_ciphers on; + add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"; + + charset utf-8; + + # max upload size + client_max_body_size 75M; # adjust to taste + + location /static { + # TODO Adjust to your static location + alias /srv/django/mailman/public/static; + } + + # Finally, send all non-media requests to the Django server. + location / { + uwsgi_pass mailman; + include /etc/nginx/uwsgi_params; # the uwsgi_params file you installed + } + } + + +Apache with mod_wsgi +==================== + +.. note:: + This guide assumes that you know how to setup a VirtualHost with Apache. + If you are using SQLite, the ``.db`` file as well as its folder need to be + writable by the web server. + +These settings need to be added to your Apache VirtualHost: + +:: + + Alias /static /path/to/postorius_standalone/static + + Order deny,allow + Allow from all + + + WSGIScriptAlias / /path/to/postorius_standalone/srv/postorius.wsgi + + Order deny,allow + Allow from all + + +The first Alias serves the static files (CSS, JS, Images, etc.). The +WSGIScriptAlias serves the Django application. The paths need to be changed +depending on which location you downloaded ``postorius_standalone`` to. + +Final setup instructions +======================== + +We're almost ready. But you need to create translations and collect the static +files from Postorius (which resides somewhere on your pythonpath) to be able to +serve them from the site directory. All you have to do is to change into the +``postorius_standalone`` directory and run: + +:: + + $ python manage.py compilemessages + $ python manage.py collectstatic + +After reloading the webserver Postorius should be running! diff --git a/src/postorius/doc/development.rst b/src/postorius/doc/development.rst index 1b332d1..1dc3349 100644 --- a/src/postorius/doc/development.rst +++ b/src/postorius/doc/development.rst @@ -15,7 +15,10 @@ Changes are not made directly in the project's master branch, but in feature-related personal branches, which get reviewed and then merged into -the master branch. +the master branch. There is a contribution guide here_, that mentions the basics +about contributing to any mailman project. + +.. _here: http://wiki.list.org/DEV/HowToContributeGit An ideal workflow would be like this: diff --git a/src/postorius/doc/index.rst b/src/postorius/doc/index.rst index c4d09bf..1fa709a 100644 --- a/src/postorius/doc/index.rst +++ b/src/postorius/doc/index.rst @@ -16,3 +16,4 @@ news.rst setup.rst development.rst + deployment.rst diff --git a/src/postorius/doc/news.rst b/src/postorius/doc/news.rst index 4d5e59d..015823b 100644 --- a/src/postorius/doc/news.rst +++ b/src/postorius/doc/news.rst @@ -20,6 +20,13 @@ along with Postorius. If not, see . +1.0.3 +===== +(2016-02-03) + +* Fix security issue + + 1.0.2 ===== (2015-11-14) diff --git a/src/postorius/doc/setup.rst b/src/postorius/doc/setup.rst index 82c3993..62e86d0 100644 --- a/src/postorius/doc/setup.rst +++ b/src/postorius/doc/setup.rst @@ -7,7 +7,7 @@ GNU Mailman 3. To install GNU Mailman follow the instructions in the `documentation`_. If you are looking for an easy way to set up the whole GNU Mailman 3 - suite (GNU Mailman 3, Postorius, Hyperkitty and mailman.client), check + suite (GNU Mailman 3, Postorius, Hyperkitty and mailmanclient), check out the `mailman-bundler`_ project on GitLab. .. _mailman-bundler: https://gitlab.com/mailman/mailman-bundler @@ -25,13 +25,13 @@ :: - $ sudo pip install postorius + $ pip install postorius or: :: - $ sudo easy_install postorius + $ easy_install postorius Latest dev version @@ -44,7 +44,7 @@ $ git clone https://gitlab.com/mailman/postorius.git $ cd postorius - $ sudo python setup.py develop + $ python setup.py develop Setup your django project @@ -102,43 +102,3 @@ You should use the development server only locally. While it's possible to make your site publicly available using the dev server, you should never do that in a production environment. - - -Running Postorius on Apache with mod_wsgi -========================================= - -.. note:: - This guide assumes that you know how to setup a VirtualHost with Apache. - If you are using SQLite, the ``.db`` file as well as its folder need to be - writable by the web server. - -These settings need to be added to your Apache VirtualHost: - -:: - - Alias /static /path/to/postorius_standalone/static - - Order deny,allow - Allow from all - - - WSGIScriptAlias / /path/to/postorius_standalone/srv/postorius.wsgi - - Order deny,allow - Allow from all - - -The first Alias serves the static files (CSS, JS, Images, etc.). The -WSGIScriptAlias serves the Django application. The paths need to be changed -depending on which location you downloaded ``postorius_standalone`` to. - -We're almost ready. But you need to collect the static files from Postorius -(which resides somewhere on your pythonpath) to be able to serve them from the -site directory. All you have to do is to change into the -``postorius_standalone`` directory and run: - -:: - - $ python manage.py collectstatic - -After reloading the webserver Postorius should be running!