
Hello, I'm trying to get mailman3 working on Ubuntu.
I'm following these instructions: https://docs.list.org/en/latest/install/virtualenv.html#setup-virtualenv
I've gotten to the point where I can successfully su - to the mailman3 user, and manually start the mailman3 process with the startup command.
However, when I follow the systemctl startup scripts as per the instructions at the URL above, it get stuck in the startup ... forever
Starting from the command line works great!
(venv) mailman@arcus:~$ /opt/mailman/venv/bin/mailman start Starting Mailman's master runner Generating MTA alias maps (venv) mailman@arcus:~$ (venv) mailman@arcus:~$ /opt/mailman/venv/bin/mailman status GNU Mailman is running (master pid: 47815)
But when I try to start it from systemctl, it just hangs forever... root@arcus:/etc/nginx# systemctl start mailman3
If I background it, and check it out from systemctl status, I get that It's stuck in the startup mode.
root@arcus:/etc/nginx# systemctl status mailman3 ● mailman3.service - GNU Mailing List Manager Loaded: loaded (/etc/systemd/system/mailman3.service; enabled; preset: enabled) Active: activating (start) since Wed 2025-08-13 23:12:05 UTC; 29s ago Process: 49024 ExecStart=/opt/mailman/venv/bin/mailman start (code=exited, status=0/SUCCESS) Tasks: 17 (limit: 4605) Memory: 878.0M (peak: 878.5M) CPU: 11.030s
I've tried this with and without the forking entry in the systemctl configuration.
No matter what I do, it's stuck in the ... Active: activating (start) since Wed 2025-08-13 23:13:37 UTC; 27s ago
What am I missing? root@arcus:/etc/nginx# cat /etc/systemd/system/mailman3.service [Unit] Description=GNU Mailing List Manager After=syslog.target network.target postgresql.service
[Service] Type=forking PIDFile=/opt/mailman/mm/var/master.pid User=mailman Group=mailman Environment="MAILMAN_CONFIG_FILE=/etc/mailman3/mailman.cfg" ExecStart=/opt/mailman/venv/bin/mailman start ExecReload=/opt/mailman/venv/bin/mailman restart ExecStop=/opt/mailman/venv/bin/mailman stop Restart=on-failure RestartSec=15
[Install] WantedBy=multi-user.target
root@arcus:/#
-- Piet Barber http://www.pietbarber.com/ http://blog.pietbarber.com/

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/nginx# systemctl status mailman3 ● mailman3.service - GNU Mailing List Manager Loaded: loaded (/etc/systemd/system/mailman3.service; enabled; preset: enabled) Active: activating (start) since Wed 2025-08-13 23:12:05 UTC; 29s ago
I don't know what the above line is intended to mean. I guess it is some sort of systemd internal concept saying that the application is started and systemd may need to pay attention to it.
Process: 49024 ExecStart=/opt/mailman/venv/bin/mailman start
(code=exited, status=0/SUCCESS)
This is normal. The mailman command starts the "master" runner (= daemon) that supervises the application, then exits. In fact, it usually complains that it can't find the PID file. Maybe systemd has gotten smarter about that.
Tasks: 17 (limit: 4605)
That seems right; by default Mailman starts that many processes.
Memory: 878.0M (peak: 878.5M)
That seems right, or maybe a little small.
CPU: 11.030s
That seems like a lot but I've never paid attention to these parts of systemctl status output.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan

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/

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/

Piet Barber via Mailman-users writes:
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" !
Glad that works for you.
I recommend trying without the two "restart" lines. I suspect that what was happening is that systemd was waiting for something from Mailman that never occurred (possibly the PID file? but that should show up in much less than 30s!), timed out, and I don't have a clue what systemd would do about that, except try to restart (assuming Mailman shutdown? or after running "mailman stop"?) Those lines are specific to Mailman installations using MySQL-family databases, but you appear to be using PostgreSQL, which doesn't need them.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan

I've been stuck on this for four weeks.
Here is another different copy of a systemctl script. What if you used this, modifying each value to match your environment. Change the paths. But don't add anything more like "RestartSec". Leave that out.
Hopefully it works, but if not, another random idea, move the PIDFile to /tmp, or omit it.
[Unit] Description=Mailman 3 Core service After=network.target Documentation=https://mailman.readthedocs.io/ ConditionPathExists=/etc/mailman3/mailman.cfg
[Service] ExecStart=/opt/mailman3/bin/mailman -C /etc/mailman3/mailman.cfg start ExecReload=/opt/mailman3/bin/mailman -C /etc/mailman3/mailman.cfg restart ExecStop=/opt/mailman3/bin/mailman -C /etc/mailman3/mailman.cfg stop Type=forking PIDFile=/var/lib/mailman3/master.pid SyslogIdentifier=mailman3 User=list Group=list
[Install] WantedBy=multi-user.target

On 14.08.25 01:15, Piet Barber via Mailman-users wrote:
What am I missing? root@arcus:/etc/nginx# cat /etc/systemd/system/mailman3.service
The command you want is
# systemctl cat mailman3.service
That shows the whole configuration including possible drop-ins.
[Unit] Description=GNU Mailing List Manager After=syslog.target network.target postgresql.service
[Service] Type=forking PIDFile=/opt/mailman/mm/var/master.pid
The obvious guess would be that the pidfile is not writable for the service or is already in used by another process. systemd seems to have a problem determining the main process pid which should be in the pidfile.
User=mailman Group=mailman Environment="MAILMAN_CONFIG_FILE=/etc/mailman3/mailman.cfg" ExecStart=/opt/mailman/venv/bin/mailman start ExecReload=/opt/mailman/venv/bin/mailman restart ExecStop=/opt/mailman/venv/bin/mailman stop Restart=on-failure RestartSec=15
Those two are not in the documentation and you really should have those if you are investigating startup issues with systemd. In the worst case it starts a new process every 15 seconds...
Stick to the docs. Once everything works, then consider adding that...
-Gerald
participants (4)
-
Gerald Vogt
-
Piet Barber
-
Sam Darwin
-
Stephen J. Turnbull