Clean Mailman Archive

Mailman archive consumes huge disk usage; in this article, we will clean archives on Mailman.
The steps to delete archives on Mailman are as follows:
- Disable the Archive Message feature through the Mailman dashboard settings.
- Log in to SSH and then navigate to the directory
/usr/local/cpanel/3rdparty/mailman/archives/private
Command:
cd /usr/local/cpanel/3rdparty/mailman/archives/private - If you want to back up the Mailman archive, you can do so by copying the .mbox file; if not, skip this step.
Command:
cp account-name-milis_domain.com.mbox/account-name-milis_domain.com.mbox /home/ - Empty the Mailman archive for the mailing list account [email protected]
Command:
echo '' > account-name-milis_domain.com.mbox/nama-account-milis_domain.com.mbox.mbox - Wipe Archive
Command:
/usr/local/cpanel/3rdparty/mailman/bin/arch --wipe account-name-milis_domain.com - Update Mailman Cache
Command:
/scripts/update_mailman_cache
Note:
- The use of the name-account-milis_domain.com is the name of the mailing list account you want to delete, for example, using the name domain name: @liteoss.com and wanting to delete the mailman sales archive, then replace it with sales_domain.com.
- In Mailman, the character @ is replaced with _
- This tutorial is not limited to Mailman users on Cpanel but also includes native Mailman users and Plesk users.