Introduction
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.
Please note that 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.
Procedure.
Please note that in the commands below, "$listname" and "$domain.tld" must be replaced with the mailing list name and the domain name for the list, respectively.
- 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/
Please note that "/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.mbox
file 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
Please note that 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.