How to fix error starting mailman on cPanel server

The mailman error I got looks as below:

root@server1 [/usr/local/cpanel/3rdparty]# /usr/local/cpanel/scripts/restartsrv –wait –force 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 444759) reported error number 1 when it ended.):

Read the rest

How to remove Mailman list from command line

Find rmlist binary file under  /usr/local/cpanel/3rdparty/mailman/bin folder

For more info run:

root@chi101 [/usr/local/cpanel/3rdparty/mailman/bin]# ./rmlist --help

Usage:
rmlist [-a] [-h] listname

Where:
–archives
-a
Remove the list’s archives too, or if the list has already been
deleted, remove any residual archives.

–help
-h
Print this help message and exit.

Read the rest

How to disable Mailman archiving

Sudenly you may find that your mailing list archive has grown too large.

So you need to decide if you’re really need to keep your archives and if not then go ahead and disable it:

- Login your cPanel 
- 'Maillist'
- select your mail list
- 'Archiving Options'
- set 'Archive messages?'
Read the rest

How to install/reinstall mailman on cPanel server

Check Tweak Settings, should be ‘0’

cat /var/cpanel/cpanel.config |grep skipmailman

skipmailman=0

Deprecated scripts

/scripts/reinstallmailman
/usr/local/cpanel/bin/mailman-install --force

Deprecated scripts:

/usr/local/cpanel/scripts/update_local_rpm_versions --edit target_settings.mailman installed
/usr/local/cpanel/scripts/check_cpanel_rpms --fix --targets=mailman

The latest way to reinstall mailman on cPanel server:

rpm -e --nodeps cpanel-mailman
/usr/local/cpanel/scripts/check_cpanel_rpms --fix --targets=mailman

Run upcp:

/scripts/upcp --force
systemctl start mailman.service
Read the rest

How to remove mailman archives on cPanel server

Find your mbox files

ls -la /usr/local/cpanel/3rdparty/mailman/archives/private/my1_lists.domain.com.mbox/my1_lists.domain.com.mbox
ls -la /usr/local/cpanel/3rdparty/mailman/archives/private/my2_lists.domain.com.mbox/my2_lists.domain.com.mbox

Backup *.mbox files if needed and empty them:

truncate -s 0 /usr/local/cpanel/3rdparty/mailman/archives/private/my1_lists.domain.com.mbox/my1_lists.domain.com.mbox
truncate -s 0 /usr/local/cpanel/3rdparty/mailman/archives/private/my2_lists.domain.com.mbox/my2_lists.domain.com.mbox

Go to bin/ folder and wipe as following:

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

./arch --wipe my1_lists.domain.com
./arch --wipe my2_lists.domain.com
Read the rest