Question
How do you clear out the archives for Mailman?
Answer
An administrator may sometimes want to clear the Mailman archives for a particular mailing list. However, there is no method to do this in cPanel. Therefore, the changes must be made using the command line.
Warning: The following tasks should only be handled by a System Administrator who is comfortable manipulating files using the command line. cPanel cannot directly assist with the steps in this article.
- Access the server's command line as the 'root' user via SSH or Terminal in WHM.
Backup the list's archive folder:
# cp -Rav /usr/local/cpanel/3rdparty/mailman/archives/private/$listname_$domain.tld.mbox /path/to/backup/destination/
Note: "$listname" and "$domain.tld" must be replaced with the mailing list name and the domain name for the list, and "/path/to/backup/destination/" must be replaced with the path to the location where the backup of the mailing list's archive will be stored.
- Open the
/usr/local/cpanel/3rdparty/mailman/archives/private/$listname_$domain.tld.mbox/$listname_$domain.tld.mboxfile in your preferred text editor. - Delete the message content you wish to erase from the archive.
- Save the changes and exit the text editor.
Run the following command to clear out any HTML data created from the archives:
# /usr/local/cpanel/3rdparty/mailman/bin/arch --wipe list_domain.tld
Note: you will want to replace "list_domain.tld" with the actual mailing list.
This command will only remove archives where the messages were removed as in the previous step, as the data is built from the email files in the .mbox file.Run the following command to clear the Mailman cache:
# /usr/local/cpanel/scripts/update_mailman_cache
Comments
0 comments
Article is closed for comments.