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. A. SSH to the remote server enter root user and do a system update with apt update && apt upgrade. Install dependencies:
sudo apt install python3-dev python3-venv sassc lynx
install rust, needed for python Cryptography library later on
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# rustc --version
Install some more:
# apt-get install build-essential libssl-dev libffi-dev python3-dev cargo
https://docs.mailman3.org/en/latest/install/virtualenv.html#installing-dependencies
also GNU mailman wiki suggests to install
# apt install memcached
# apt install fail2ban
# apt install gettext
fireworks.png
* for the sass installation the easier for debian is to download from source and make a symbolic link to /usr/local/bin
# 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
# tar -xf dart-sass-1.32.5-linux-x64.tar.gz
# chmod -R 755 dart-sass
# ln -s /usr/local/lib/dart-sass/sass /usr/local/bin/sass
# 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
https://docs.mailman3.org/en/latest/install/virtualenv.html#setup-database
C. Setup mailman user and directory
useradd -m -d /opt/mailman -s /usr/bin/bash mailman
chown dir for user
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
python3 -m venv venv
https://docs.mailman3.org/en/latest/install/virtualenv.html#virtualenv-setup
E. Install Mailman and other python libraries
(venv)$ pip install wheel mailman psycopg2-binary
pip install mailman-web mailman-hyperkitty
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
pip install pylibmc gunicorn
https://docs.mailman3.org/en/latest/install/virtualenv.html#installing-mailman-core
F. Mailman and hyperkitty configurations:
Exit mailman user and as a root we create
/etc/mailman3/ dir, make owner of this dir the user mailman and create the files mailman.cfg and settings.py in the /etc dir and mailman-hyperkitty.cfg in mailman's user dir (have a look at these files)
https://docs.mailman3.org/en/latest/install/virtualenv.html#installing-mailman-core
https://docs.mailman3.org/en/latest/install/virtualenv.html#initial-configuration