User Tools

Site Tools


install_gnu_mailman_3_on_fedora_server_29

Install GNU Mailman 3 on Fedora Server 29

As root:

useradd -r mailman
usermod -L mailman

mkdir /opt/mailman
usermod -d /opt/mailman mailman
chown mailman:mailman /opt/mailman

dnf install python3-virtualenv python3-setuptools gcc
su mailman

As mailman:

cd /opt/mailman
git clone https://gitlab.com/mailman/mailman.git
virtualenv -p python3 env
source env/bin/activate

Install Mailman in the virtual environment:

(env) bash-4.4$ cd /opt/mailman/mailman
(env) bash-4.4$ python3 setup.py build
(env) bash-4.4$ python3 setup.py install
(env) bash-4.4$ which mailman
/opt/mailman/env/bin/mailman

Check installation results:

(env) bash-4.4$ cd /opt/mailman

(env) bash-4.4$ mailman info
GNU Mailman 3.2.0+ (Tom Sawyer)
Python 3.7.2 (default, Jan  3 2019, 09:14:01) 
...
config file: /opt/mailman/var/etc/mailman.cfg
db url: sqlite:////opt/mailman/var/data/mailman.db
...
(env) bash-4.4$ tree var
var
├── archives
├── cache
├── data
│   └── mailman.db
├── etc
│   └── mailman.cfg
├── lists
├── locks
├── logs
│   ├── bounce.log
│   ├── debug.log
│   ├── mailman.log
│   ├── plugins.log
│   └── smtp.log
├── messages
├── queue
│   ├── archive
│   ├── bad
│   ├── bounces
│   ├── command
│   ├── digest
│   ├── in
│   ├── nntp
│   ├── out
│   ├── pipeline
│   ├── retry
│   ├── shunt
│   └── virgin
└── templates

Edit /opt/mailman/var/etc/mailman.cfg as follows.

[mailman]
site_owner: root@openhsc.org

Start Mailman:

(env) bash-4.4$ mailman start
Starting Mailman's master runner

Create a mailing list:

(env) bash-4.4$ mailman create list@openhsc.org
Created mailing list: list@openhsc.org

Follow https://mailman.readthedocs.io/en/latest/src/mailman/docs/mta.html#transport-maps to reconfigure Postfix.

Create /etc/systemd/system/mailman.service:

[Unit]
Description=GNU Mailing List Manager
After=syslog.target network.target

[Service]
Type=forking
PIDFile=/opt/mailman/var/master.pid
User=mailman
Group=mailman
WorkingDirectory=/opt/mailman
ExecStart=/opt/mailman/env/bin/mailman start
ExecReload=/opt/mailman/env/bin/mailman restart
ExecStop=/opt/mailman/env/bin/mailman stop

[Install]
WantedBy=multi-user.target
install_gnu_mailman_3_on_fedora_server_29.txt · Last modified: 2019/01/22 19:35 by root