One of our shared servers was showing several thousand bounce messages in the mail queue all generated via a mailman user. So we decided to kill mailman permanently.
However the recomended tweak of switching off Main >> Server Configuration >> Tweak Settings >> Mailman was not working. Still in the background there were mailman processes running, causing havoc.
So I needed to STOP mailman running as well as DISABLE it.
The solution I found was:
1. Run the following command in SSH which will stop the mailman process from running.
/usr/local/cpanel/3rdparty/mailman/bin/mailmanctl stop
2. Create an .htaccess for mailman – Create a file at in the following location on your server.
/usr/local/cpanel/3rdparty/mailman/cgi-bin/.htaccess
3. Put the following code into the file, this will give a permission denied error on the mailman system.
<Limit GET POST> order deny,allow deny from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit>
4. Finally, add the .htaccess to the exclude file so cPanel won’t remove / change it. Run the following in SSH.
"/usr/local/cpanel/3rdparty/mailman/cgi-bin/.htaccess" >> /etc/cpanelsync.exclude
Bang! There you go. No more issues with mailman. Load dropped like a stone. Sweet!