|
**Mailman3 Notes**
|
|
## Mailman3 Installation HOWTO
|
|
|
|
|
|
This tutorial will go through mailman3 installation with postfix in a Debian OS. It assumes that postfix (a Mail Transport Agent, aka MTP) and mailutils are already installed in the system and configured, and the system can send emails, e.x root user is sending admin related emails. It also assumes that python3, postgresql and apache2 are installed in the system too.
|
|
This tutorial is all about how to install mailman3 in a Debian server with Apache2, and how to migrate existing lists from older mailman versions. It is intended specifically for sysadmins, and users in general who are curious of how machines and networks work. It assumes that postfix (a Mail Transport Agent, aka MTA) and mailutils are already installed in the system and configured, and the system can send emails, e.g the root user is sending admin related emails. It also assumes that python3, postgresql and apache2 are installed in the system too. Postfix is one of the possible MTA to be configured with mailman3. Detailed steps for configuring a fresh postfix install and few other MTA options, are included in the official[ mailman3 docs](https://mailman.readthedocs.io/en/latest/src/mailman/docs/mta.html).
|
|
|
|
|
|
**A. SSH to the remote server**
|
|
### Install Dependency Libraries
|
|
|
|
We SSH to the remote server and as root do a system update with `apt update && apt upgrade`. Then we can install some system-wide dependencies for python development tools, python virtual environment, a CSS compressor and an HTML to plaintext convertor:
|
|
enter root user and do a system update with apt update && apt upgrade. Install dependencies:
|
|
|
|
|
|
|
|
`sudo apt install python3-dev python3-venv sassc lynx`
|
|
`sudo apt install python3-dev python3-venv sassc lynx`
|
|
|
|
|
|
install rust, needed for python Cryptography library later on
|
|
Then we install rust from source, which is needed for python Cryptography library later on:
|
|
```
|
|
```
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
|
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
|
# rustc --version
|
|
# rustc --version
|
|
```
|
|
```
|
|
Install some more:
|
|
Install some extra dependencies for softwate compiling:
|
|
|
|
|
|
`# apt-get install build-essential libssl-dev libffi-dev python3-dev cargo`
|
|
`# apt-get install build-essential libssl-dev libffi-dev python3-dev cargo`
|
|
|
|
|
|
|
|
Ref:
|
|
https://docs.mailman3.org/en/latest/install/virtualenv.html#installing-dependencies
|
|
https://docs.mailman3.org/en/latest/install/virtualenv.html#installing-dependencies
|
|
also GNU mailman wiki suggests to install:
|
|
|
|
|
|
*Also GNU mailman wiki suggests to install the following for memory cache, throttle too many failed server connections and an internalization library to support multilingual environments:*
|
|
```
|
|
```
|
|
# apt install memcached
|
|
# apt install memcached
|
|
# apt install fail2ban
|
|
# apt install fail2ban
|
|
# apt install gettext
|
|
# apt install gettext
|
|
```
|
|
```
|
|
* for the sass installation the easier for debian is to download from source and make a symbolic link to /usr/local/bin
|
|
*for the sass installation the easiest for a Debian OS is to download from source and make a symbolic link to /usr/local/bin*
|
|
```
|
|
```
|
|
# cd /usr/local/lib
|
|
# cd /usr/local/lib
|
|
# wget https://github.com/sass/dart-sass/releases/download/1.32.5/dart-sass-1.32.5-linux-x64.tar.gz
|
|
# wget https://github.com/sass/dart-sass/releases/download/1.32.5/dart-sass-1.32.5-linux-x64.tar.gz
|
... | @@ -32,33 +34,30 @@ also GNU mailman wiki suggests to install: |
... | @@ -32,33 +34,30 @@ also GNU mailman wiki suggests to install: |
|
# ln -s /usr/local/lib/dart-sass/sass /usr/local/bin/sass
|
|
# ln -s /usr/local/lib/dart-sass/sass /usr/local/bin/sass
|
|
# rm -f dart-sass-1.32.5-linux-x64.tar.gz
|
|
# rm -f dart-sass-1.32.5-linux-x64.tar.gz
|
|
```
|
|
```
|
|
ref https://wiki.list.org/DOC/Howto_Install_Mailman3_On_Debian10
|
|
|
|
|
|
|
|
**B. Create a postgresql database for mailman**
|
|
Ref https://wiki.list.org/DOC/Howto_Install_Mailman3_On_Debian10
|
|
|
|
|
|
|
|
### Create a postgresql database for mailman
|
|
|
|
|
|
https://docs.mailman3.org/en/latest/install/virtualenv.html#setup-database
|
|
https://docs.mailman3.org/en/latest/install/virtualenv.html#setup-database
|
|
|
|
|
|
**C. Setup mailman user and directory**
|
|
### Setup mailman user and directory
|
|
|
|
|
|
`useradd -m -d /opt/mailman -s /usr/bin/bash mailman`
|
|
`useradd -m -d /opt/mailman -s /usr/bin/bash mailman`
|
|
|
|
|
|
chown dir for user
|
|
enter user mailman and create
|
|
enter user mailman
|
|
|
|
|
|
|
|
https://docs.mailman3.org/en/latest/install/virtualenv.html#setup-mailman-user
|
|
|
|
|
|
|
|
**D. Go to mailman’s dir and create a virtualenv**
|
|
Go to mailman’s dir and create a virtualenv
|
|
|
|
|
|
`python3 -m venv venv`
|
|
`python3 -m venv venv`
|
|
|
|
|
|
https://docs.mailman3.org/en/latest/install/virtualenv.html#virtualenv-setup
|
|
Ref: https://docs.mailman3.org/en/latest/install/virtualenv.html#virtualenv-setup
|
|
|
|
|
|
**E. Install Mailman and other python libraries**
|
|
## Install Mailman and other python libraries
|
|
|
|
|
|
`(venv)$ pip install wheel mailman psycopg2-binary mailman-web mailman-hyperkitty`
|
|
`(venv)$ pip install wheel mailman psycopg2-binary mailman-web mailman-hyperkitty`
|
|
|
|
|
|
mailman-web provides hyperkitty and postorius for the web interface, as well as shortcuts to django admin commands
|
|
mailman-web provides hyperkitty and postorius for the web interface, as well as shortcuts to django admin commands. Install the following for mailman-web application to be able to talk with apache2 server gateway:
|
|
Install the following for mailman-web application to be able to talk with apache2 server gateway
|
|
|
|
|
|
|
|
`pip install pylibmc gunicorn`
|
|
`pip install pylibmc gunicorn`
|
|
|
|
|
... | | ... | |