Linux : cPanel – The service “mailman” appears to be down

By | September 4, 2023

Receiving the following alert/error from your cPanel server?

The service “mailman” appears to be down.

Try first to manually restart the service from WHM, or by SSH using the following command :

/scripts/restartsrv_mailman

You’ll most likely end up with the following error/output :

[root@hostname root]# /scripts/restartsrv_mailman
Waiting for “mailman” to start ……info [restartsrv_mailman] systemd failed to start the service “mailman” (The “/usr/bin/systemctl restart mailman.service --no-ask-password” command (process 1881565) reported error number 1 when it ended.): Job for mailman.service failed because the control process exited with error code.
See "systemctl status mailman.service" and "journalctl -xe" for details.

…Waiting for mailman,qrunner to shutdown ... not running.
info [restartsrv_mailman] systemd failed to start the service “mailman” (The “/usr/bin/systemctl restart mailman.service --no-ask-password” command (process 1881574) reported error number 1 when it ended.): Job for mailman.service failed
because the control process exited with error code.
See "systemctl status mailman.service" and "journalctl -xe" for details.

…failed.

Cpanel::Exception::Services::StartError
Service Status
        undefined status from Cpanel::ServiceManager::Services::Mailman

Service Error
        (XID krf5df) The “mailman” service failed to start.

Startup Log
        Apr 22 11:38:45 hostname.domain.tld systemd[1]: Starting mailman services...
        Apr 22 11:38:45 hostname.domain.tld restartsrv_mailman[1881575]: Site list is missing: mailman
        Apr 22 11:38:45 hostname.domain.tld systemd[1]: mailman.service: Control process exited, code=exited status=1
        Apr 22 11:38:45 hostname.domain.tld systemd[1]: mailman.service: Failed with result 'exit-code'.
        Apr 22 11:38:45 hostname.domain.tld systemd[1]: Failed to start mailman services.

mailman has failed. Contact your system administrator if the service does not automagically recover.

As specified in the error, your Mailman installation is missing the main Mailman list.  In order to fix this issue, we need to re-create the Mailman main list with the following command :

/usr/local/cpanel/3rdparty/mailman/bin/newlist

The output will look like this (answer both questions with the values of your choice) :

[root@hostname root]# /usr/local/cpanel/3rdparty/mailman/bin/newlist
Enter the name of the list: mailman
Enter the email of the person running the list: you@domain.tld
Initial mailman password: YourStrongSecretPassword

Then start Mailman with the following command :

/scripts/restartsrv_mailman

Mailman should now start normally and the output will look like this :

[root@hostname root]# /scripts/restartsrv_mailman
Waiting for “mailman” to start ……waiting for “mailman” to initialize ………finished.

Service Status
        mailman (/usr/local/cpanel/3rdparty/bin/python2 /usr/local/cpanel/3rdparty/mailman/bin/mailmanctl -s start) is running as mailman with PID 1882266 (systemd+/proc check method).

Startup Log
        Apr 22 11:41:05 hostname.domain.tld systemd[1]: Starting mailman services...
        Apr 22 11:41:05 hostname.domain.tld restartsrv_mailman[1882258]: Starting Mailman's master qrunner.
        Apr 22 11:41:05 hostname.domain.tld systemd[1]: mailman.service: Can't open PID file /usr/local/cpanel/3rdparty/mailman/data/master-qrunner.pid (yet?) after start: No such file or directory
        Apr 22 11:41:06 hostname.domain.tld systemd[1]: Started mailman services.

mailman started successfully.