June 21, 2026
11:16 a.m.
Sometimes when I reboot the machine, I experience that mailman doesn't
start because the files /opt/mailman3/mm/var/locks/master.lck* isn't
deleted during shutdown. Maybe one way to solve this could be to use
ExecStartPre directive in the systemd service to remove the lock files.
What's the best practice to solve this problem? BTW I've noticed that
doing systemctl stop mailman3 takes a very long time, 45 secs. or
something like that.
Mailman 3.3.10
Python 3.12.13
[Unit]
Description=GNU Mailing List Manager
After=syslog.target network.target postgresql.service
[Service]
Type=forking
PIDFile=/opt/mailman3/mm/var/master.pid
User=mailman3
Group=mailman3
Environment="MAILMAN_CONFIG_FILE=/etc/mailman3/mailman.cfg"
ExecStart=/opt/mailman3/venv/bin/mailman start
ExecReload=/opt/mailman3/venv/bin/mailman restart
ExecStop=/opt/mailman3/venv/bin/mailman stop
# Tested, but have no effect on deletion of the lock file.
#Restart=on-failure
#RestartSec=15
[Install]
WantedBy=multi-user.target
Lars