« Previous 1 2 3 4 Next »
Mailman 3.0 – a long time coming
The Postman Cometh
Installation with Bundler
The following procedure is the one I used to install Mailman for this article. However, since I began testing Mailman 3, the project has been brought together on GitLab [7] and includes all the components mentioned, as well as a Mailman suite. The installation process may differ somewhat now, and you should check the most recent documentation.
Mailman Bundler installs most required components. The following are required to start:
- Packages for Python 2.7 (package name is usually
python
) and Python 3.4 (usuallypython3
orpython34
). - Virtualenv (package name
python-virtualenv
). - Pip installer (
python-pip
). - GCC for some packages.
- Node.js LESS CSS compiler (
node-less
). - The Postfix mail server.
An error occurred during test installations of the Mailman Bundler package 3.0.0 [8] used for this article, but it has already been fixed, so you should be sure to load a current development version.
Installing the test environment is accomplished easily in a subdirectory. Alternatively, you can create a separate user on the system to operate Mailman and simply put the Mailman environment in its home directory.
First, I loaded the current version of Mailman Bundler from the repository, switched to that directory, created a virtual Python environment (for Python 2.7), and activated it:
bzr branch lp:mailman-bundler cd mailman-bundler virtualenv venv source venv/bin/activate
Second, I used the Pip installer to install the Buildout tool.
The installer performs the installation of the components based on the specifications in buildout.cfg
:
pip install zc.buildout buildout
If the installation terminates (e.g., because of a missing library), it is possible to continue until it is complete by restarting buildout
.
Buildout was not able to install the python-social-auth
component in my tests. Although this problem has been solved [9], at the time of publication it had not yet been added to the library. Simply install the package manually and then continue with the installation:
pip install python-social-auth
Manual installation can also be repeated for other components, as required.
Buildout creates a virtual environment for Python 3.4 during the installation process, which can be enabled as required with:
source venv-3.4/bin/activate
The components' start scripts ensure use of the respective environment.
Initialize the database for the Django-based web components and create a superuser:
./bin/mailman-post-update ./bin/mailman-web-django-admin createsuperuser
Make sure to configure a superuser email address; otherwise, at least in the tested version, you'll get mysterious error messages when using the web interface.
To operate the services in the test environment, start:
./bin/mailman start ./bin/mailman-web-django-admin runserver &
New services that can only be accessed from the local machine via the IP address 127.0.0.1 are running on three TCP ports. Ports 8001 and 8024 appeared in a netstat
listing in connection with a Python 3.4 process. This is Mailman Core, which connects the REST API on port 8001 and the local mail transfer protocol (LMTP) connection for the mail server's incoming mail on port 8024.
The Django web interface is accessible on port 8000 and presents the interface to the user. You can supply this port externally through a firewall or proxy rule or use it locally first in the environment only intended for tests.
Email Connection to Postfix
An example configuration is available as an aid for connecting to Postfix. Mailman Bundler adapts the paths contained therein to the local environment. Unfortunately, it is not possible to download further settings via include
files in Postfix's main configuration file.
Therefore, you need to add them to the existing configuration, usually in /etc/postfix/main.cf
. Three lines with references to files that Mailman Core manages are included. They are automatically maintained when creating a new mailing list. Mailman automatically accesses the postmap
command after the update, because the files are hashed instead of in plain text.
Getting Started
You can log on to the front end via a web browser. The two standalone web applications Postorius and HyperKitty have a uniform look and are rudimentarily cross-linked by Mailman Bundler during the installation. Fundamentally, however, both systems can be operated separately and independently of Mailman Core.
To add a domain to the system, you use the management interface Postorius (Figure 2) then add lists to the domain in another step. If any error messages appear after creating a list, you are often missing a postmap
or running with restricted file permissions.
« Previous 1 2 3 4 Next »
Buy this article as PDF
(incl. VAT)