
this mailman3.service file seems to work better than the one on the mailman website: ( https://docs.list.org/en/latest/install/virtualenv.html#setup-virtualenv ) Thanks to "oneshot" !
# /etc/systemd/system/mailman3.service[Unit]Description=GNU Mailing List Manager (Mailman Core, venv)After=network.target postgresql.service [Service]Type=oneshotUser=mailmanGroup=mailmanEnvironment="MAILMAN_CONFIG_FILE=/etc/mailman3/mailman.cfg"# Optional but nice if PATH matters elsewhere:# Environment=PATH=/opt/mailman/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin # Start/stop via Mailman's own supervisor. --force avoids stale-lock wedging.ExecStart=/opt/mailman/venv/bin/mailman start --forceExecStop=/opt/mailman/venv/bin/mailman stop # Tell systemd we consider the service 'up' after ExecStart exits.RemainAfterExit=yes # Reasonable timeouts so systemd doesn't kill slow boots/shutdownsTimeoutStartSec=60TimeoutStopSec=60 [Install]WantedBy=multi-user.target
On Thu, Aug 14, 2025 at 7:58 PM Piet Barber <pb@pietbarber.com> wrote:
On Thu, Aug 14, 2025 at 3:03 AM Stephen J. Turnbull <steve@turnbull.jp> wrote:
Piet Barber via Mailman-users writes:
However, when I follow the systemctl startup scripts as per the instructions at the URL above, it get stuck in the startup ... forever
What makes you think it's stuck? Have you actually tried to use it? If not, it's probably just that systemd messages were not written to be understood by ordinary mortals.
root@arcus:/etc/systemd/system# systemctl start mailman3 (extreeeeemelllyyy loooooong wait of nothing ensues)
Eventually I get:
root@arcus:/etc/systemd/system# time systemctl start mailman3 *Job for mailman3.service failed because a timeout was exceeded.**See "systemctl status mailman3.service" and "journalctl -xeu mailman3.service" for details.*
real 0m19.442s user 0m0.002s sys 0m0.012s root@arcus:/etc/systemd/system#
the journalctl output is as follows:
Aug 14 23:48:24 arcus mailman[5624]: Starting Mailman's master runner Aug 14 23:48:24 arcus mailman[5624]: Generating MTA alias maps Aug 14 23:48:24 arcus systemd[1]: mailman3.service: Can't open PID file /opt/mailman/mm/var/master.pid (yet?) after start: No such file or direct> Aug 14 23:48:29 arcus mailman[5645]: /opt/mailman/venv/lib/python3.12/site-packages/mailman/rest/wsgiapp.py:185: DeprecatedWarning: The RequestOp> Aug 14 23:48:29 arcus mailman[5645]: self.req_options.auto_parse_form_urlencoded = True Aug 14 23:49:53 arcus systemd[1]: *mailman3.service: start operation timed out. Terminating.* Aug 14 23:49:55 arcus systemd[1]: *mailman3.service: Failed with result 'timeout'.*░░ Subject: Unit failed░░ Defined-By: systemd░░ Support: http://www.ubuntu.com/support░░ ░░ The unit mailman3.service has entered the 'failed' state with result 'timeout'. Aug 14 23:49:55 arcus systemd[1]: *Failed to start mailman3.service - GNU Mailing List Manager.*░░ Subject: A start job for unit mailman3.service has failed░░ Defined-By: systemd░░ Support: http://www.ubuntu.com/support░░ ░░ A start job for unit mailman3.service has finished with a failure.░░ ░░ The job identifier is 1153 and the job result is failed. Aug 14 23:49:55 arcus systemd[1]: mailman3.service: Consumed 13.298s CPU time.░░ Subject: Resources consumed by unit runtime░░ Defined-By: systemd░░ Support: http://www.ubuntu.com/support░░ ░░ The unit mailman3.service completed and consumed the indicated resources. Aug 14 23:50:10 arcus systemd[1]: mailman3.service: Scheduled restart job, restart counter is at 3.░░ Subject: Automatic restarting of a unit has been scheduled░░ Defined-By: systemd░░ Support: http://www.ubuntu.com/support░░ ░░ Automatic restarting of the unit mailman3.service has been scheduled, as the result for░░ the configured Restart= setting for the unit. Aug 14 23:50:10 arcus systemd[1]: Starting mailman3.service - GNU Mailing List Manager...░░ Subject: A start job for unit mailman3.service has begun execution░░ Defined-By: systemd░░ Support: http://www.ubuntu.com/support░░ ░░ A start job for unit mailman3.service has begun execution.░░ ░░ The job identifier is 1525.
The system works fine when i su to mailman and run the startup script in /opt. The system doesn't work when I use the systemctl command. Apparently it's waiting for something to happen before the system creates a pidfile in /opt/mailman/m/var/master.pid
Do you have mailman3 starting from a startup script? What does your /etc/systemd/system/mailman3.service file look like? Mine looks just like the one on the mailman configuration site. I have to be doing something stupid for it not to work. I just can't figure out what stupid thing I'm doing wrong.
Also, removing the word "Forking" from the systemctl configuration file has no effect, except that it takes longer for the mailman3 startup script to fail.
root@arcus:/etc/systemd/system# time systemctl start mailman3 *Job for mailman3.service failed because a timeout was exceeded.**See "systemctl status mailman3.service" and "journalctl -xeu mailman3.service" for details.*
real 1m23.491s user 0m0.006s sys 0m0.004s root@arcus:/etc/systemd/system#
I'm about to jump out the window on this one. I've been stuck on this for four weeks.
Here's my mailman3.service file:
[Unit]Description=GNU Mailing List ManagerAfter=syslog.target network.target postgresql.service [Service]#Type=forking#PIDFile=/opt/mailman/mm/var/master.pidUser=mailmanGroup=mailmanEnvironment="MAILMAN_CONFIG_FILE=/etc/mailman3/mailman.cfg"ExecStart=/opt/mailman/venv/bin/mailman startExecReload=/opt/mailman/venv/bin/mailman restartExecStop=/opt/mailman/venv/bin/mailman stopRestart=on-failureRestartSec=15
[Install]WantedBy=multi-user.target
-- Piet Barber http://www.pietbarber.com/ http://blog.pietbarber.com/
-- Piet Barber http://www.pietbarber.com/ http://blog.pietbarber.com/