Mailman 3 Installation¶
Welcome to the installation instructions for the Mailman 3 Suite.
GitLab Setup¶
In case you want to have a bleeding edge install and/or want to contribute, you should setup an account on GitLab and use SSH. You can also just use the public https urls if you just want to download the needed repositories.
- Register on GitLab.
- Generate a SSH key using ssh-keygen and upload the public key to you GitLab Profile.
- Fork the project you want to contribute to (Mailman-core, Postorius, Hyperkitty, mailmanclient, django-mailman3).
- Clone your forks or the original projects using their SSH url to some directory. Throughout this documentation ~/dev/mailman is used.
- For every fork add an upstream url using git remote add upstream git@gitlab.com/mailman/<repo name> so you can download new commits.
This will result in you having subdirectories in dev/mailman including all the source code of the Mailman 3 suite.
Installation¶
Note
The backend requires Python 3.4 or newer while the frontend requires Python 2.7
If you want to install a production setup please continue reading. If you instead want to end up with a development setup or want to have a bleeding edge production installation follow the developer instructions.
Note
For now no packages exist that you can install using your package manager, so you will have to use pip to install Mailman.
Backend¶
It is recommended to run mailman using a dedicated user. Consider using the user
mailman
with the home directory /var/lib/mailman
If you wish you can use a virtual enviroment which is considered to be best practice for deploying Python applications:
$ python -m venv /var/lib/mailman/env $ source /var/lib/mailman/env/bin/activate
Mailman can be installed using:
$ pip install mailman
If you whish to use the new archiver Hyperkitty, you need to install a plugin:
$ pip install mailman-hyperkitty-plugin
Frontend¶
This guide assumes the frontend is being installed to /srv/django/mailman
.
Clone the settings from mailman-suite:
$ git clone git@gitlab.com/thelinuxguy/mailman-suite /srv/django/mailman
Create a virtualenv in /srv/django/mailman/env/
:
$ virtualenv -p python2 /srv/django/mailman/env $ source /srv/django/mailman/env
At this point you need to decide what you want to install. The frontend of
Mailman 3 is split into two projects. You can choose to install only one or
both. Hyperkitty is the new archiver and Postorius is the new management
interface. Since there is no known alternative to Postorius, you probably want to use
it, while you may choose to not provide archives in which case omit
hyperkitty
from the command:
$ pip install postorius hyperkitty
You will need a Django project to deploy the frontend. At this point you should make yourself familiar with Django which provides excellent documentation. You should at least read the section about Settings.
Configuration¶
Backend¶
Create an initial configuration. If you installed mailman into a virtual
environment the path would be /var/lib/mailman/env/bin/mailman
:
$ su mailman
$ cd /var/lib/mailman
$ /path/to/mailman info
This will create all relevant directories in /var/lib/mailman/var/
Refer to Mailman Core’s documentation on how to configure the backend.
Frontend¶
You should have cloned a django project in /srv/django/mailman
. If not, do
it now:
$ git clone git@gitlab.com/thelinuxguy/mailman-suite /srv/django/mailman
The provided settings.py
has some general Django settings. If you want to
activate Hyperkitty (Archives), you need to replace the import statement at the
very end of the document.